PDA

View Full Version : performing light enable / disable behind a texture



kashif saeed
06-24-2003, 10:55 PM
hello friends
i am presently working in an application which uses textures. i have a texture of
a button (press button to have ON/OFF select) it has a small transparent circle
inside through which light is visible ( of any color,say RED) which shows the status of button
that it is ON. when it is pressed again it turns off that is light is not visible.
_______
| |
button---> | O |
with small |_____|
transparent circle inside


i have textured map the button . the click is ok but how to glow light of
any color through the circle when the button is clicked that is button is ON.
please help me in solving this problem in an optimized and easy way through OpenGL.
thanks in advance.


kashif

Andrew Jameson
06-24-2003, 11:45 PM
Hi,
I do much the same ... I opted for a solution that uses two textures ... one for button on and one for its off state. I found that I'd got much better control and I needed a way to actually emulate a button containing a light ... actually, I used three textures as I also needed a disabled state too !

Andrew

kashif saeed
06-25-2003, 06:41 AM
hello
sorry to interrupt u guys again .
as far i have understood that i should use 2 textures one with ON state and other with OFF state. so when i click on that i just switch the textures. is it so.

but here i don't have only the texture of one button it is a texture of control Panel (say keyboard) which has lot of buttons. the picture is of complete panel and it contains many buttons . so then the above methood will be lenthy and not optimized one as i have to make almnost many textures for each button ON.
please look into another solution.
kashif