MasterDunx
03-18-2010, 09:21 AM
Hi Chaps,
I'm new to the forums and programming in general.
At the moment I'm trying to move a light around my scene but unfortunatley, there's no visual representation of it. I was wondering if there was perhaps a method I could use to indicate it's position when rendering.
My code is below:
static void lighting (void)
{
GLfloat light_position[] = {10.0,0.0,0.0,0.0};
GLfloat ambi[] = {0.1, 0.1, 0.1, 0.1};
GLfloat lightZeroColor[] = {0.9, 0.9, 0.9, 0.1};
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glLightfv(GL_LIGHT0, GL_AMBIENT, ambi);
glLightfv(GL_LIGHT0, GL_DIFFUSE, lightZeroColor);
//glDisable( GL_LIGHTING );
}
Any help would be appriciated,
MasterDunx
I'm new to the forums and programming in general.
At the moment I'm trying to move a light around my scene but unfortunatley, there's no visual representation of it. I was wondering if there was perhaps a method I could use to indicate it's position when rendering.
My code is below:
static void lighting (void)
{
GLfloat light_position[] = {10.0,0.0,0.0,0.0};
GLfloat ambi[] = {0.1, 0.1, 0.1, 0.1};
GLfloat lightZeroColor[] = {0.9, 0.9, 0.9, 0.1};
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glLightfv(GL_LIGHT0, GL_AMBIENT, ambi);
glLightfv(GL_LIGHT0, GL_DIFFUSE, lightZeroColor);
//glDisable( GL_LIGHTING );
}
Any help would be appriciated,
MasterDunx