[AllegroGL] Problem z kompilacją
Ostatnio zmodyfikowano 2010-01-29 10:14
wojownik266 Temat założony przez niniejszego użytkownika |
[AllegroGL] Problem z kompilacją » 2010-01-29 10:09:47 Czy ktoś wie dlaczego poniższy program nie chce się skompilować pod devC++ i mógłby wskazać rozwiązanie? #include <allegro.h> #include <alleggl.h> #include <GL\gl.h> #include <GL\glu.h> #include <windows.h> #include <stdlib.h> using namespace std;
struct sample_MATERIAL { GLfloat ambient[ 3 ]; GLfloat diffuse[ 3 ]; GLfloat specular[ 3 ]; GLfloat emission[ 3 ]; GLfloat alpha; GLfloat phExp; int texture; };
static sample_MATERIAL materials[ 1 ] = { { { 0.117647f, 0.117647f, 0.117647f }, { 1.0f, 0.501961f, 0.0f }, { 0.301176f, 0.301176f, 0.301176f }, { 0.0f, 0.0f, 0.0f }, 1.0f, 8.0f, - 1 } };
static BYTE face_indicies[ 1 ][ 0 ] = { GLint Gen3DObjectList() { int i; int j; GLint lid = glGenLists( 1 ); glNewList( lid, GL_COMPILE ); glBegin( GL_TRIANGLES ); for( i = 0; i < sizeof( face_indicies ) / sizeof( face_indicies[ 0 ] ); i++ ) { for( j = 0; j < 3; j++ ) { int vi = face_indicies[ i ][ j ]; int ni = face_indicies[ i ][ j + 3 ]; int ti = face_indicies[ i ][ j + 6 ]; glNormal3f( normals[ ni ][ 0 ], normals[ ni ][ 1 ], normals[ ni ][ 2 ] ); glTexCoord2f( textures[ ti ][ 0 ], textures[ ti ][ 1 ] ); glVertex3f( vertices[ vi ][ 0 ], vertices[ vi ][ 1 ], vertices[ vi ][ 2 ] ); } } glEnd(); glEndList(); return lid; }; int main() { allegro_init(); install_allegro_gl(); install_keyboard(); allegro_gl_set( AGL_Z_DEPTH, 8 ); allegro_gl_set( AGL_COLOR_DEPTH, 16 ); allegro_gl_set( AGL_SUGGEST, AGL_Z_DEPTH | AGL_COLOR_DEPTH ); set_gfx_mode( GFX_OPENGL_WINDOWED, 800, 600, 0, 0 ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glFrustum( - 1.0, 1.0, - 1.0, 1.0, 1, 60.0 ); face_indicies[ 0 ][ 0 ]; allegro_gl_flip(); readkey(); return 0; } END_OF_MAIN();
|
|
malan |
» 2010-01-29 10:14:33 #include <allegro.h> #include <winalleg.h> #include <alleggl.h> #include <GL\gl.h> #include <GL\glu.h> #include <stdlib.h>
|
|
« 1 » |