Results 1 to 3 of 3

Thread: Function pointers

  1. #1
    Member Newbie
    Join Date
    Jul 2001
    Location
    Tokyo
    Posts
    40

    Function pointers

    Hi,

    Sorry this question is probably more of a general programming question, but I guess many people had the same problem like me when using glut callbacks:

    I would like to create objects that wrap every single glut window. This means that I would like to create the glut window inside the constructor of an object and have separate callback-routines for every window.

    How can I specify a callback routine which isn't static??

    Please help me 'cause I'm on that problem for a few days already!!!?!

    Thanks

  2. #2
    Member Contributor
    Join Date
    Feb 2001
    Posts
    89

    Re: Function pointers

    You could use arrays of pointers to the callbacks... that's how the scripting system was done in Descent 3. Kinda nifty, really
    -pATCheS

  3. #3
    Member Newbie
    Join Date
    Jul 2001
    Location
    Tokyo
    Posts
    40

    Re: Function pointers

    You're right, but that's not really an elegant solution... Sure there's no other way??

Similar Threads

  1. Why are extensions available as function pointers?
    By marathon in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-01-2012, 11:20 AM
  2. Replies: 0
    Last Post: 03-21-2009, 05:50 PM
  3. extensions: function pointers
    By akuda in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 04-03-2006, 07:03 PM
  4. Pbuffer and extension function pointers..
    By PfhorSlayer in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 06-19-2005, 10:25 AM
  5. Function to get extension function pointers?
    By Lev in forum OpenGL: macOS
    Replies: 4
    Last Post: 10-28-2002, 11:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean