Hi,
I'm looking for a basic lighting configuration for a solid modeller
I'm building. I don't need anything elaborate; I just want to set a
color and get reasonable shading. I followed the guidelines from
http://www.opengl.org/wiki/How_lighting_works, but my scenes are left
only black and white (http://funhdl.org/ball.jpg) Are there any
specifics to the Haskell API to properly configure lighting? Here are
the lighting commands I call during program init:
position (Light 0) $= Vertex4 1 1 0 1
ambient (Light 0) $= Color4 0 0 0 1
diffuse (Light 0) $= Color4 1 1 1 1
specular (Light 0) $= Color4 1 1 1 1
lightModelAmbient $= Color4 0.2 0.2 0.2 1
lighting $= Enabled
light (Light 0) $= Enabled
colorMaterial $= Enabled
colorMaterial $= Just (FrontAndBack, AmbientAndDiffuse)
materialSpecular FrontAndBack $= Color4 1 1 1 1
materialEmission FrontAndBack $= Color4 0 0 0 1
During a frame redraw, the only lighting functions called are
disabling and enabling lighting to draw the coordinate system.
Any ideas or recommendations?
BTW, I also raised this question to the opengl forum:
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=…
-Tom
Hi,
I'm having trouble with the new Opengl 2.3.0.0 that's based on openglRaw. When I run an old opengl example (http://netsuperbrain.com/blog/wp-content/uploads/2008/11/teapots.hs) that used to work with previous versions of HOpenGL, I get the following error:
teapots.exe: user error (unknown OpenGL extension entry glLightfv, check for GL_ARB_compatibility)
This seems reasonable (OpenGl 3.1 doesnt support that fixed-function stuff without explicitly turning it on), but when I try to run my own small test program I get similar errors for OpenGL 3.1 stuff too:
Test.exe: user error (unknown OpenGL extension entry glClearColor, check for OpenGL 3.1)
If I don't put the glut32.dll in the same directory as those examples, I get an error saying something like:
teapots.exe: user error (unknown GLUT entry glutInit)
so maybe I need to tell my executables where to find the opengl dll to link against. I've tried to put opengl32.dll in the same directory, but with no luck.
Suggestions, anyone? I have a Opengl 3.1 capable graphics card (ATI Radeon 4850) with new drivers (Castalyst 9.8).
/Tobias Bexelius
_________________________________________________________________
Använd nätet för att dela med dig av dina minnen till vem du vill.
http://www.microsoft.com/sverige/windows/windowslive/products/photos-share.…