PDA

View Full Version : Help with environmental mapping, plz help



Bluebomber357
01-31-2009, 06:34 PM
Hey all, I am very new to OpenGL and I've been playing around with source code from a lot of tutorials like motion blur, soft shadows, and even just simple stuff like getting a cube on screen. I have had endless trouble finding a good environmental mapping tutorial that has source code that will compile and run. Can anyone give suggestions? BTW I am using Vista, GLUT, and Visual Studio 2008.

Here is one example of code that I couldn't get to work, and it uses bumping mapping too, http://www.paulsprojects.net/opengl/dpreflect/dpreflect.html

It kept saying that it couldn't find GL/glext.h...

Bluebomber357
01-31-2009, 09:37 PM
I found another good demo with code, but I can't convert it to VS2008, can anybody else get it to compile? The .exe works fine, but I want to mess around with the code so I can reproduce the effect...

http://usuarios.lycos.es/hernandp/opengl.html

ZbuffeR
02-01-2009, 01:56 PM
For the missing glext.h :
http://www.opengl.org/registry/#headers

Some more background, explaining how to use the GL extensions :
http://www.opengl.org/wiki/Getting_started#OpenGL_2.0.2B_and_extensions

You have to know though, that any example not using GLSL is in fact quite deprecated.
Go here, and get "GLSL demo", both exe and source, there is a
http://3dshaders.com/home/index.php?option=com_weblinks&catid=14&Itemid=34
There is an "EnvMap" shader example.

Bluebomber357
02-01-2009, 03:11 PM
Thanks for bring GLSL to my attention. I looked at your links and then googled around and found ShaderDesigner IDE, http://www.opengl.org/sdk/tools/ShaderDesigner/

It seems like all I need to do with ShaderDesigner is make a shader (I can use their sweet pre-made ones at the moment), and apply them to objects in an opengl program I make. Things like environmental mapping should be cake once I have the shader code right?