leha-bot / lib3ds

Automatically exported from code.google.com/p/lib3ds
GNU Lesser General Public License v2.1
1 stars 0 forks source link

3dsplay out of bounds var causes opengl error #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In render_node() as is, glGetError() can return GL_INVALID_VALUE. This is
caused by the line

glMaterialf(GL_FRONT, GL_SHININESS, pow(2, 10.0*mat->shininess));

Change that to

glMaterialf(GL_FRONT, GL_SHININESS, min(128.,pow(2,
10.0*mat->shininess)));

to resolve the issue. I've seen mat->shininess be 10.0 in file,
GL_SHININESS should not be passed over 128.

Original issue reported on code.google.com by jkypr...@gmail.com on 20 Jan 2010 at 9:01

GoogleCodeExporter commented 8 years ago
Sorry, I meant to say I found mat->shininess to be 1.00 there.

Original comment by jkypr...@gmail.com on 20 Jan 2010 at 9:02

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r104.

Original comment by jkypr...@gmail.com on 21 Jan 2010 at 8:53