Skip to main content
GameDev.net gamedev.net
🔒 Locked

bug in OpenGL?

Started by core114 Aug 3, 2001 at 5:59 PM 8 replies 700+ views
Original Post
core114
core114
when using vertex arrays, the stride value for glColorPointer seems to have NO EFFECT. all the color values are just taken as if the stride was 0. this is a problem as i was trying to have vertex and texture data in the same array. is this actually a bug? is there any way to actually set the stride value for the colorpointer?
core114
core114
the problem is:

glVertexPointer(3, GL_FLOAT, sizeof(gl_array_data), (GLvoid *)(&draw_map_array[0].vertex[0]));
glColorPointer(3, GL_FLOAT, sizeof(gl_array_data), (GLvoid *)(&draw_map_array[0].color[0]));
glTexCoordPointer(2, GL_FLOAT, sizeof(gl_array_data), (GLvoid *)(&draw_map_array[0].texcoord[0]));

now if you look at them they all seem basicly the same.
however, the 3rd value for glColorPointer has NO effect whatsoever. the rest work fine.

i am using the standard .h and .lib files that come from opengl.org

i'm not a faulty user, if you must see more code...

struct gl_array_data
{
float vertex[3];
float color[3];
float texcoord[2];
};

gl_array_data draw_map_array[MAPX*2+16];

and yes i did enable the stuff, and the other two pointers work fine.

also, OpenGL does have known bugs.

Edited by - core114 on August 3, 2001 11:07:26 PM

Edited by - core114 on August 3, 2001 11:10:09 PM
core114
core114
i don''t have lighting enabled,
it does exactly the same thing when i use interleaved arrays.

on another computer, it worked exactly as it should...
perhaps i just have some awful opengl drivers

now this just leavs me wondering if there is a simple way to test if drivers do what they are supposed to, is there some utility to do test them?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.