Loic wrote:
> Hi All,
>
> I setup a very small test program, with a spinning cube...
> but it is absolutely not textured as expected...
Pretty sure the problem is your opengl init stuff needs
to be moved from the ctor to an if ( !valid() ) { .. } test
within the fltk draw function, eg:
----snip
void draw() {
if ( !valid() ) {
valid(1);
// YOUR OPENGL INIT STUFF GOES HERE
}
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
[..]
----snip
Some other observations:
> #include/#defines missing from your example prevent it from
compiling
> There's glPushMatrix() calls without pops; gl stack will
overflow
> Suggest using Fl::add_timeout(), etc. to do the rotation
animation
_______________________________________________
fltk-opengl mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-opengl