Probleme execution sous visual avec GLut

kcrik Messages postés 2 Date d'inscription mardi 15 avril 2008 Statut Membre Dernière intervention 23 avril 2008 - 23 avril 2008 à 01:28
kcrik Messages postés 2 Date d'inscription mardi 15 avril 2008 Statut Membre Dernière intervention 23 avril 2008 - 23 avril 2008 à 19:27
Bonjour,
Voila j'ai un soucis avec un programme utilisant glut sous visual.
J'ai fait tous les linkages necessaires, toutes les bibliotheques sont biens presentes.
J'ai ecris des prog openGl n'utilisant pas glut, tout marche impec.
et hop avec glut, il y a des problemes a l'execution.

La premiere execution il trouvait pas opengl.dll, je l'ai mis, resolu. Mais apres c'est une autre dll qu'il trouvait pas a l'execution, je l'ai mise aussi, resolu, et ca a recommence avec ipl.dll, qui est impossible a trouver en telechargement, et je peux pas continuer a l'infini a rajouter des libs. donc voila je comprends pas, je vous copie le code.
Merci d'avance pour toute aide.

/*
 * Copyright (c) 1993-1997, Silicon Graphics, Inc.
 * ALL RIGHTS RESERVED
 * Permission to use, copy, modify, and distribute this software for
 * any purpose and without fee is hereby granted, provided that the above
 * copyright notice appear in all copies and that both the copyright notice
 * and this permission notice appear in supporting documentation, and that
 * the name of Silicon Graphics, Inc. not be used in advertising
 * or publicity pertaining to distribution of the software without specific,
 * written prior permission.
 *
 * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
 * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
 * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
 * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
 * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
 * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
 * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
 * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
 * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
 * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 * US Government Users Restricted Rights
 * Use, duplication, or disclosure by the Government is subject to
 * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
 * (c)(1)(ii) of the Rights in Technical Data and Computer Software
 * clause at DFARS 252.227-7013 and/or in similar or successor
 * clauses in the FAR or the DOD or NASA FAR Supplement.
 * Unpublished-- rights reserved under the copyright laws of the
 * United States.  Contractor/manufacturer is Silicon Graphics,
 * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
 *
 * OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
 */

/*
 * hello.c
 * This is a simple, introductory OpenGL program.
 */
#include <GL/glut.h>

void display(void)
{
/* clear all pixels  */
   glClear (GL_COLOR_BUFFER_BIT);

/* draw white polygon (rectangle) with corners at
 * (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0) 
 */
  
   glBegin(GL_POLYGON);
   glColor3f (1.0, 1.0, 1.0);
      glVertex3f (0.25, 0.25, 0.0);
      glVertex3f (0.75, 0.25, 0.0);
      glVertex3f (0.75, 0.75, 0.0);
      glVertex3f (0.25, 0.75, 0.0);
   glEnd();

/* Swap the buffers to show the one
 * on which we writed
 */
   glutSwapBuffers();
}

void init (void)
{
/* select clearing color     */
   glClearColor (0.0, 1.0, 0.0, 0.0);

/* initialize viewing values  */
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}

/*
 * Declare initial window size, position, and display mode
 * (double buffer and RGB).  Open window with "hello"
 * in its title bar.  Call initialization routines.
 * Register callback function to display graphics.
 * Enter main loop and process events.
 */
int main(int argc, char** argv)
{
   glutInit(&argc, argv);
   glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
   glutInitWindowSize (250, 250);
   glutInitWindowPosition (100, 100);
   glutCreateWindow ("hello");
   init ();
   glutDisplayFunc(display);
   glutMainLoop();
   return 0;   /* ANSI C requires main to return int. */
}

2 réponses

luhtor Messages postés 2023 Date d'inscription mardi 24 septembre 2002 Statut Membre Dernière intervention 28 juillet 2008 6
23 avril 2008 à 17:39
Il n'y a aucun problème avec glut et visual. Le pb doit venir de la configuration de ton Visual, de tes variables d'envirronnement, de ta version de glut. Il n'y a rien de spécial a faire pour faire fonctionner glut.
0
kcrik Messages postés 2 Date d'inscription mardi 15 avril 2008 Statut Membre Dernière intervention 23 avril 2008
23 avril 2008 à 19:27
Salut, deja merci pour ta reponse.
Mais j'ai deja plusieurs fois essayer de reinstaller glut, mais ca n'a rien changer.
Donc je comprends vraiment pas ce qui va pas, alors que mon visual est impeccable, il marche parfaitement pour le reste.

Tu me conseilles de reessayer avec un autre glut ??? ( encore)

++
0
Rejoignez-nous