Thanks. That worked well.
Now I have a type that I want to send to glMaterialfv
glMaterialfv declare is: Function glMaterialfv(face_,pname_,params_:Float Ptr)
Type color4f
Field r#,g#,b#,a#
End Type
Local ambient:color4f = New color4f
ambient.r=0.2
ambient.g=0.2
ambient.b=0.2
ambient.a=1
All these gives an errors:
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient)
glLightfv(GL_LIGHT0, GL_AMBIENT, Float Ptr(ambient))
glLightfv(GL_LIGHT0, GL_AMBIENT, Float Ptr(ambient.r))
[EDIT] glLightfv(GL_LIGHT0, GL_AMBIENT, Varptr(ambient.r)) seems ok, but not too elegant ?
Now I have a type that I want to send to glMaterialfv
glMaterialfv declare is: Function glMaterialfv(face_,pname_,params_:Float Ptr)
Type color4f
Field r#,g#,b#,a#
End Type
Local ambient:color4f = New color4f
ambient.r=0.2
ambient.g=0.2
ambient.b=0.2
ambient.a=1
All these gives an errors:
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient)
glLightfv(GL_LIGHT0, GL_AMBIENT, Float Ptr(ambient))
glLightfv(GL_LIGHT0, GL_AMBIENT, Float Ptr(ambient.r))
[EDIT] glLightfv(GL_LIGHT0, GL_AMBIENT, Varptr(ambient.r)) seems ok, but not too elegant ?