View Full Version : casting a shadow of "glSolidSphere"?
I have gone through various examples of codes for casting shadows, all using techniques of flattening polygons or triangles against a specified surface. But I was wondering if anyone new of a way to cast a shadow when using a predefined shape such as glSolidSphere. In such a case I don't have clue on how to project the quads making up the sphere.
Any suggests, or could anyone possibly point me to example code implementing this? if so, please email me at firstname.lastname@example.org. THANKS!
I just came across something about "glFrustum()".... Can anyone tell me how to use this, or where I can find more information about this? thank you.
05-07-2001, 03:35 AM
glFrustum sets up the view frustum... do a search on opengl.org or in the discussion forums, or do a google search for glFrustum and you should come up with a bunch of results.
As for shadows, for non-planar shadows (that can be cast on non-planar objects) there are 2 major techniques: Shadow mapping and shadow volumes. Which one you want to use is up to you, which one is better depends on the way you use them and the rest of your code - I personally prefer shadow mapping 'cause it seems to put less of a load on the CPU (it's more fillrate and bandwidth eating though). Both techniques start with finding out how the shadow casting objects look from the light source's point of view - again, do a search for shadow mapping and shadow volumes. There should be a number of tutorials out there.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.