gltrace&playback

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;

Why? and How to resolve this problem.

Thanks for your helps.

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.

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.

if i understood you correctly you are looking for the library containing aux* functions: glaux.lib

otherwise sorry for the ignorance

[This message has been edited by veal (edited 10-25-2002).]

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.

V-man

Originally posted by V-man:
[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.

V-man
Thanks!, I want to know: Calls to render the teapot are all come form opengl32.dll, not other dlls or libs. thanks!

[/b]

Anything that uses opengl commands to rendere (e.g. auxsolidTeapot) will show up in your logging opengl32.dll

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.

Call Counts:
glBegin 362
glBindTexture 2704
glBlendFunc 210
glClear 52
glClearDepth 4
glColor3f 1
glColor4f 4
glColorPointer 1430
glCullFace 56
glDeleteTextures 445
glDepthFunc 18
glDepthMask 184
glDepthRange 10
glDisable 822
glDisableClientState 426
glDrawBuffer 102
glDrawElements 1430
glEnable 595
glEnableClientState 3071
glEnd 362
glFinish 58
glGetError 449
glGetIntegerv 2
glGetString 4
glLoadIdentity 294
glLoadMatrixf 187
glMatrixMode 396
glOrtho 147
glPolygonMode 4
glPolygonOffset 3
glScissor 198
glShadeModel 4
glTexCoord2f 1448
glTexCoordPointer 1581
glTexEnvf 9
glTexImage2D 2267
glTexParameterf 1790
glTexParameterfv 4
glVertex2f 1448
glVertexPointer 1266
glViewport 198
wglCreateContext 1
wglDeleteContext 1
wglDescribePixelFormat 48
wglGetPixelFormat 4
wglGetProcAddress 6
wglMakeCurrent 2
wglSetPixelFormat 1
wglSwapBuffers 102

glActiveTextureARB 362
glClientActiveTextureARB 362
glLockArraysEXT 1266
glUnlockArraysEXT 1266
wglSwapIntervalEXT 1

Closing output file

Ive found a secret entry in opengl32.dll - glDebugEntry(). It isnt documented so maybe it is some sort of a secret backdoors do OpenGL?

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?