Texture corruption - Detonator bug?

In my GLUT app I use a 2048x2048 texture. If I switch from windowed to fullscreen and then back to windowed the texture gets corrupted. Heres an example
http://planet3d.demonews.com/Glut.JPG
The top left corner(1024x1024) is fine.

All I do is call glutFullScreen() for fullscreen and
glutPositionWindow(Storedx,Storedy)
glutReshapeWindow(Storedwidth,Storedheight)
to get back to windowed mode.

This problem only occurs if running at a resolution above 1024x768.

At 1024x768 and below I can switch between fullscreen and windowed as much as I want with no problems.

Does this look like a driver bug or am I doing something wrong?

I am using detonators 12.2 on a geforce2.

[This message has been edited by Adrian (edited 06-09-2001).]

I think when you change modes like that in GLUT, you’ll be losing your GL settings – like display lists, textures, matrix stacks, etc. You’ll probably need to re-initialize them. It’s possible they’ll still work even without re-initializing, but anything going to the card may end up stepping on them eventually (like video ram allocations)…

If you ARE re-initializing, then I dunno…

I was reinitialising but it meant a few seconds delay between switching modes. What gets me is that this problem is dependent on screen resolution. To me this points to either a bug in GLUT or drivers rather than a feature of glutfullscreen. I’ve looked at the spec and found no mention of needing to reinitialise.

You’ve looked at the GLUT spec and it doesn’t say to re-init? Try this: do a glGenLists(1) and see if you get a new number or if it starts to re-use old ones. If it’s starts back at 1, then you know the GL has lots its states.

I went through this with a non-GLUT system and had to re-init everything. I could swear that I read something about losing the GL state in regards to GLUT, but that might be in relation to the exit function.

Just tried that and the returned number keeps incrementing.

Hmm… interesting. I guess “fullscreen” is more akin to resizing a window than recreating it.

While we’re on the topic of GLUT, I’ve seen on the Mac (as part of their openGL 1.2.1 release) a very comprehensive and up-to-date GLUT reference PDF. The best I can do on the PC is the horribly outdated “glut 3 spec”. Do you know where I could find a version of that reference PDF that’s NOT part of the mac openGL distribution?

To tie up this loose end…
I upgraded from an ELSA GF2 to an ELSA GF3 and the problem disappeared, I am using the same drivers. So looks like it was hardware and not driver related.

MV I dont have the full spec for GLUT, I only found a page specific to glutfullscreen.

While Im here, any one know why
glutGet(GLUT_WINDOW_DEPTH_SIZE)
is returning 16 bits on my GF3, when running identical code on a GF2 and radeon it returns 24. My demo needs a 24 bit z buffer. Could it be to do with the zbuffer compression the gf3 uses?