I have been trying to impliment the majority of the GLKit library into my OpenGLES bindings however when I try to set the position variable of a GLKEffectPropertyLight it raises an TypeError.
PropLight = ObjCClass('GLKEffectPropertyLight') # I will rename it later.
l = PropLight.new() # .alloc().init()
print l.position # <objc_util.ObjCInstanceMethod object at [hex_value]>
new_pos = GLKVector4() # Custom ctypes.Union
l.setPosition_(new_pos) # Raises TypeError: expected 6 arguments. Got 1.
However I do not know what those 6 arguments should be.
Any help is well appreciated
The GLKVector4 class.
class xyzw(ctypes.Structure):
_fields_ = [
('x', ctypes.c_float),
('y', ctypes.c_float),
('z', ctypes.c_float),
('w', ctypes.c_float)
]
class rgba(ctypes.Structure):
_fields_ = [
('r', ctypes.c_float),
('g', ctypes.c_float),
('b', ctypes.c_float),
('a', ctypes.c_float)
]
class stpq(ctypes.Structure):
_fields_ = [
('s', ctypes.c_float),
('t', ctypes.c_float),
('p', ctypes.c_float),
('q', ctypes.c_float)
]
class float4(ctypes.Structure):
_fields_ = [
('v', (ctypes.c_float * 4))
]
class GLKVector4(ctypes.Union):
_anonymous_ = [
('s1'),
('s2'),
('s3'),
('s4'),
]
_fields_ = [
('s1', xyzw),
('s2', rgba),
('s3', stpq),
('s4', float4),
]
If it helps