gltexcoordPointer question

i have a 64*64 texture used for color look ups, this means 4096 different colors. to index these colors i use now two floats ranging from[ 0…1 ],
but since i continuously stream these floats from a medium this have a pretty high impact on the speed. For performance it’s better to use a short because
a short has enough bits in it. I’ve tried this code but no results :

gl.glTexCoordPointer(1, GL.GL_SHORT, 0, intensity);

but using this
gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, intensity);
gives good results at the expense of cpu /IO cycles.

any help

Can you provide some code? If “intensity” doesn’t contain short-valued data then that’s your problem. There’s also the issue in the call you provided that you are passing 1 for the size in the GL_SHORT case where you’re passing 2 for the GL_FLOAT case.

basically what i want is passing 1D indices (ranging from 0-4096) indexing a 2D texture(64*64)

Solved it by replacing glTexCoordPointer in glIndexPointer and using a colortable

FloatBuffer buf = BufferUtils.newFloatBuffer(intensity.capacity()*2);
float u, v;
for( int i = 0 ; i < intensity.capacity();i++)
{
short inte =intensity.get(i);
u = (inte/64)/64f;
v = (inte%64)/64f;

buf.put(v);
buf.put(u);

}

buf.rewind();

if(vertices!=null ){
if( vertices.capacity()>=3 )
{

gl.glTexCoordPointer(2, GL.GL_FLOAT,0, buf);
//gl.glColorPointer(3, GL.GL_FLOAT, 0, buf);
gl.glVertexPointer (3, GL.GL_FLOAT, 0 , vertices);
gl.glDrawArrays( GL.GL_POINTS, 0, numPoints );
}