Decal Clipping and 2D Positions

Hi, I’ve 2 questions for you

  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 ?

  1. 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

  1. Use a clipping plane.
  2. I dunno Ive been wondering that myself

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

Originally posted by iNsaNEiVaN:
[b]1. Use a clipping plane.
2. I dunno Ive been wondering that myself

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

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