Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1556 connectés 

 


Dernière réponse
Sujet : [openGL] pourquoi mon petit prog marche pas ?
bjone c marrant, je me posais exactement la même question, savoir si le glut fait le swap tout seul :D

Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
bjone c marrant, je me posais exactement la même question, savoir si le glut fait le swap tout seul :D
chrisbk ca manque sacrement de glutSwapBuffers tout ca
airseb up
airseb up  :(
airseb la fenêtre n'affiche rien !  :cry:  
 
#include <GL/glut.h>
#include <stdlib.h>
 
 
void display (void)
{
 
 glClearColor (0.0, 0.0, 0.0, 0.0) ;
 glClear (GL_COLOR_BUFFER_BIT) ;
 glColor3f (1.0, 1.0, 1.0) ;
 glOrtho (0.0, 1.0, 0.0, 1.0, -1.0, 1.0) ;
  glBegin (GL_POLYGON) ;
   glVertex3f ( 0.25, 0.25, 0.0 ) ;
   glVertex3f ( 0.75, 0.25, 0.25) ;
   glVertex3f ( 0.75, 0.75, 0.25) ;
   glVertex3f ( 0.25, 0.75, 0.0 ) ;
  glEnd () ;
 glFlush () ;
}
 
 
 
 
int main (int argc, char** argv)
 
{
 glutInit (&argc, argv) ;
 glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH) ;
 glutInitWindowSize (640, 480) ;
 glutInitWindowPosition (250,250) ;
 glutCreateWindow (argv [0]) ;
 glutDisplayFunc (display) ;
 glutMainLoop () ;
 return 0 ;
}

 

[jfdsdjhfuetppo]--Message édité par airseb--[/jfdsdjhfuetppo]


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR