J'installe ma fenêtre comme ceci:Delphi dessin OpenGL
glMatrixMode (GL_PROJECTION);
glLoadIdentity();
glOrtho (0, form1.Width, form1.height, 0, 0, 1);
glMatrixMode (GL_MODELVIEW);
glDisable(GL_DEPTH_TEST);
Et ma routine de dessin ressemble à ceci:
tempdist:=0.3/distance(i,0,1,2);
xunit:=1 div 90;
zunit:=1 div 74;
glBegin(GL_LINE_LOOP);
case players[i].isteam of
2:glcolor3f(1.0,0.0,0.0); //Terrorist
3:glcolor3f(0.0,0.0,1.0); //Counter-Terrorist
end;
glvertex2f((thetax/100)*xunit,(thetaz/100)*zunit);
glvertex2f((thetax/100)*xunit+tempdist,(thetaz/100)*zunit);
glvertex2f((thetax/100)*xunit+tempdist,(thetaz/100)*zunit+tempdist);
glvertex2f((thetax/100)*xunit,(thetaz/100)*zunit+tempdist);
glEnd();
SwapBuffers(wglGetCurrentDC);
Aucun signe de dessin que ce soit. De l'aide?