1
Ah, nevermind .. glClearColor needs to be passed in floats
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
from ctypes import CDLL
from ctypes.util import find_library, sys
if sys.platform == 'win32': GL = CDLL( find_library( 'opengl32' ) )
else: GL = CDLL( find_library( 'GL' ) )
from PySFML import sf
window = sf.RenderWindow( sf.VideoMode( 800, 600 ), 'title' )
GL.glClearColor( 255, 0, 0, 255 )
while True:
GL.glClear( 0x00004000 ) # mask == GL_COLOR_CLEAR_VALUE
window.Display()
from OpenGL import GL
from PySFML import sf
window = sf.RenderWindow( sf.VideoMode( 800, 600 ), 'title' )
GL.glClearColor( 255, 0, 0, 255 )
while True:
GL.glClear( 0x00004000 ) # mask == GL_COLOR_CLEAR_VALUE
window.Display()
KeyPress event, serial 30, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2549350, (272,477), root:(1556,583),
state 0x0, keycode 49 (keysym 0x60, grave), same_screen YES,
XLookupString gives 1 bytes: (60) "`"
XmbLookupString gives 1 bytes: (60) "`"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2556537, (272,477), root:(1556,583),
state 0x0, keycode 90 (keysym 0xff9e, KP_Insert), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2556896, (272,477), root:(1556,583),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2557177, (272,477), root:(1556,583),
state 0x0, keycode 88 (keysym 0xff99, KP_Down), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2557556, (272,477), root:(1556,583),
state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2558058, (272,477), root:(1556,583),
state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2558355, (272,477), root:(1556,583),
state 0x0, keycode 84 (keysym 0xff9d, KP_Begin), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2558652, (272,477), root:(1556,583),
state 0x0, keycode 85 (keysym 0xff98, KP_Right), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2559200, (272,477), root:(1556,583),
state 0x0, keycode 79 (keysym 0xff95, KP_Home), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2559541, (272,477), root:(1556,583),
state 0x0, keycode 80 (keysym 0xff97, KP_Up), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2559879, (272,477), root:(1556,583),
state 0x0, keycode 81 (keysym 0xff9a, KP_Prior), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2563542, (272,477), root:(1556,583),
state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2564335, (272,477), root:(1556,583),
state 0x10, keycode 49 (keysym 0x60, grave), same_screen YES,
XLookupString gives 1 bytes: (60) "`"
XmbLookupString gives 1 bytes: (60) "`"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2564950, (272,477), root:(1556,583),
state 0x10, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
XLookupString gives 1 bytes: (30) "0"
XmbLookupString gives 1 bytes: (30) "0"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2565238, (272,477), root:(1556,583),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XmbLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2565515, (272,477), root:(1556,583),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) "2"
XmbLookupString gives 1 bytes: (32) "2"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2565791, (272,477), root:(1556,583),
state 0x10, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 bytes: (33) "3"
XmbLookupString gives 1 bytes: (33) "3"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2566160, (272,477), root:(1556,583),
state 0x10, keycode 83 (keysym 0xffb4, KP_4), same_screen YES,
XLookupString gives 1 bytes: (34) "4"
XmbLookupString gives 1 bytes: (34) "4"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2566436, (272,477), root:(1556,583),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XmbLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2566728, (272,477), root:(1556,583),
state 0x10, keycode 85 (keysym 0xffb6, KP_6), same_screen YES,
XLookupString gives 1 bytes: (36) "6"
XmbLookupString gives 1 bytes: (36) "6"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2567071, (272,477), root:(1556,583),
state 0x10, keycode 79 (keysym 0xffb7, KP_7), same_screen YES,
XLookupString gives 1 bytes: (37) "7"
XmbLookupString gives 1 bytes: (37) "7"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2567343, (272,477), root:(1556,583),
state 0x10, keycode 80 (keysym 0xffb8, KP_8), same_screen YES,
XLookupString gives 1 bytes: (38) "8"
XmbLookupString gives 1 bytes: (38) "8"
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4400001,
root 0x1a6, subw 0x0, time 2567681, (272,477), root:(1556,583),
state 0x10, keycode 81 (keysym 0xffb9, KP_9), same_screen YES,
XLookupString gives 1 bytes: (39) "9"
XmbLookupString gives 1 bytes: (39) "9"
XFilterEvent returns: False
Tilde,0,1,2,3,4,5,6,7,8,9,Num_lock,Tilde,0,1,2,3,4,5,6,7,8,9