Archived

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

stephanh

1d texture causes fps drop?

Recommended Posts

stephanh    174
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
eisscholle.de

Share this post


Link to post
Share on other sites