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 2 of 2

Thread: How to use Callback fuction in gluTessCallback?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    zhenjiang,jiangsu,China
    Posts
    5

    How to use Callback fuction in gluTessCallback?

    Using Visual C++ 6.0, I attempted to compile a tessellation example with texturing. I am using the Visual C++ 6.0 compiler. When it tries to compile a gluTessCallback(tobj, GLU_TESS_VERTEX, (void (CALLBACK *)())Vertex ) statement, I get an error :
    "error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'void (void *)' to 'void (__stdcall *)(void)'
    None of the functions with this name in scope match the target type"
    here,"Vertex" in the statement is a Callback function defined by me:
    void CSceneView::Vertex(void *xyz)
    {
    glTexCoord2dv((double*)xyz + 3);
    glVertex3dv((double*)xyz);
    }

    The same code will compile and run fine using the C compiler. Has anyone encountered this problem? Please help me!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    857

    Re: How to use Callback fuction in gluTessCallback?

    Moving to beginners forum...

    -- Tom

Posting Permissions

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