|
From: Ricardo O. <ro...@gl...> - 2001-09-28 10:37:51
|
I have a problem, I only can load textures in the display method, or in the init, my aplication read a file with urls of images, and I want to load them when I read the text file, but I can't, it says me: "GLUT : Warning in (unamed): GL error: operation not valid" when I try to execute: TextureLoader texLoader = new AWTTextureLoader(this,gl,glu); If I execute this in the display function it works ok. My question is: Only can execute this function inside display function and init function? I try to do this in the KeyPressed function, and I have the same problem. If I change the parameters,like :"gl.glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);" in the KeyPressed function This don't take effect. I change a variable in Keypressed, and in display function I put the same code, and works, I think it's the same problem, I only can do things of opengl in Init or in display, it's correct? Have this a solution? Thank you |