a GREAT problem

I’ve problem. My model have only light but it don’t have color material.
I use the glGetError and ALL lines with opengl (gl…) I have error 1282 (GL_INVALID_OPERATION).

I’m hopeless. Please I need help.

Thank you.
Aquileo.

some things that aren’t between glBegin() and glEnd() but should be, or are but shouldn’t be, give that kind of error.

Originally posted by Aquileo:
[b]I’ve problem. My model have only light but it don’t have color material.
I use the glGetError and ALL lines with opengl (gl…) I have error 1282 (GL_INVALID_OPERATION).

I’m hopeless. Please I need help.

Thank you.
Aquileo.[/b]

Please post your code, it would really help.

Hello Volt9000
My program has very lines of code. The program is for design shoes and I try show the last.
I use Borland C++ builder 6 and OpengGlPanel.
The problem is in all lines. I make a function and when I put after a called at my function always it send me an error.
I change the code and now I have problems with

GLfloat col_luz[] = {0.5f, 0.5f, 0.5f, 1.0f};
glLightfv(GL_LIGHT0, GL_AMBIENT_AND_DIFFUSE, col_luz);

return me a number error 1280 (GL_INVALID_ENUM)

The code was good but I made some changes and now don’t work. I divided the code for the code is clean.

Thank you and sorry for my English.

Make sure you’ve got a valid context.

I’ve discovered the mistake. I put

glLightfv(GL_LIGHT0, GL_AMBIENT_AND_DIFFUSE, col_luz);

when glLightfv can only be GL_AMBIENT.

Thank you for all!