View Full Version : C++ and OpenGL

07-05-2005, 04:17 PM
Does every member variable and function need to static ? If so am I right in thinking you can only call other static members ? Does anyone know where there are some examples of using C++ with openGL, especially when giving OpenGL C++ static class member callbacks

07-05-2005, 05:06 PM
especially when giving OpenGL C++ static class member callbacksare you talking about GLUT here? Of course the methods you give glut should be static, since GLUT would need an instance of your class to call a nonstatic method (needs "this")...

This is basic programming stuff. You should be comfortable with your language before you tackle opengl... There are countless tutorials on the web. Try google.


07-05-2005, 06:48 PM
If you are starting to learn how to program using glut you can check out http://programminghq.tk/

07-05-2005, 07:04 PM
Thanks Guys,
I think the only way around this is to write a non-member function (static/global) that calls the member function in the class and pass that function to glutDisplayFunc.