is the code below legal?
glBindTexture(GL_TEXTURE_2D, tnum);
glBindTexture(GL_TEXTURE_2D, tnum);
(same code repeated, tnum same both times)
It crashes my program.
This occurs when I render a model that ends with texture X, then render another model that begins with texture X.
I can easily fix this by keeping a record of the currently bound texture and only calling glBindTexture when a different texture is required.
Do most GL coders use a check like this. Is this good programming style? Or is this a problem with my setup, either with the Kyro’s gl drivers, or my code, or something else. Any ideas?
Specs:
Devel: Using SDL in Visual C++ 6.0 under Windows XP.
GFX Card: Hercules 3d Prophet 4500 64mb (KyroII)
Driver (And GL driver): (3DPK-XP-14028.exe)
Thanks for all assistance
Simon Hill