Problems with DrawChannel and MultiProcess

New Message Reply Date view Thread view Subject view Author view

Sibylle Steck (sib++at++kyb.tuebingen.mpg.de)
Fri, 5 Feb 1999 18:07:30 +0100


Hi pfAll,

I have a problem with writing pixels of an image to the frame buffer. In the
single process mode I can see the picture (which is draw with glDrawPixels) and
also a message (which is draw with pfuDrawMessage). In the multiprocess mode I
see only the message and the pictures is only a black hole.

Any help would be appreciated,
thanks for your time.

Greetings
Sibylle Steck

P.S.: I have my DrawChannel function attached

-- 
-----------------------------------------------------------

_/ _/ _/_/_/ _/_/_/ Sibylle Steck _/_/ _/_/ _/ _/ _/ Max-Planck Institut f"ur _/ _/ _/ _/_/_/ _/ biologische Kybernetik _/ _/ _/ _/ Spemannstrasse 38 _/ _/ _/ _/_/_/ 72076 T"ubingen, Germany

phone: +49-7071-601 630 fax : +49-7071-601 616 web : www.kyb.tuebingen.mpg.de email: sibylle.steck++at++tuebingen.mpg.de -----------------------------------------------------------

/*******************************************/ static void DrawChannel (pfChannel *channel, void *) /*******************************************/ { //static pfMatrix idmat; static pfMatrix tempmat; static int first = 0; int ind = 500;

// cursor invisible if(!first) { pfuCursor(pfuGetInvisibleCursor(),ind); pfuLoadPWinCursor(Shared->pw,ind); first = 1; } // rebind light so it stays fixed in position pfLightOn(Sun);

// erase framebuffer and draw Earth-Sky model pfClearChan(channel);

// invoke Performer draw-processing for this frame pfDraw(); /* 3D graphics */

glDepthFunc(GL_ALWAYS); glDepthMask(GL_FALSE); pfPushState(); pfBasicState(); glTranslatef(Shared->view.xyz[0], Shared->view.xyz[1], 0.0f); glRotatef(Shared->view.hpr[0], 0.0f, 0.0f, 1.0f);

pfPopState(); glDepthFunc(GL_LEQUAL); glDepthMask(GL_TRUE);

/* end 3D graphics */

// 2D graphics

glDepthFunc(GL_ALWAYS); // Tiefenvergleich, default less, malt immer glDepthMask(GL_FALSE); // schreiben in z-buffer, disabled (FALSE) pfPushState(); // pfBasicState(); pfTransparency(PFTR_HIGH_QUALITY); glGetFloatv(GL_PROJECTION_MATRIX, (GLfloat *)tempmat); // get PROJECTION_MATRIX glMatrixMode(GL_PROJECTION); // umschalten zwischen Projektions- Viewport-, // und Modellviewport Matrix glLoadMatrixf((GLfloat *)idmat); glOrtho(-1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f); // orthogonal projektion glMatrixMode(GL_MODELVIEW); // Observer Viewpoint pfPushMatrix(); pfLoadMatrix(idmat); // set pixel storage modes // glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //1, (32 bit),4,8 aendert nichts

//Draw grey rectangle glColor3ub(70,70,70); glRectf(-1.0f, -1.0f, 1.0f, 1.0f);

// Draw Picture glRasterPos2f(0.15f,-0.25f); glDrawPixels(IMAGESIZE, IMAGESIZE, GL_RGB, GL_UNSIGNED_BYTE, Picture[Shared->showR]); glRasterPos2f(-0.95f,-0.25f); glDrawPixels(IMAGESIZE, IMAGESIZE, GL_RGB, GL_UNSIGNED_BYTE, Picture[Shared->showL]);

// Draw Text on Screen pfuDrawMessage(NULL, "Welches Objekt liegt hoeher?", PFU_MSG_PIPE, PFU_CENTER_JUSTIFIED, 0.5f, 0.1f, PFU_FONT_MED, PFU_RGB); if(Shared->blank) { //Draw grey rectangle glColor3ub(70,70,70); glRectf(-1.0f, -1.0f, 1.0f, 1.0f); }

pfPopMatrix(); glMatrixMode(GL_PROJECTION); glLoadMatrixf((GLfloat *)tempmat); glMatrixMode(GL_MODELVIEW); pfPopState(); glDepthFunc(GL_LEQUAL); /* the default */ glDepthMask(GL_TRUE); // read window origin and size (it may have changed) pfGetPWinSize(pfGetChanPWin(channel), &Shared->winSizeX, &Shared->winSizeY); }


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Feb 05 1999 - 09:07:39 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.