How could I put a visual marker to show lights?

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};

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,


Just draw a sphere or whatever where the light is.

i think you need some code to object Materials.
here is my code.
gluSpHere();//it is not total but i forget how to write-_-


Cool, but how would I specify the sphere’s position to be in aligned with the light?

you needed to aligened your light,
here i post you simeple example i had write.

glLightfv(GL_LIGHT0, GL_POSITION, light_position1);

you could just declare a global variable wich is used in the light pos settings and the object pos settings

You object is simply at the same position defined with

glLightfv(GL_LIGHT0 + i, GL_POSITION, m_lightPos );
glDisable( GL_LIGHTING );
glTranslatefv( lightPos );
//Draw your preferred shape for the light source
glEnable( GL_LIGHTING );