Jump to content
  • Advertisement


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


1d texture causes fps drop?

This topic is 5457 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, we are npr(endering) some terrain in several passes (for older hw). The shading texture is a GL_TEXTURE_1D and 1d texcoords(=shade value) stored in an interleaved array with vertex,2d tu data. Rendering a pass with a 2d texture is acceptable fast (150fps on a radeon7500, i also experience the same drop on a gf4ti with the same amount), as soon as i use the 1d texture the framerate drops to 13fps. We use VBOs. Any idea what could causing such an immense drop in fps? Any tips where to start looking for the error? the interleaved array offsets look like this.
HeightFieldBlock::CUSTOMVERTEX helper;
char * ofs0 = (char *)&helper;
char * ofs1 = (char *)&helper.position;
char * ofs2 = (char *)&helper.normal;
char * ofs3 = (char *)&helper.tu;
char * ofs4 = (char *)&helper.shadevalue;
int offset_position = (int)(ofs1 - ofs0);	//0

int offset_normal   = (int)(ofs2 - ofs0);	//16

int offset_tu_tv    = (int)(ofs3 - ofs0);	//32

int offset_shadeval = (int)(ofs4 - ofs0);	//40

the texcoords pointer is specified like this:
glTexCoordPointer( 1, GL_FLOAT, heightField_[j]->getVertexSize(), 
 BUFFER_OFFSET(offset_shadeval) );
thank you very much! regards, Stephan

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!