This is a fairly slow function, intended for use with static textures that do not change often. Use SDL_QueryTexture () to query the pixel format of the texture.These buffers occupy video memory like any other OpenGL object, but so far we've had little control over them besides specifying the pixel formats when you created the OpenGL context. In the previous chapters we've looked at the different types of buffers OpenGL offers: the color, depth and stencil buffers. With our scene rendered to a texture, we then render the target texture to the screen at a rotated angle. We then render our scene full of geometry and once we're done rendering to a texture we call SDL_SetRenderTarget with a NULL texture so any rendering done afterward will be done to the screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |