View Full Version : C++ and OpenGL
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
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, 05:48 PM
If you are starting to learn how to program using glut you can check out http://programminghq.tk/
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.