Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: a opengl program with c++

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    7

    a opengl program with c++

    hi from me to all of dear friends

    i work on opengl and GPU programming for several month . i need to see a professional 3d code running that it run first on computer then on supercomputer ................. and 3 months search it on all of internet .............. but can't found that be executable and be very very professional (it should have shader that source light and object that have action , for example one people that gait in inclination and have shader that change with gait)


    i wish for you that help me .


  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: a opengl program with c++

    Sorry can you describe your needs more clearly, other than "do my work pleeease ?"

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    7

    Re: a opengl program with c++

    ohh i think that i don't explain completly thus i'm soory

    i not want that anybody do my work . my project is not that write a program opengl , yea i should deliver one projct that exist on internet , but this program should be very very vocation .
    i work with opengl (with c++) but i am not in level that write this program and my professor wan't that i write yea he want that i found program that be prefect and i explain it .

    this program must be 3d , for example see this

    http://www.opengl.org/resources/code.../examples.html
    dinoshade example

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    7

    Re: a opengl program with c++

    when i run this code that have for you in previous topic , of
    this two line:
    gluTessCallback(tobj, GLU_BEGIN, glBegin);
    gluTessCallback(tobj, GLU_VERTEX, glVertex2fv);

    give error. and when i delete its , it run wrong .

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: a opengl program with c++

    "give error" : which error message you got exactly.

  6. #6
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    7

    Re: a opengl program with c++

    when i run this code on my laptop give me this error :

    invalid conversion from 'void(*)(GLenum)'to void(*)()'
    initializaing argument 3 of 'void gluTessCallback(GLUtesselator*,GLenum,void(*)())'

    and when i delete this two line

    gluTessCallback(tobj, GLU_BEGIN, glBegin);
    gluTessCallback(tobj, GLU_VERTEX, glVertex2fv);
    it be run , but runned file is please see this file)


    http://www.4shared.com/file/J8XGoEQy/dinoshade.html


    but is deffrence betwean this and runned image in site.

  7. #7
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: a opengl program with c++

    You really need to learn how to ask for help.
    I just downloaded this dinoshade.c and it compiled out of the box on my linux simply with :

    gcc dinoshade.c -o dinoshade -lglut -lGL

    1) what dev environment are you using ?
    2) are you sure you set the project to C and not C++ ?
    3) with the error message there must be the exact line number where it happens, which line is that ? Besides, it is not when you run it, it is when you compile it, big difference.
    4) you can try to add an explicit cast if your compiler is very strict :
    Code :
        gluTessCallback(tobj, GLU_BEGIN, (void(*)())glBegin);
        gluTessCallback(tobj, GLU_VERTEX, (void(*)())glVertex2fv);  /* semi-tricky */

  8. #8
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    7

    Re: a opengl program with c++

    "You really need to learn how to ask for help." why????

    i want it compiled in windows .

    1- i using of dev C++ and microsoft visual stadio 2008
    2- ohhh , should i set to C ?
    3- number of same two line .

  9. #9
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: a opengl program with c++

    yeah and what about 4) ?

  10. #10
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    7

    Re: a opengl program with c++

    i compiled code with up lines but , it send same error.

Posting Permissions

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