on 06-05-2012 08:22 AM
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?
on 06-05-2012 11:52 AM
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.
06-05-2012 12:09 PM - edited 06-05-2012 12:15 PM
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.
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を一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870