Jump to content
  • Advertisement
Sign in to follow this  
dummyboy2

OpenGL PBuffer and shadowmap - terrible performance problem...

This topic is 4846 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

Hi, I'm trying to implement shadow mapping. I used pbuffer and depth texture set with: glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 1024, 1024, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);, glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );, no mip-map etc. each time I activate glCopyTexSubImage(), i have tu wait about 0.5 sec, with 256x256 texture resolution. when I increased texture resolution to 1024x1024 performance droped even greater. I have pBuffer parameters set to: int pf_attr[] = { WGL_DRAW_TO_PBUFFER_ARB, TRUE, WGL_SUPPORT_OPENGL_ARB, TRUE, WGL_BIND_TO_TEXTURE_DEPTH_NV, TRUE, WGL_DEPTH_BITS_ARB, 24, WGL_BIND_TO_TEXTURE_RGB_ARB, TRUE, WGL_RED_BITS_ARB, 8, WGL_BLUE_BITS_ARB, 8, WGL_GREEN_BITS_ARB, 8, 0 }; and int pb_attr[] = { WGL_PBUFFER_LARGEST_ARB, TRUE, WGL_TEXTURE_TARGET_ARB, WGL_TEXTURE_2D_ARB, WGL_TEXTURE_FORMAT_ARB, WGL_TEXTURE_RGB_ARB, WGL_DEPTH_TEXTURE_FORMAT_NV, WGL_TEXTURE_DEPTH_COMPONENT_NV, 0 }; I don't have any idea what's going on... I spended 2 days to find the bug. Pleas help!

Share this post


Link to post
Share on other sites
Advertisement
I forgot to write, that I normaly have 200fps without that shadow rendering, and that I have GF 6800GT. I used wglShareList() and I have 16bits for depth buffer (in frame and pbuffer as well).

Share this post


Link to post
Share on other sites
Maybe you should use
WGL_DEPTH_BITS_ARB, 16,
instead of
WGL_DEPTH_BITS_ARB, 24,
if you have a 16 bit depth buffer.

If that doesn't help, you could/should try to avoid pbuffers. There's a rather new
extension called frame buffer objects (FBOs). It's a replacement for pbuffers and
much easier and faster to use.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I have used FBO already. I want to have PBuffer too, becouse FBO don't work on ATI... but maybe before I will finish my project it will be...
Thanks for help.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
I have used FBO already. I want to have PBuffer too, becouse FBO don't work on ATI... but maybe before I will finish my project it will be...
Thanks for help.
FBO is supported in the Cat5.7 drivers.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!