Running linux debian w/ Qt: Thru google I finally found the following C++ example code for tesselation callbacks but:
1) if I use "CALLBACK" in the function heading - it fails not knowing "CALLBACK" - is there something I need to include in the header file for this?
2) without "CALLBACK" it fails with parse error before "{"
any ideas ?

This allows you to compile your code on both Windows & Unix. If you want only Unix - get off CALLBACK from your function header

07-26-2004, 04:41 AM

thks for info:
using ifndef seems to solve header issues but callbacks are still not working(see below) - using openGL in C++ is turning into a real struggle - couldn't find any good C++ tesselation examples in google

glpanel.cpp:617: error: ISO C++ forbids taking the address of an unqualified
non-static member function to form a pointer to member function. Say `&
GLPanel::vertexCallback'
glpanel.cpp:617: error: converting from `void (GLPanel::*)(GLvoid*)' to `GLvoid

ville

07-26-2004, 10:32 PM

sage,

Check out the following if you don't fancy implementing functors on your own.

function pointer (http://www.function-pointer.org/)

boost (http://www.boost.org/libs/libraries.htm#Function-objects)

// ville

07-27-2004, 05:20 AM

Ville,
thks for 2 very informative links. The problem is here I just don't have the time to spend 2 weeks on exploring function pointers and figuring out how to simply draw a colored polygon. Is there a "Boost type" library for OpenGL so I don't have to spend days writing functions to draw texture fonts, polygons, curves, etc ?

07-27-2004, 05:48 PM

there is no way to send a non-static member function as a callback. just make the function static.