I have a very strange problem. In my init call I load a texture like this:
glBindTexture( GL_TEXTURE_2D, tex_num );
glTexImage2D( GL_TEXTURE_2D, 0, 4, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data );
Then in my render loop I do the texture bind again before gl_begin. However, the texture is gone (although tex_num has the correct value, 10).
When I put the texture loading into my main render loop everything works fine. However, this is a bad solution, since I’m loading my texture every frame and my tex_num constantly increases by one (I tested if I can access old bound textures, but they are gone which at least is consistent).
I don’t have any gldeletetextures or gldisable(gl_texture_2d) in my code. I haven’t used glgentextures at all because I shouldn’t need it (I manage my own texture names).
Does any one have a clue what’s going on? I’m at the limits of my wisdom here…