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: passing parameters in VC++

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    1

    passing parameters in VC++

    I have just started using opengl with visual C++ 6, I cannot pass parameters to functions called from glutDisplayFunc(), please help me out

  2. #2
    Junior Member Newbie Optik's Avatar
    Join Date
    Jun 2009
    Location
    Los Angeles, CA
    Posts
    23

    Re: passing parameters in VC++

    I cannot understand what your exact question is but assuming you want to know how to register a display callback function here is my reply:

    Say you have a function Render() in which you write the rendering related code. This function is called whenever you want to render into the frame buffer.

    In order to register this function ( Or tell glut that this is the function to be called whenever the scene has to be rendered) you have to pass the function as a parameter to the glutDisplayFunc()

    ie: glutDisplayFunc(Render);

    hope this answers your query.

Posting Permissions

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