diff options
| author | Drahflow <drahflow@gmx.de> | 2014-01-11 22:50:00 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2014-01-11 22:50:00 +0100 |
| commit | 2df9c01eb9b223efc5b7d1b263ee807f22ec119b (patch) | |
| tree | 8bf66097d7a3d6d94a6fc12f47be75915576130d /elymas/lib/ffi | |
| parent | cb40f5f2c6aba2d5d1cce5c512dfd52d334712c4 (diff) | |
Can now draw background colors
Diffstat (limited to 'elymas/lib/ffi')
| -rw-r--r-- | elymas/lib/ffi/gl.ey | 35 | ||||
| -rw-r--r-- | elymas/lib/ffi/sdl.ey | 44 |
2 files changed, 79 insertions, 0 deletions
diff --git a/elymas/lib/ffi/gl.ey b/elymas/lib/ffi/gl.ey new file mode 100644 index 0000000..ebfb3be --- /dev/null +++ b/elymas/lib/ffi/gl.ey @@ -0,0 +1,35 @@ +< + sys .so ":" via + txt .consume .|hu "%" deffd + + "/usr/lib/x86_64-linux-gnu/libGL.so.1" :dlopen -- + + { _ "gl" -01 cat -1032 :resolveFunction -01 deffd }' "->" deffd + + %00001 ==:CURRENT_BIT + %00002 ==:POINT_BIT + %00004 ==:LINE_BIT + %00008 ==:POLYGON_BIT + %00010 ==:POLYGON_STIPPLE_BIT + %00020 ==:PIXEL_MODE_BIT + %00040 ==:LIGHTING_BIT + %00080 ==:FOG_BIT + %00100 ==:DEPTH_BUFFER_BIT + %00200 ==:ACCUM_BUFFER_BIT + %00400 ==:STENCIL_BUFFER_BIT + %00800 ==:VIEWPORT_BIT + %01000 ==:TRANSFORM_BIT + %02000 ==:ENABLE_BIT + %04000 ==:COLOR_BUFFER_BIT + %08000 ==:HINT_BIT + %10000 ==:EVAL_BIT + %20000 ==:LIST_BIT + %40000 ==:TEXTURE_BIT + %80000 ==:SCISSOR_BIT + %FFFFF ==:ALL_ATTRIB_BITS + + "ffff" "" ->ClearColor + "i" "" ->Clear +> /gl ffi .defv + +# vim: syn=elymas diff --git a/elymas/lib/ffi/sdl.ey b/elymas/lib/ffi/sdl.ey index 96f43fe..7ff7cd6 100644 --- a/elymas/lib/ffi/sdl.ey +++ b/elymas/lib/ffi/sdl.ey @@ -12,6 +12,20 @@ "" "" ->Quit "" "s" ->GetError + 1 ==:WINDOW_FULLSCREEN + 2 ==:WINDOW_OPENGL + 4 ==:WINDOW_SHOWN + 8 ==:WINDOW_HIDDEN + 16 ==:WINDOW_BORDERLESS + 32 ==:WINDOW_RESIZABLE + 64 ==:WINDOW_MINIMIZED + 128 ==:WINDOW_MAXIMIZED + 256 ==:WINDOW_INPUT_GRABBED + 512 ==:WINDOW_INPUT_FOCUS + 1024 ==:WINDOW_MOUSE_FOCUS + 2048 ==:WINDOW_FOREIGN + 4095 ==:WINDOW_FULLSCREEN_DESKTOP + "siiiii" "p" ->CreateWindow "p" "" ->DestroyWindow "p" "i32" ->UpdateWindowSurface @@ -19,6 +33,36 @@ "pbi" "i32" ->FillRect { 0 -201 } /SDL_FillRect "pii" "i32" :resolveFunction ; /Fill deffd + + 0 ==:GL_RED_SIZE + 1 ==:GL_GREEN_SIZE + 2 ==:GL_BLUE_SIZE + 3 ==:GL_ALPHA_SIZE + 4 ==:GL_BUFFER_SIZE + 5 ==:GL_DOUBLEBUFFER + 6 ==:GL_DEPTH_SIZE + 7 ==:GL_STENCIL_SIZE + 8 ==:GL_ACCUM_RED_SIZE + 9 ==:GL_ACCUM_GREEN_SIZE + 10 ==:GL_ACCUM_BLUE_SIZE + 11 ==:GL_ACCUM_ALPHA_SIZE + 12 ==:GL_STEREO + 13 ==:GL_MULTISAMPLEBUFFERS + 14 ==:GL_MULTISAMPLESAMPLES + 15 ==:GL_ACCELERATED_VISUAL + 16 ==:GL_RETAINED_BACKING + 17 ==:GL_CONTEXT_MAJOR_VERSION + 18 ==:GL_CONTEXT_MINOR_VERSION + 19 ==:GL_CONTEXT_EGL + 20 ==:GL_CONTEXT_FLAGS + 21 ==:GL_CONTEXT_PROFILE_MASK + 22 ==:GL_SHARE_WITH_CURRENT_CONTEXT + + "ii" "i32" ->GL_SetAttribute + "p" "p" ->GL_CreateContext + "p" "" ->GL_SwapWindow + "p" "" ->GL_DeleteContext + SetMainReady > /sdl ffi .defv |
