diff options
author | Richard <q@1bpm.net> | 2021-07-10 18:11:17 +0100 |
---|---|---|
committer | Richard <q@1bpm.net> | 2021-07-10 18:11:17 +0100 |
commit | 2c2b195cdbef7fdd6483d85dbe5234fbaa921f74 (patch) | |
tree | cfe9afc93a9288919b6b725364e45ee1f19bbf25 | |
parent | a3a44949fedff65267e7ff3546a2957c839ed3c7 (diff) | |
download | csound-sdl-2c2b195cdbef7fdd6483d85dbe5234fbaa921f74.tar.gz csound-sdl-2c2b195cdbef7fdd6483d85dbe5234fbaa921f74.tar.bz2 csound-sdl-2c2b195cdbef7fdd6483d85dbe5234fbaa921f74.zip |
updated readme
-rw-r--r-- | README.md | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -9,7 +9,7 @@ csound-sdl provides a simple interface for (currently quite) low level SDL calls ## Building -Create a build directory at the top of the source tree, execute *cmake ..*, *make* and optionally *make install* as root. If the latter is not used/possible then the resulting libsdl.so can be used with the *--opcode-lib* flag in Csound. eg: +Create a build directory at the top of the source tree, execute *cmake ..*, *make* and optionally *make install* as root. If the latter is not used/possible then the resulting module can be used with the *--opcode-lib* flag in Csound. eg: cd csound-sdl mkdir build && cd build @@ -20,7 +20,9 @@ Create a build directory at the top of the source tree, execute *cmake ..*, *mak ## Opcode overview ### sdlinit *ihandle, kmousetrigger, kmousex, kmousey sdlinit Swindowname, iwidth, iheight, ifps* + Initialise the SDL window. + - ihandle: the handle to be used by further SDL opcodes to write to that window - kmousetrigger: fires when mouse button is clicked in the window - kmousex: reports mouse X position in window, normalised from 0 to 1 @@ -33,7 +35,9 @@ Initialise the SDL window. ### sdlcolour *ihandle sdlcolour kred, kgreen, kblue, kalpha* + Set a colour to be used in later drawing. + - ihandle: the handle for the colour to be used by further SDL opcodes - kred: red amount with range 0 to 255 @@ -43,7 +47,9 @@ Set a colour to be used in later drawing. ### sdlrect *sdlrect iwindow, icolour, kx, ky, kwidth, kheight* + Create a rectangle. + - iwindow: the window handle from sdlinit - icolour: the colour handle from sdlcolour - kx: X position @@ -53,10 +59,13 @@ Create a rectangle. ## sdlline *sdlline iwindow, icolour, kx1, ky1, kx2, ky2* + Create a line. + - iwindow: the window handle from sdlinit - icolour: the colour handle from sdlcolour - kx1: X position of start point - ky1: Y position of start point - kx2: X position of end point - ky2: Y position of end point + |