Opengl probleme
lolo621810
Messages postés
72
Statut
Membre
-
Char Snipeur Messages postés 10112 Date d'inscription Statut Contributeur Dernière intervention -
Char Snipeur Messages postés 10112 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
pouvez vous me dire lerreurs'il vous plait?
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;
}
A voir également:
- Opengl probleme
- Opengl 3.3 download windows 10 64 bit - Forum Graphisme
- Opengl 2.1 download - Forum Logiciels
- Comment mettre a jour openGL 2.1 --> 3.3 ✓ - Forum Carte graphique
- Opengl 2.0 download windows 10 64 bit ✓ - Forum Windows 8 / 8.1
- Ma carte vidéo de base Microsoft ne supporte pas opengl 2.0, comment corriger ?? - Forum Pilotes (drivers)