09-24-2024, 07:31 PM
try (row 8, 9)
_glLightfv _GL_LIGHT0, _GL_SPOT_DIRECTION, _offset(glVec4(0, 1, 0, 0))
_glLightfv _GL_LIGHT0, _GL_SPOT_EXPONENT, _offset (glVec4(1, 0, 0, 0))
I can't see the perspective settings in the program either:
example:
Declare Library
Sub gluLookAt (ByVal eyeX As Double, Byval eyeY As Double, Byval eyeZ As Double, Byval centerX As Double, Byval centerY As Double, Byval CenterZ As Double, Byval upX As Double, Byval upY As Double, Byval upZ As Double)
End Declare
' try first call _glLightfv and as second after all _glenable (part of my program here
_glLightfv _GL_LIGHT0, _GL_DIFFUSE, _Offset(Light_Diffuse())
_glLightfv _GL_LIGHT0, GL_POSITION, _Offset(Light_Position())
_glEnable _GL_LIGHT0
_glEnable _GL_LIGHTING
_glEnable _GL_DEPTH_TEST
_glMatrixMode _GL_PROJECTION
_gluPerspective 40.0, 1.0, 1.0, 10.0
' glMatrixMode(GL_MODELVIEW);
_glMatrixMode _GL_MODELVIEW
' gluLookAt(0.0, 0.0, 5.0, /* eye is at (0,0,5) */
' 0.0, 0.0, 0.0, /* center is at (0,0,0) */
' 0.0, 1.0, 0.); /* up is in positive Y direction */
gluLookAt 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0
' /* Adjust cube position to be asthetic angle. */
' glTranslatef(0.0, 0.0, -1.0);
' glRotatef(60, 1.0, 0.0, 0.0);
' glRotatef(-20, 0.0, 0.0, 1.0);
_glTranslatef 0.0, 0.0, -1.0
_glRotatef 60, 1.0, 0.0, 0.0
_glRotatef -20, 0.0, 0.0, 1.0
maybe this help, maybe not, OpenGL is magic garden...
_glLightfv _GL_LIGHT0, _GL_SPOT_DIRECTION, _offset(glVec4(0, 1, 0, 0))
_glLightfv _GL_LIGHT0, _GL_SPOT_EXPONENT, _offset (glVec4(1, 0, 0, 0))
I can't see the perspective settings in the program either:
example:
Declare Library
Sub gluLookAt (ByVal eyeX As Double, Byval eyeY As Double, Byval eyeZ As Double, Byval centerX As Double, Byval centerY As Double, Byval CenterZ As Double, Byval upX As Double, Byval upY As Double, Byval upZ As Double)
End Declare
' try first call _glLightfv and as second after all _glenable (part of my program here
_glLightfv _GL_LIGHT0, _GL_DIFFUSE, _Offset(Light_Diffuse())
_glLightfv _GL_LIGHT0, GL_POSITION, _Offset(Light_Position())
_glEnable _GL_LIGHT0
_glEnable _GL_LIGHTING
_glEnable _GL_DEPTH_TEST
_glMatrixMode _GL_PROJECTION
_gluPerspective 40.0, 1.0, 1.0, 10.0
' glMatrixMode(GL_MODELVIEW);
_glMatrixMode _GL_MODELVIEW
' gluLookAt(0.0, 0.0, 5.0, /* eye is at (0,0,5) */
' 0.0, 0.0, 0.0, /* center is at (0,0,0) */
' 0.0, 1.0, 0.); /* up is in positive Y direction */
gluLookAt 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0
' /* Adjust cube position to be asthetic angle. */
' glTranslatef(0.0, 0.0, -1.0);
' glRotatef(60, 1.0, 0.0, 0.0);
' glRotatef(-20, 0.0, 0.0, 1.0);
_glTranslatef 0.0, 0.0, -1.0
_glRotatef 60, 1.0, 0.0, 0.0
_glRotatef -20, 0.0, 0.0, 1.0
maybe this help, maybe not, OpenGL is magic garden...