Original Post
ok i am new to OpenGL . I am trying to modify lesson10 from tutorials to be able load a texture specified in the file
I have 3 sectors: sector1 , sector2 , sector3
typedef struct tagSECTOR
{
int stexture; // A texture number from texture list
int numtriangles;
TRIANGLE* triangle;
} SECTOR;
Each sector is loaded with sector = SetupWorld("data\\world.txt");
However if i try to execute with different order the sector 2 actually looses texture number , but if sector2 is executed at the end than everything is ok
I have found that
glGenTextures(maxtext, &texture[texnum]);
somehow changes only sector2 parameters ,i am really stuck on this one plz help.
Here is the link to Visual C++ 6.0 source code
http://www.hot.ee/knaint/Lesson10.zip