| |||||
FORUM HardWare.fr

Programmation

[open gl] je ne comprend pas mes erreurs pour ma geosphère (tjs pas)| Dernière réponse | |
|---|---|
| Sujet : [open gl] je ne comprend pas mes erreurs pour ma geosphère (tjs pas) | |
| airseb | c t juste une erreur de virgule :p :D |
| Aperçu |
|---|
| Vue Rapide de la discussion |
|---|
| airseb | c t juste une erreur de virgule :p :D |
| apolon34 | c'est quoi ton compilo ??
ses messages d'erreurs sont....comment dire .... terriblement explicites!! :lol: |
| airseb | up |
| airseb | c bon yavait deux virgules consécutives dans mon tableau :p par contre on voit rien, quelqu'un pourrait m'aider pour la caméra et glortho ? |
| airseb | Compiling...
Geosphere.cpp D:\programmation\[Mes programmes Open GL\Geosphere.cpp(13) : error C2059: syntax error : ',' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(16) : error C2065: 'tableau_entrelace' : undeclared identifier D:\programmation\[Mes programmes Open GL\Geosphere.cpp(16) : error C2501: 'glInterleavedArrays' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(16) : error C2373: 'glInterleavedArrays' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1294) : see declaration of 'glInterleavedArrays' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(16) : error C2078: too many initializers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(21) : error C2501: 'glPolygonMode' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(21) : error C2373: 'glPolygonMode' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1352) : see declaration of 'glPolygonMode' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(21) : error C2078: too many initializers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(22) : error C2501: 'glFrontFace' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(22) : error C2373: 'glFrontFace' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1247) : see declaration of 'glFrontFace' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(23) : error C2501: 'glEnable' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(23) : error C2373: 'glEnable' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1224) : see declaration of 'glEnable' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(24) : error C2501: 'glCullFace' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(24) : error C2373: 'glCullFace' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1209) : see declaration of 'glCullFace' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(26) : error C2501: 'glDrawElements' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(26) : error C2373: 'glDrawElements' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1219) : see declaration of 'glDrawElements' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(26) : error C2078: too many initializers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(26) : error C2440: 'initializing' : cannot convert from 'unsigned int [20][3]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast D:\programmation\[Mes programmes Open GL\Geosphere.cpp(28) : error C2556: 'int __cdecl glutSwapBuffers(void)' : overloaded function differs only by return type from 'void __stdcall glutSwapBuffers(void)' d:\visual c++\include\gl\glut.h(513) : see declaration of 'glutSwapBuffers' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(28) : error C2373: 'glutSwapBuffers' : redefinition; different type modifiers d:\visual c++\include\gl\glut.h(513) : see declaration of 'glutSwapBuffers' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(29) : error C2556: 'int __cdecl glFlush(void)' : overloaded function differs only by return type from 'void __stdcall glFlush(void)' d:\visual c++\include\gl\gl.h(1242) : see declaration of 'glFlush' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(29) : error C2373: 'glFlush' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1242) : see declaration of 'glFlush' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(30) : error C2143: syntax error : missing ';' before '}' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(30) : error C2143: syntax error : missing ';' before '}' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(30) : error C2143: syntax error : missing ';' before '}' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(38) : error C2143: syntax error : missing ';' before '{' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(38) : error C2447: missing function header (old-style formal list?) Error executing cl.exe. Geosphere.exe - 27 error(s), 0 warning(s) g juste changer ce que tu m'as dis :( |
| youdontcare | spécifiquement ? |
| airseb | ...mais ça marche tjs pas :( |
| airseb | merci :D |
| youdontcare |
#define X 0.52...
these are ... |
| airseb | #include <GL/glut.h>
#include <stdlib.h> const float X= 0.525731112119133606 ; const float Z= 0.850650808352039932 ; void display () { static GLfloat tableau_entrelace [] = {1.0, 1.0, 1.0, -X, 0.0, Z, 1.0, 1.0, 1.0, X, 0.0, Z, 1.0, 1.0, 1.0, -X, 0.0, -Z,1.0, 1.0, 1.0, X, 0.0, -Z, 1.0, 1.0, 1.0, 0.0, Z, X, 1.0, 1.0, 1.0, 0.0, Z, -X, 1.0, 1.0, 1.0, 0.0, -Z, X, 1.0, 1.0, 1.0, 0.0, -Z, -X, 1.0, 1.0, 1.0, Z, X, 0.0, 1.0, 1.0, 1.0,, -Z, X, 0.0,1.0, 1.0, 1.0, Z, -X, 0.0, 1.0, 1.0, 1.0, -Z, -X, 0.0} ; glInterleavedArrays (GL_C3F_V3F, 0, tableau_entrelace) ; static GLuint indices [20][3]= {1,4,0,4,9,0,4,5,9,8,5,4,1,8,4,1,10,8,10,3,8,8,3,5,3,2,5, 3,7,2,3,10,7,10,6,7,6,11,7,6,0,11,6,1,0,10,1,6,11,0,9,2,11,9,5,2,9,11,2,7}; glPolygonMode (GL_FRONT, GL_LINE) ; glFrontFace (GL_CCW) ; glEnable (GL_CULL_FACE) ; glCullFace (GL_BACK) ; glDrawElements (GL_TRIANGLES, 60, GL_UNSIGNED_BYTE, indices) ; glutSwapBuffers() ; glFlush () ; } void main (int argc, char** argv) { glutInit (&argc, argv) ; glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH) ; glutInitWindowSize (640, 480) ; glutInitWindowPosition (250,250) ; glutCreateWindow (argv [0]) ; glClearColor (0.0, 0.0, 0.0, 0.0) ; glClear (GL_COLOR_BUFFER_BIT) ; glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(25.0 , -20.0, 20.0, -20.0, -10.0, 16.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glutDisplayFunc (display) ; glutMainLoop () ; } this is the errors: Compiling... Geosphere.cpp D:\programmation\[Mes programmes Open GL\Geosphere.cpp(14) : error C2059: syntax error : ',' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(17) : error C2065: 'tableau_entrelace' : undeclared identifier D:\programmation\[Mes programmes Open GL\Geosphere.cpp(17) : error C2501: 'glInterleavedArrays' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(17) : error C2373: 'glInterleavedArrays' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1294) : see declaration of 'glInterleavedArrays' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(17) : error C2078: too many initializers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(22) : error C2501: 'glPolygonMode' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(22) : error C2373: 'glPolygonMode' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1352) : see declaration of 'glPolygonMode' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(22) : error C2078: too many initializers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(25) : error C2501: 'glDrawElements' : missing storage-class or type specifiers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(25) : error C2373: 'glDrawElements' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1219) : see declaration of 'glDrawElements' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(25) : error C2078: too many initializers D:\programmation\[Mes programmes Open GL\Geosphere.cpp(25) : error C2440: 'initializing' : cannot convert from 'unsigned int [20][3]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast D:\programmation\[Mes programmes Open GL\Geosphere.cpp(27) : error C2556: 'int __cdecl glutSwapBuffers(void)' : overloaded function differs only by return type from 'void __stdcall glutSwapBuffers(void)' d:\visual c++\include\gl\glut.h(513) : see declaration of 'glutSwapBuffers' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(27) : error C2373: 'glutSwapBuffers' : redefinition; different type modifiers d:\visual c++\include\gl\glut.h(513) : see declaration of 'glutSwapBuffers' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(28) : error C2556: 'int __cdecl glFlush(void)' : overloaded function differs only by return type from 'void __stdcall glFlush(void)' d:\visual c++\include\gl\gl.h(1242) : see declaration of 'glFlush' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(28) : error C2373: 'glFlush' : redefinition; different type modifiers d:\visual c++\include\gl\gl.h(1242) : see declaration of 'glFlush' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(29) : error C2143: syntax error : missing ';' before '}' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(29) : error C2143: syntax error : missing ';' before '}' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(29) : error C2143: syntax error : missing ';' before '}' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(42) : error C2143: syntax error : missing ';' before '{' D:\programmation\[Mes programmes Open GL\Geosphere.cpp(42) : error C2447: missing function header (old-style formal list?) Error executing cl.exe. Geosphere.exe - 21 error(s), 0 warning(s) |


