Bonjour à tous, je sollicite votre aide pour un projet un peu particulier, je m´explique:
Je fréquente assidûment les forums d´opengl.com ( pseudo Gollum) et plus spécialement " Beginner" et " Windows specific"
Un monsieur que je ne nommerais pas explicitement m´as demandé de l´aide sur son projet: La personne en question est un employé de la société Analogic Corporation, dans le cadre d´une application il doit porter un programme de Linux sur Windows XP, mais il semble y avoir quelques problemes d´affichage notemment, j´ai regardé le code, mais il ne semble pas y avoir d´erreurs, par contre il utilise les specifications de fonctions NV et ARB, et ça je ne suis pas encore tout a fait en mesure de l´analyser 
Alors je voulais savoir si il y avait quelque bug majeur dans son application GLUT, je vous copy/paste son mail pour que vous y voyiez plus clair, je lui ai répondut que j´essairais de l´aider dans la mesure du possible compte tenu de mes faibles connaissances...
" Dear Sir,
I´m working on an OpenGL application at Analogic Corporation. Analogic produces airport security CT scanners,
and this application allows a user to visualize and manipulate a scanned suitcase. I noticed that you post
on comp.graphics.api.opengl, and as this email is unsolicited feel free to ignore or delete it. I am really stuck
on a problem though, and I´d really appreciate it if you could provide any insight.
The program uses GLUT for the display, and it uses NVIDIA extensions to do the texture shading. Honestly, I am
a newcomer to OpenGL and my job right now is to port this thing from Linux to Windows. It works just fine under
Linux, but it has a strange behavior under Windows XP: everythings draws fine the first time, but after the second
draw, the screen remains blank. Would you happen to have any idea if there is some difference between Windows XP
and Linux that I need to compensate for in order for thi! ngs in general to the code? I cannot, despite my best efforts,
figure out what would cause this: it seems to me there are only three possibilities: the operating system, the GLUT
package, or the NVIDIA driver.
Every time we display we do the following:
code:
--------------------------------------------------
------------------------------
glClear(GL_COLOR_BUFFER_BIT);glClearColor(bgIntens
ity,bgIntensity,bgIntensity,0.0);glShadeModel(GL_F
LAT);glEnable(GL_TEXTURE_SHADER_NV);glActiveTextur
eARB(GL_TEXTURE1_ARB);glTexEnvf(GL_TEXTURE_SHADER_
NV,GL_SHADER_OPERATION_NV,GL_TEXTURE_2D);glTexEnvf
(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_REPLACE);gl
TexEnvf(GL_TEXTURE_SHADER_NV,GL_SHADER_OPERATION_N
V,GL_DEPENDENT_GB_TEXTURE_2D_NV);glTexEnvf(GL_TEXT
URE_SHADER_NV,GL_PREVIOUS_TEXTURE_INPUT_NV,GL_TEXT
URE0_ARB);glBindTexture(GL_TEXTURE_2D,texTable);gl
Flush();!
glActiveTextureARB(GL_TEXTURE0_ARB);glTexEnvf(GL_T
EXTURE_SHADER_NV,GL_SHADER_OPERATION_NV,GL_TEXTURE
_RECTANGLE_NV);glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE
_ENV_MODE,GL_REPLACE);
--------------------------------------------------
------------------------------
Then, we draw the textures:
code:
--------------------------------------------------
------------------------------
for(i=0;i<h1;i++){glBindTexture(GL_TEXTURE_RECTANG
LE_NV, texTop[i]);glBegin(GL_QUADS);vertex[0] = -X; vertex[1] = -Y+sliceInterval*(float)i; vertex[2] = Z;rotateQuad(vertex);glTexCoord2f(0.0,0.0);
glVertex3f(vertex[0],vertex[1],vertex[2]);glFlush(
);vertex[0] = X; vertex[1] = -Y+sliceInterval*(float)i; vertex[2] =
Z;rotateQuad(vertex);glTexCoord2f(0.0,texHeight);g
lVertex3f(vertex[0],vertex[1],vertex[2]);vertex[0]
= X; vertex[1] = -Y+sliceInterval*(float)i;; vertex[2] =
-Z;rotateQuad(vertex);glTexCoord2f(texWidth,texHei
ght);glVertex3f(vertex[0],vertex[1],vertex[2]);ver
tex[0] = -X; vertex[1] = -Y+sliceInterval*(float)i; vertex[2] =
-Z;rotateQuad(vertex);glTexCoord2f(texWidth,0.0);g
lVertex3f(vertex[0],vertex[1],vertex[2]);glEnd();g
lFlush();}
--------------------------------------------------
------------------------------
The first time this display routine is called, everything works fine. The second time it´s called, almost nothing is drawn, even if all the data and parameters in the program stay the same. Actually a few pixels are drawn, which makes even less sense.
Anyway, any information you could provide would be greatly appreciated. If you´ve gotten this far, thanks.
Regards,
Kyle
Analogic Corporation"
Merci d´avance a ceux qui voudrait bien jeter un oeil
thx, gollum