Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dosfreak

Very Strange Behaviour

This topic is 5926 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''m totally confused about what is going on inside OpenGL. I have two texture units enabled for cube mapping for the first pass. When I disable the two units, for the second pass, I experience a noticeable drop down in performance. 3D Card: GeForce 2 MX - AGP 2x Machine: PII 400MHZ, 256 MB RAM (*glActiveTextureARB)(GL_TEXTURE0_ARB); glEnable (GL_TEXTURE_CUBE_MAP_ARB); (*glActiveTextureARB)(GL_TEXTURE1_ARB); glEnable (GL_TEXTURE_CUBE_MAP_ARB); //1st pass glBegin (GL_QUADS); glColor3f (1.0, 1.0, 1.0); glMultiTexCoord3fARB (GL_TEXTURE0_ARB, 0.0, 0.0, 1.0); glMultiTexCoord3fARB (GL_TEXTURE1_ARB, ... glVertex3f (-1.0, -1.0, -1.0); glMultiTexCoord3fARB (GL_TEXTURE0_ARB, 0.0, 0.0, 1.0); glMultiTexCoord3fARB (GL_TEXTURE1_ARB, ... glVertex3f (-1.0, 1.0, -1.0); glMultiTexCoord3fARB (GL_TEXTURE0_ARB, 0.0, 0.0, 1.0); glMultiTexCoord3fARB (GL_TEXTURE1_ARB, ... glVertex3f (1.0, 1.0, -1.0); glMultiTexCoord3fARB (GL_TEXTURE0_ARB, 0.0, 0.0, 1.0); glMultiTexCoord3fARB (GL_TEXTURE1_ARB, ... glVertex3f (1.0, -1.0, -1.0); glEnd (); glEnable (GL_BLEND); glBlendFunc (GL_DST_COLOR, GL_ZERO); //Disabling the two units for cube mapping while unit 0 is //initially enabled for 2d texturing (*glActiveTextureARB)(GL_TEXTURE0_ARB); glDisable (GL_TEXTURE_CUBE_MAP_ARB); (*glActiveTextureARB)(GL_TEXTURE1_ARB); glDisable (GL_TEXTURE_CUBE_MAP_ARB); //If enabling them again here, it behaves normally with //no strange slow down //2nd pass glBegin (GL_QUADS); glMultiTexCoord2fARB (GL_TEXTURE0_ARB, 0.0, 0.0); glColor3f (1.0, 1.0, 1.0); glVertex3f (-1.0, -1.0, -1.0); glMultiTexCoord2fARB (GL_TEXTURE0_ARB, 0.0, 1.0); glVertex3f (-1.0, 1.0, -1.0); glMultiTexCoord2fARB (GL_TEXTURE0_ARB, 1.0, 1.0); glVertex3f (1.0, 1.0, -1.0); glMultiTexCoord2fARB (GL_TEXTURE0_ARB, 1.0, 0.0); glVertex3f (1.0, -1.0, -1.0); glEnd (); glDisable (GL_BLEND); Please help. My brain is about to explode.

Share this post


Link to post
Share on other sites
Advertisement
I have the latest NVIDIA Detonator drvrs (ogl 1.3.1)
Could this be because of having two texture units enabled for cube mapping?

Share this post


Link to post
Share on other sites
Maybe setting the cube mapping stomps some other TMU state, try reinitializing the appropriate TMU to it''s basic state after disabling the cube mapping (Just a thought, I don''t know a great deal about those extensions).

Share this post


Link to post
Share on other sites
how much of a drop?
the second pass is blended if youre fillrate bound the fps will drop by at least half.

try
disabling blending
also
glDepthFunc( GL_LESS );

both wont give the right results but they will give u a clue as to whats happening

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
The frame rate drops from say 50/60 fps to 1 fps. And I made sure that this has nothing to do with blending whether it''s enabled or disabled.

Share this post


Link to post
Share on other sites

  • 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!