Andy Bailey (andrew++at++csunb0.leeds.ac.uk)
Fri, 16 Jul 1999 15:45:51 +0000
I posted something yesterday, but got no replies, but open reading the
last message again, I know it was a little garbled and I did not really
know what I was talking about! Basically I am having problems drawing on
overlay over the scene. All I need to do is draw a small red square in
the centre of the window, and I need it as an overlay, i.e. the scene is
still being updated behind it. It does not need to be transparent or
anything like that, just a simple red square. That is my first problem.
How do I draw a red square? The second problem is getting the overlay to
work. I think I am setting it up correctly with the following code...
ViewState->pw = new pfPipeWindow(pfGetPipe(0));
ViewState->pw->setName("Main window");
ViewState->pw->setWinType(PFPWIN_TYPE_X);
ViewState->pw->setMode(PFWIN_HAS_OVERLAY, PF_ON);
ViewState->pw->setOriginSize(350, 350, 350, 350);
ViewState->pw->open();
I just want to use the default overlay setup.
The draw callback looks like this...
ViewState->pw->setIndex(PFWIN_OVERLAY_WIN);
ViewState->pw->select();
SQUARE TO BE DRAWN HERE!
ViewState->pw->setIndex(PFWIN_GFX_WIN);
ViewState->pw->select();
pfDraw();
Is this correct? If the code is correct, my main problem is
understanding how to draw the red square in the overlay window. If
anyone can help me out with suggestions or even some code fragments as I
don't think it should be this hard! I would be very grateful.
thanks,
Andrew
This archive was generated by hypermail 2.0b2 on Fri Jul 16 1999 - 07:49:24 PDT