Hello again,
I''m trying to implement a flashlight like lightsource that can move around with a player, but I''m messing something up.
I tried to do this:
glLoadIdentity();
glTranslatef(0.0f,0.0f,z);
GLfloat LightPosition[]={0.0f, 0.0f, 2.0f, 1.0f};
glLightfv(GL_LIGHT1, GL_POSITION,LightPosition);
Where GL_LIGHT1 was inited like so:
GLfloat LightDiffuse[]= {1.0f, 1.0f, 1.0f, 1.0f};
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse);
and where z is the position on the z axis (yes... you can only go down this corridor

)
Unfortunately, this does not work...
If anyone can tell me what I''m doing wrong I would appreciate it. (If you can tell me how and include a code snippet, I''d appreciate it even more >

)
-OberonZ
---
PAGE FAULT: Please insert "Swap File, Disk 2"
and press any key to continue.