Hello, ;D
while converting the Lession 36 from Nehe Tutorials.
I ran in a Exception using the GL.glMaterialfv Method.
There the Code :
private void ProcessHelix() // Draws A Helix
{
float x; // Helix x Coordinate
float y; // Helix y Coordinate
float z; // Helix z Coordinate
float phi; // Angle
float theta; // Angle
float v,u; // Angles
float r; // Radius Of Twist
int twists = 5; // 5 Twists
float [] glfMaterialColor = new float [] {0.4f,0.2f,0.8f,1.0f}; // Set The Material Color
float [] specular = new float[] {1.0f,1.0f,1.0f,1.0f}; // Sets Up Specular Lighting
FloatBuffer glfMaterialColorBuffer = FloatBuffer.allocate(4);
FloatBuffer specularBuffer = FloatBuffer.allocate(4);
glfMaterialColorBuffer = glfMaterialColorBuffer.wrap(glfMaterialColor);
specularBuffer = specularBuffer.wrap(specular);
GL.glLoadIdentity(); // Reset The Modelview Matrix
GLU.gluLookAt(0, 5, 50, 0, 0, 0, 0, 1, 0); // Eye Position (0,5,50) Center Of Scene (0,0,0), Up On Y Axis
GL.glPushMatrix(); // Push The Modelview Matrix
GL.glTranslatef(0,0,-50); // Translate 50 Units Into The Screen
GL.glRotatef(angle/2.0f,1,0,0); // Rotate By angle/2 On The X-Axis
GL.glRotatef(angle/3.0f,0,1,0); // Rotate By angle/3 On The Y-Axis
GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_AMBIENT_AND_DIFFUSE,glfMaterialColorBuffer);
GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_SPECULAR,specularBuffer);
JBuilder said :
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x69649BC2
Function=[Unknown.]
Library=C:\WINNT\System32\nvoglnt.dll
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at org.lwjgl.opengl.CoreGL11.glMaterialfv(Native Method)
at rendertotexture.Lesson36.ProcessHelix(Lesson36.java:288)
at rendertotexture.Lesson36.RenderToTexture(Lesson36.java:381)
at rendertotexture.Lesson36.Draw(Lesson36.java:525)
at rendertotexture.Lesson36.renderLoop(Lesson36.java:65)
at rendertotexture.Lesson36.<init>(Lesson36.java:58)
at rendertotexture.Lesson36.main(Lesson36.java:535)
Is it really the Native Code,or my Code producing the error ?
Bye the Way im using 0.7 of LWJGL
and the NVidia Drivers Version is: 6.14.10.4403
on GeForce 2 MX 400 under Win2k.
Thx,
- Jens

