PDA

View Full Version : Temporary controls drawing...



npandya
01-10-2001, 05:46 PM
Hi,

In my application I want to draw some temporary controls over a scene to give an example say marquee rectangle. I can not use overlay context since I do not have one.

Also, I am in a RGBA mode hence I can not use glLogicOp(GL_INVERT) to erase the drawn control.

Is there any function or combination of gl functions which will give me same effect as glLogicOP(GL_INVERT) ?

Is is there any other way to acheive the same effect as smooth marquee rectangle without using overlay context and in RGBA mode ?

Thanks in advance,
Nitin

Serge K
01-10-2001, 09:48 PM
Also, I am in a RGBA mode hence I can not use glLogicOp(GL_INVERT) to erase the drawn control.


No, you can - since OpenGL 1.1 : Logical Operation (http://trant.sgi.com/opengl/docs/Specs/glspec1.1/node101.html)

glEnable( GL_COLOR_LOGIC_OP );

P.S
I guess, you are using M$DN SDK - right?
Well, its part about glLogicOp is kind of outdated.

[This message has been edited by Serge K (edited 01-10-2001).]

npandya
01-11-2001, 12:01 AM
I can not use it since I am developing my control for Mac and they have their own implementation.



Originally posted by Serge K:
No, you can - since OpenGL 1.1 : Logical Operation (http://trant.sgi.com/opengl/docs/Specs/glspec1.1/node101.html)

glEnable( GL_COLOR_LOGIC_OP );

P.S
I guess, you are using M$DN SDK - right?
Well, its part about glLogicOp is kind of outdated.

[This message has been edited by Serge K (edited 01-10-2001).]

Serge K
01-11-2001, 12:10 AM
What??? http://www.opengl.org/discussion_boards/ubb/eek.gif
Are you saing that Apple still has OpenGL 1.0? http://www.opengl.org/discussion_boards/ubb/confused.gif (which is "dead" long time by now)

But if you mean - "can not use SDK" - No, you can.
You can use MSDN online SDK as OpenGL API reference (except Win specific WGL functions - on the Mac you have to use AGL functions instead).

[This message has been edited by Serge K (edited 01-11-2001).]

npandya
01-11-2001, 08:16 PM
Thanks for your help Serge...
I was able to make it work.