Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Lots of GL Questions

This topic is 6378 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m having some strange problems: I got lense flares working last night with gluProject to find the screen pos of a 3D point, and if this screen pos is within the screen bounds, I draw a 2D ortho rect at this point - all works fine - except - the flare is also drawn when I''m facing the opposite way to direction of the flare. I thought the winz coord might be negative if this was the case - but it is 1 if I''m facing the flare, 0 if I''m perpendicular to it and 1 if I''m facing away ("facing" being rotation around the y-axis) How would I get it to only display if it is infront of me? Next, I have a particle model system with multiple particles all spraying out in random directions. This is how I render them: 0)Loadidentity 1)Do camera viewing tranformations 2)loop through all particles 3)push matrix 4)translate to particle pos 5)rotate the opposite direction to camera rotation, so it is perp to the camera 6)Draw a triangle strip quad at new pos 7)pop matrix 8)end loop It works well and looks good until I am faced north (rotated 0 on y-axis) then the particles only travel straight up in a perfect line. Whats wrong? Alpha mask on textures: I''ve got an alpha layer on TGA textures and load them in I put blending on (SRC_ALPHA,DST_ALPHA) or ANYTHING else put on the alphatest with greater than 0.0f and render polys, but their are no see through sections on the textures? What are the correct GL setting for doing this Lastly - how would I build a plane that goes through a triangles edge - for collision detection Thanks a lot - hope someone can help

Share this post

Link to post
Share on other sites
Search for something called v-collide. Its a north carolina universities free collission engine. Very easy to use and very very fast. . . commonly accepted in the academic graphics community as being the best/most versatile/most accurate.

Of course, because of its accuracy it may actually run slower than other systems. Make sure to check if it suits your needs as well -- (vcollide runs on polygon soups. Other engines from this same university may run better if you know that all of your objects are convex.)


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!