Graphics

Reply

How to creat a Texture2D from the current colorbuffer?

Hello,

In my program ,i want to draw something on the screen,and then freeze them as a background picture to draw something else on it(which the background picture wouldn't be erased when new elements was drawn). I think maybe i can creat a texture from the colorbuffer when the background was drawn and then render it to the screen each circle. But i can't find a way to do it.

How should i do to create a texture from the current colorbuffer?Or is there anyone can offer me a better way to achieve my goal?

Please use plain text.

Rif.: How to creat a Texture2D from the current colorbuffer?

You could do it two ways, reading the color buffer with the equivalent of glReadPixel() or you could create a Texture2D with the renderable attribute set on. You would then bind the FBO with that texture attached as color target, render the scene, and use the texture as you please. I am making a short summary based on what I'd do with OpenGL ES, with PS Suite I am still working my way into the samples so I would suggest to look at the shaders sample and the shadow projection one in particular. I am working on off screen render buffers (for shadow maps) right now so hopefully I will be able to post some more details about this soon.

Please use plain text.

Rif.: How to creat a Texture2D from the current colorbuffer?

[ Edited ]

I checked the pss document again and found this ReadPixels function i missed before. I'll try it in my program later.Thank you. And it'll be very nice if anyone else can offer me another more efficent way to ahcieve my goal.

Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。