Opengl probleme

Fermé
lolo621810 Messages postés 62 Date d'inscription dimanche 9 novembre 2008 Statut Membre Dernière intervention 2 décembre 2009 - 27 juil. 2009 à 11:28
Char Snipeur Messages postés 9696 Date d'inscription vendredi 23 avril 2004 Statut Contributeur Dernière intervention 3 octobre 2023 - 27 juil. 2009 à 12:17
Bonjour,
pouvez vous me dire lerreurs'il vous plait?

#ifdef __cplusplus 
#include <cstdlib> 
#else 
#include <stdlib.h> 
#endif 
#ifdef __APPLE__ 
#include <SDL/SDL.h> 
#else 
#include <SDL.h> 
#include <GL/gl.h> 
#include <GL/glu.h> 
#endif 

int main(int argc, char *argv[]) 
{ 
SDL_Init(SDL_INIT_VIDEO); 
SDL_WM_SetCaption("Mon premier programme OpenGL !",NULL); 
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL); 

bool continuer = true; 
SDL_Event event; 

while (continuer) 
{ 
SDL_WaitEvent(&event); 
switch(event.type) 
{ 
case SDL_QUIT: 
continuer = false; 
} 

glClear(GL_COLOR_BUFFER_BIT); 

glBegin(GL_TRIANGLES); 
glColor3ub(255,0,0); glVertex2d(-0.75,-0.75); 
glColor3ub(0,255,0); glVertex2d(0,0.75); 
glColor3ub(0,0,255); glVertex2d(0.75,-0.75); 
glEnd(); 

glFlush(); 
SDL_GL_SwapBuffers(); 
} 

SDL_Quit(); 

return 0; 
}

1 réponse

Char Snipeur Messages postés 9696 Date d'inscription vendredi 23 avril 2004 Statut Contributeur Dernière intervention 3 octobre 2023 1 297
27 juil. 2009 à 12:17
C'est quoi le problème ?
0