Jump to content
  • Advertisement
Sign in to follow this  
ehmdjii

render certain objects to texture/file

This topic is 3979 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, i would like to implement a feature to my game, that allows players to save a screenshot just of their character without the environment. so i thought of just rendering the character-node of the scenegraph and writing that to a file (PNG). how could i do that? thanks!

Share this post


Link to post
Share on other sites
Advertisement
if ( takescreenshot )
{
glClear( GL_COLORBUFFER );
draw player
readpixels + save to file
}

Share this post


Link to post
Share on other sites
You'll lose antialiasing on the result image if you use FBOs. Using ReadPixels is probably the most reliable way to go about it.

Share this post


Link to post
Share on other sites
Antialiasing is not supported for fbo's on current hardware except the new gf8 and and (don't know exactly) atis 2000 series. If you stick to readpixels from the framebuffer you can use antialiasing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!