InitGL

InitGL fails on my friends computer when he runs and exe I made. What does this mean? Does he not have drivers for OpenGL?

Thanks

If the openGL “demo” you try to run on your friends computer has some textures involved, then be sure to put the textures in the directory you refer to in your source code… I’m a newbie, but I hope this could help =)

InitGL is not a standard OpenGL-function, so I guess it’s a function you have coded yourself. One problem could be that you don’t have any OpenGL-context created. But as you said it, i suppose it works for you, and if it works for you, you must have created a context before InitGL (as you should do). However, do you have any code for dealing with the fact that wgl*() fails to create a context? This can also be the problem. You don’t get any context, but the program still keeps running. So yes, drivers can be a possible problem. Newest drivers are always nice to have.

You’re right. I was using code from NeHe, and saw this returned an error and assumed it was part of OpenGL. I’ll have to go home and see what functions InitGL calls…

I say it’s your windows Proc functions…

It seems that init is called before the render contexts where made… this will always fail…

It’s all in the winproc … make sure you step through your code through a debugger… you’ll pick this up… In fact i have picked this up so many times it’s not funny…

Usually through code other people have made… You know, just download it, compile and run, but dosn’t work hey… It’s always the winproc…