Jump to content
  • Advertisement
Sign in to follow this  
James Noble

glEnable(GL_FRAGMENT_PROGRAM_ARB) slows my code down!

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

I am gearing up to transition my existing game to shaders. Everything is going smoothly, but last night I was testing my performance and I noticed something VERY strange. I have a scene that renders at about 100fps (not using any shaders at all). I enabled and loaded some shaders, but didn't *use* them -- yet I immediately took a performance hit of about 30% to 70fps.. after some tinkering I found the culprit to be: glEnable(GL_FRAGMENT_PROGRAM_ARB); I load my vertex shader just fine but the minute I call the above glEnable to begin loading up my fragment program the performance of my app is permanently degraded. Even if I call glDisable(GL_FRAGMENT_PROGRAM_ARB) immediately after the above call (e.g. don't do ANY actual fragment work whatsoever) my performance gets hit. Long story short if I put only: glEnable(GL_FRAGMENT_PROGRAM_ARB); glDisable(GL_FRAGMENT_PROGRAM_ARB); in my program initialization, it crushes my non-shader performance for the duration of my program execution! I am using an ATI Radeon 9800 with up-to-date drivers.. Has anyone else experienced this issue? And does anyone know what I can do to resolve this issue?

Share this post


Link to post
Share on other sites
Advertisement
Honestly I'm also flummoxed as to how glEnable / glDisable at initialization can cause the program to slow down later - but I wanted to say (just in case you hadn't noticed) that your card has GLSL support, and you'll probably find it easier to use a high level shader language than an assembly fragment program.

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!