Thread: OpenGL Framework C++

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    15

    OpenGL Framework C++

    Apologies if this is really obvious but I have tried a google search for an answer but can't seem to find one.

    What I essentially want to do is define a class say MainApp, which would control the program execution with a set of methods such as MainApp::draw(), MainApp::update() and MainApp::resize() which would draw and handle mouse and keyboard input and changes to the window. I've only ever set up OpenGL using the glutDisplayFunc(display), glutKeyboardFunc(keyboard), and glutReshapeFunc(reshape) functions in main() and don't know how to move these into class methods?

    I did find some frameworks available but they seemed to be more functions to control OpenGL and not a class in their own right.
    Any help would be much appreciated.

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    Not quite sure what you are getting at but i would offer FLTK - It provides a good context for openGL / GLUT with the ability to subclass the library's built in GL support, basically you can roll your own, check the docs to see if it is what you are looking for.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    48
    It sounds more like you need something like SFML, which you can see in action in this tutorial.

    It's a 2D game engine, built over top of OpenGL.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C# without .NET framework
    By heisel in forum C# Programming
    Replies: 2
    Last Post: 10-04-2009, 01:37 PM
  2. .net framework
    By mixalissen in forum C# Programming
    Replies: 3
    Last Post: 05-28-2008, 11:44 AM
  3. Net Framework
    By Hugo716 in forum C++ Programming
    Replies: 2
    Last Post: 05-18-2006, 02:05 PM
  4. A C++ GUI Framework
    By jinhao in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-11-2005, 06:34 AM
  5. Old ASP on PC with Framework
    By ginoitalo in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-12-2002, 08:41 PM