View Full Version : RTT on GF4 41.09

02-24-2003, 06:52 PM
I'm copying nvidia's example simple_shadow_map_render_depth_texture.

My code boils is similar to their render_light_depth function:

if (wglMakeCurrent( pbuffer.hdc, pbuffer.hglrc) == FALSE)
if (wglMakeCurrent( hdc, hglrc) == FALSE)

When I render from the light's point of view the only things I enable are depth, culling, and colour material.

One thing I notice is that setting and unsetting my pbuffer context is no problem. But when I set it, render the scene (just one model of it actually) to it, and then restore the main context, I sometimes get wierd artefacts depending on the view. Sometimes I have the wrong texture or no texture on certain parts of certain models! I can clear the buffer (depth and colour), but I can't draw to it without causing corruption elsewhere!

I'm not trying to use this pbuffer for anything yet, I'm simply trying to render to it.

Anybody else encounter anything like this?

02-24-2003, 08:02 PM
(a) Where are the corruptions occurring, in the pbuffer or the main window? (Presumably in the main window given you mentioned missing textures)

(b) A link to a screen shot is always helpful.

02-24-2003, 08:25 PM
These are happening in the main window. Sometimes it simply causes the wrong texture to be used.