
I would like to write a program that does the following: 1. Create a TextureName for later use 2. Initialize GLUT and GL routines, creating a window 3. Draw something using the TextureName of step 1 Unfortunately, creating the TextureName seems not to work if no window was created. The program above will draw an empty polygon where it should have drawn a texture filled polygon. If I change step 1 by 2 (and vice-versa) the program works well, but this is not exactly what I want. Does anyone know why this happen? (in other words, why must a window be opened BEFORE I start do deal with a TextureName?) -- Andre

Andre W B Furtado wrote:
[...] in other words, why must a window be opened BEFORE I start do deal with a TextureName?
Hmmm, GL stuff should be completely independent from GLUT, so it should work either way. Furthermore, generating a texture name simply reserves an integer internally (at least in Mesa and SI) and has nothing to do with windows at all. Could you send me a *small* test program and some info about your setup? Cheers, S.

Hmmm, GL stuff should be completely independent from GLUT, so it should work either way. Furthermore, generating a texture name simply reserves an integer internally (at least in Mesa and SI) and has nothing to do with windows at all. Could you send me a *small* test program and some info about your setup?
Ok, here you have it (attached). In this program, I create two TextureNames: one before creating the window ("texBefore") and another after creating the window ("texAfter"). When I call the same function to draw both textures, only "texAfter" is drawn. -- Andre
participants (2)
-
Andre W B Furtado
-
Sven Panne