Rendering to a texture

Started by
1 comment, last by ShawMishrak 22 years, 5 months ago
I understand the concept behind this: Saving the default rendering surface using GetRenderTarget, grabing the surface of the texture you want to render to, setting that surface as the target, then restoring the default surface when you''re done. The program always gets killed when trying to call the GetSurfaceLevel function to grab the texture''s surface. What do I need to do to preinitialize this variable to allow me to grab the surface? A link to a tutorial on this subject would be greatly appreciated. Thanks in advance.
Advertisement
the D3DX function library has something you might be looking for:

ID3DXRenderToSurface()

might solve some of your problems
"This is stupid. I can't believe this! Ok, this time, there really IS a bug in the compiler."... 20 mins pass ..."I'M AN IDIOT!!!"
Does anyone have any links to any tutorials, such as Nehe''s lesson 37 on how to accomplish this with OpenGL?

This topic is closed to new replies.

Advertisement