GLUT & Preloading Images

Hey,

I am trying preload images before I enter into game mode in GLUT. Right now it works if I load the images after I enter the game mode, but if I load (by that I mean bind) them before I enter game mode THEN I get non-textured white geometry. It is really annoying.

Thanks,

PDM

sounds to me like you’re trying to bind your textures without acquiring your rendering context first. I believe that most gl calls will fail if you don’t have your RC, and your textures will be empty, or at least full of last night’s leftovers.

Dave

How do I acquire the rendering context that I have and pass it into the game mode? I would have thought that glutEnterGameMode() would have taken care of that for me.

damn, i should have paid more attention to the title of your thread, especially the GLUT part…

I’ve never used GLUT, so I’m probably not the best person to answer this, but I think it’s safe to say that the glutGame function is handling all of that for you.

Unless you can somehow acquire the RC manually through GLUT, I’m thinking you’ll probably have to do all the loading after you enter the game mode. Is this really a problem, though? Can you just throw some “Loading” artwork/text during the process?

Dave