Jump to content
  • Advertisement
Sign in to follow this  
soconne

glColorPointer slow

This topic is 5110 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 have a simple array of vertices, I initialize vertex positions, texcoords and an array of colors. But when I enable the GL_COLOR_ARRAY, I go from about 600fps down to 1fps, and I have no clue why. I'm using an ATI 9800 Pro, anybody else experience this problem? I would show code, but its just basic initialization code for calling glColorPointer, ect.... And I have the exact same number of colors, vertices and texcoords. Here's a demo. Demo

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Well, dont you think you SHOULD post the code? I can say that is not the way its meant to be, so you must have done something wrong, and we cant just guess it :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Because of the heightmap and texture.

Share this post


Link to post
Share on other sites
perhaps the color arrays contains bogus data?
perhaps youve hit a slow path, IIRC from a performance pdf that ati doesnt light unsigned bytes for colors or something ie tyry other data types.

Share this post


Link to post
Share on other sites
well, the version with glColorPointer enabled IS running slower. that's all i can say since i couldnt find a frame counter in your little program. you know, there could be more specific help if you had added at least some significant code snippets to the archive. it's hard to guess what might be wrong with your code. but anyway, nice terrain.

Share this post


Link to post
Share on other sites
I switched to unsigned byte and it runs perfectly normal now. I don't know why ATI cards run slow using float though, seems a little odd.

Share this post


Link to post
Share on other sites
GLubyte is a quarter of the size of a GLfloat thus theres less data to be passed,
certain data types are on a drivers fast path.
(though a 600->1 drop sound slike youre getting a software opengl implementation)

http://www.ati.com/developer/gdc/PerformanceTuning.pdf

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!