Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: C++ and OpenGL

  1. #1
    Guest

    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

  2. #2
    Guest

    Re: C++ and OpenGL

    especially when giving OpenGL C++ static class member callbacks
    are 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.


  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2005
    Posts
    116

    Re: C++ and OpenGL

    If you are starting to learn how to program using glut you can check out http://programminghq.tk/

  4. #4
    Guest

    Re: C++ and OpenGL

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •