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
    22

    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.

Similar Threads

  1. Passing Parameters To Callback Functions?
    By larryl in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 01-29-2017, 09:20 AM
  2. Passing parameters to display function in GLUT
    By Orion801 in forum OpenGL: General
    Replies: 4
    Last Post: 10-17-2010, 11:41 AM
  3. Global writable parameters passing
    By jbasic in forum OpenCL
    Replies: 4
    Last Post: 10-10-2009, 11:20 AM
  4. glVertexPointer(parameters)?
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-01-2001, 06:19 AM
  5. texture parameters vs. texture-unit parameters
    By Pentagram in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 02-28-2001, 09:56 AM

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