PDA

View Full Version : Decal Clipping and 2D Positions



stryx
04-07-2002, 04:56 AM
Hi, I've 2 questions for you http://www.opengl.org/discussion_boards/ubb/wink.gif

1) I've written a decal routine that produces the decalpolygon based on the vectors of the wall-polygon.

The problem is when the player shoots at the edge of the wall the decal shows up in the room. How to break the decal or clip it with the walledges ?

2) I'm going to implement a lensflare effect.
So I need the 2D-Screenposition of my light.
Is there a way with OpenGL to get that position or should I use trig calculations of my own ?

Thanks anyway,
stryx

iNsaNEiVaN
04-07-2002, 07:03 PM
1. Use a clipping plane.
2. I dunno Ive been wondering that myself

[This message has been edited by iNsaNEiVaN (edited 04-07-2002).]

GameMaker
04-07-2002, 07:34 PM
Originally posted by iNsaNEiVaN:
1. Use a clipping plane.
2. I dunno Ive been wondering that myself

[This message has been edited by iNsaNEiVaN (edited 04-07-2002).]

GluUnProject() will give you the screen coordinates from your 3d coordinates.