Could you give me some advices on following problems:
When I want to player&logger glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), I need to know the length of pointer firstly. However,
I use following way:
GLint count=0;
glGetIntegerv(GL_COLOR_ARRAY_COUNT, &count);
but “GL_COLOR_ARRAY_COUNT” is undefined in gl.h
I use anthor way:
GLint count=0;
glGetIntegerv(GL_COLOR_ARRAY_COUNT_EXT, &count);
but varible count still retain 0;
You don’t know the size of the pointer, that’s the way it is. What you CAN find out is how many elements that are used. Just look at the point where you draw then arrays. If you use, say, index 0 to 99, it means the length of the pointer is at least 100 elements. It can, of course, be longer, but you don’t know that.
if a gl app such as:
static glint v[]={1,2,3};
…
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2,GL_INT,0,v);
…
glArrayElement(1);
glArrayElement(2);
glArrayElement(3);
…
v[0]=3;v[1]=2;v[2]=1;//Question1:i how to know the conent of vertex array have been changed??
glArrayElement(1);
glArrayElement(2);
glArrayElement(3);
//Question2:such coding is possible, isn’t?
//Question3:i how to know to trace the content of vertex array two times?
opengl does NEVER know ANYTHING about your data. it does not know if the pointer is valid, how much items are in, if the data changed, or anything. at the moment you call a command in opengl that requires the data, it will grab the data it needs for its uses. not before, not after.
Sorry,I mean that if mycode can logger/playback all call in opengl32.dll correctly, So it also can logger/playback auxSolidTeapot() correctly.doesn’t it?
anyway, thank you!
[This message has been edited by RogerWang (edited 10-27-2002).]
Originally posted by RogerWang:
[b]OK! I see, Thanks,another problem:
How to logger function:auxSolidTeapot. it seemed that such aux function is not all call based on opengl32.dll.
[/b]
What do you mean by “not all call based on opengl32.dll”
It just makes some opengl calls for rendering the teapot. I don’t have “aux” so cant check to see its dependencies.
as far as i know, ms windows implementation has no aux library by default, it has to be supported by manyfacturer’s driver or something. or is my memory a bit off? 8)… that is to say, there’s no glaux.dll or some such dll, only opengl32.dll and glu32.dll… try sgi’s software renderer, it might support the aux lib…
Thanks for all your replies, Now I have developped a gllogger&player, It now can logger&player Quake3demo, But the textures on walls always were not been rendering(so the walls have no textures) when playing back? Could everyone give me some advices to help debugging. Thanks very much!
[This message has been edited by RogerWang (edited 11-05-2002).]
[This message has been edited by RogerWang (edited 11-05-2002).]
Maybe I need to explain my problem more clearly ,I encounter a problem in my programm. it now can logger and play all frames of Quake3demo. However, I found the image(maybe use textures to render) on the walls are not rendered correctly(I am glad to mail a sample frame to you). can you give me some advices on how to rendered the walls correctly?( Maybe some ogl calls were not logger incorrectly ). Or you can give some suggestions on how to debug this error(because too many ogl calls in the loggerfile, i spend two week to study them but found nothing.)
following is all call count in loggerfiles.
Sorry for to trouble you and Thanks for your helps.
Originally posted by MichaelK: Ive found a secret entry in opengl32.dll - glDebugEntry(). It isnt documented so maybe it is some sort of a secret backdoors do OpenGL?
Could anybody tell me how to use glDebugEntry and how function about this call?