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 :frowning: .

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

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

dinoshade example

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 .

“give error” : which error message you got exactly.

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)


but is deffrence betwean this and runned image in site.

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 :

    gluTessCallback(tobj, GLU_BEGIN, (void(*)())glBegin);
    gluTessCallback(tobj, GLU_VERTEX, (void(*)())glVertex2fv);  /* semi-tricky */

“You really need to learn how to ask for help.” why??? :slight_smile:

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 .

yeah and what about 4) ?

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

you can try to add an explicit cast if your compiler is very strict :

gluTessCallback takes a void*, not a void function. So you have to cast the function pointers to void*'s.

This post seem to describe the same problem, try this solution :

gluTessCallback(tobj, GLU_BEGIN, (_GLUfuncptr)glBegin);

wowww me thanks of you , very very thanks , your code is true and program compiled true . :slight_smile:

i must runned this program on supercomputer ,of viewpoint you is this example suitable?

and me thanks for attention .

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.