in the header its declared as :
void disegna_cubo ( float height) ;
If from main i call :
disegna_cubo (10.0f);
nothing is drawn.
BUT if i change the type parameter “height” from float to int ( both in header and source --> so i have “void disegna_cubo ( int height)”) and call the function like :
disegna_cubo (10);
all works correctly.
so someone can suppose where is my fault or point me in the right direction ?
NOTE : im under mandrake 9.2 and im compiling with gcc and standard flags after putting my source files: sdl-config --cflags --libs -lSDL_net -lSDL_mixer -lGL -lm -lGLU -I/usr/X11R6/include/ -L/usr/X11R6/lib
in the header its declared as :
void disegna_cubo ( float height) ;
If from main i call :
disegna_cubo (10.0f);
nothing is drawn.
BUT if i change the type parameter “height” from float to int ( both in header and source –> so i have “void disegna_cubo ( int height)”) and call the function like :
disegna_cubo (10);
all works correctly.
so someone can suppose where is my fault or point me in the right direction ?
NOTE : im under mandrake 9.2 and im compiling with gcc and standard flags after putting my source files: sdl-config --cflags --libs -lSDL_net -lSDL_mixer -lGL -lm -lGLU -I/usr/X11R6/include/ -L/usr/X11R6/lib
thanks in advance.
Alberto Glarey[/b]
Shot in the dark but if it were interpreting 10.f as a negative number, your winding would be clockwise instead of counter clockwise.
Originally posted by honny: BUT if i change the type parameter “height” from float to int ( both in header and source –> so i have “void disegna_cubo ( int height)”) and call the function like :
Originally posted by honny:
[b]to Orzech :
no, i change only the input paramenter type function
inside the function “disegna_cubo” ( and inside ALL the rendering code ) i use glVertex3f(…)
B]
Hmmm… Does OpenGL cast from float to integer automatically?