From: Paolo Farinelli (paolo++at++sgi.com)
Date: 08/05/2005 08:09:37
Hi Tansel,
I modified the simple.c sample program by adding your draw
callback, and I got the crashes you described, on win32.
After a little investigation, it turned out the problem is
in your calls to glVertex3f, which contain too many commas.
Changing:
> glVertex3f(0.0,0.0,0.0);
> glVertex3f(0.0,1,0,0.0);
> glVertex3f(1.0,0,0,0.0);
to:
> glVertex3f(0.0, 0.0, 0.0);
> glVertex3f(0.0, 1.0, 0.0);
> glVertex3f(1.0, 0.0, 0.0);
fixed the problem.
Hope this helps.
Regards,
Paolo
On Thu, 4 Aug 2005 14:42:25 -0700 (PDT), tansel halic
<tanselhalic++at++yahoo.com> wrote:
> my application crashes when i call opengl commands in
> channel traversal function.my app is running on
> windows and using opengl performer 3.2 demo
> version..code is very simple but app is
> crashing..whenever i comment out glVertex routines it
> runs ok..
>
> .
> .
> pfChanDraw(chan,PFTRAV_DRAW,testDraw);
> .
>
>
>
> void testDraw(pfChannel *chan,void *data){
>
> pfClearChan(chan);
> pfDraw();
> printf("\ndraw called");
> glMatrixMode(GL_MODELVIEW);
> glPushMatrix();
> glLoadIdentity();
> glColor3f(1.0,0.0,0.0);
> glBegin(GL_TRIANGLES);
> glVertex3f(0.0,0.0,0.0);
> glVertex3f(0.0,1,0,0.0);
> glVertex3f(1.0,0,0,0.0);
> glEnd();
> glPopMatrix();
>
> }
>
-- Paolo Farinelli <paolo++at++sgi.com> Open GL Performer - Silicon Graphics Inc.
This archive was generated by hypermail 2b29 : Fri Aug 05 2005 - 08:04:55 PDT