Howdy Hylke
First of all check if problem is with lib3ds or with your pipeline.
So clear screen to white to actually see anything:
glClearColor( 1.f, 1.f, 1.f, 0.f );
glClear( GL_COLOR_BUFFER_BIT );
then generate some normals by hand instead of using those from lib3ds:
void GenRandomNormals( float normals[], int n )
{
for( int i = 0; i < n; ++i )
{
float x, y, z;
do
{
x = ( ( rand() % 2000 ) - 1000
) * 0.001f;
y = ( ( rand() % 2000 ) - 1000
) * 0.001f;
z = ( ( rand() % 2000 ) - 1000
) * 0.001f;
float l = (float)sqrtf( x*x +
y*y + z*z );
} while( l <= 0.01f )
normals[i * 3] = x / l;
normals[i * 3 + 1] = y / l;
normals[i * 3 + 2] = z / l;
}
}
And put them into your vbuffer.
If object is still black then problem lies in pipeline, maybe you forgot
about enabling something?
Greets
Kefrens
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel