Permalink
Browse files

Administrative commit

  • Loading branch information...
1 parent f6a662c commit b7b39ddc2c8b7113c50465c2f50057a8d55c35f5 Wojciech Meyer committed Jun 27, 2011
Showing with 24 additions and 32 deletions.
  1. +1 −1 bootstrap.4k
  2. +1 −1 demos/basic-meta-shader.4k
  3. +12 −22 demos/plasma.4k
  4. +3 −2 demos/triangle.4k
  5. +2 −2 lib/display.4k
  6. +5 −0 lib/glsl.4k
  7. +0 −4 lib/meta.4k
View
@@ -241,7 +241,7 @@ symbol: dlsym
| Convert string to zero terminated string
: >cstr drop ;
| Load library
-: lib >cstr $2 swap dlopen ;
+: lib >cstr $1 $100 or swap dlopen ;
| Load symbol
: sym >cstr swap dlsym ;
variable #ithere
@@ -100,4 +100,4 @@ variable fragment-shader
bye
;Display
-display
+| display
View
@@ -17,7 +17,7 @@
| along with this program. If not, see <http://www.gnu.org/licenses/>.
| ______________________________________________________________________
-
+require" lib/symbols.4k"
| This is only for interactive sessions, forget all the defined words
| so far marked
forget
@@ -27,26 +27,15 @@ mark
| leaves the constant on the floating point stack
: fconst : rliteral postpone >f postpone ; ;
| Put integer value on floating point stack
-: i>>f i>f >f ;
+: 022538 i>>f i>f >f ;
| The following is very clumsy, will be changed in future
-2 ccall: exit
-3 ccall: SDL_SetVideoMode
-4 ccall: SDL_PollEvent
-5 ccall: SDL_Flip
-6 ccall: SDL_LockSurface
-7 ccall: SDL_UnlockSurface
-| load our symbols from dll
-| Must be in the same order as above
-: libSDL " /usr/lib/libSDL.so" lib ;
-: function >r sym r> cells add-handle ;
-: load-symbols ( -- )
- " libc.so" lib " _exit" 1 function
- libSDL " SDL_SetVideoMode" 4 function
- libSDL " SDL_PollEvent" 1 function
- libSDL " SDL_Flip" 1 function
- libSDL " SDL_LockSurface" 1 function
- libSDL " SDL_UnlockSurface" 1 function
-;
+Lib: libSDL.so
+3 Symbol: SDL_SetVideoMode
+4 Symbol: SDL_PollEvent
+5 Symbol: SDL_Flip
+6 Symbol: SDL_LockSurface
+7 Symbol: SDL_UnlockSurface
+LoadSymbols
| some constants
800 const width
600 const height
@@ -148,12 +137,13 @@ height 2 / i>f fconst h/2
again
;
: main
- load-symbols
+ LoadSymbols
init-pallete
video screen !
render-loop
- 0 exit
+ bye
;
+| main
| save-image im.4ki
| main
View
@@ -46,11 +46,12 @@ $00000004 constant GL_TRIANGLES
;
600 800 Display: display
+ LoadSymbols
Render:
- render-loop
+ | render-loop
;Render
bye
;Display
-display
+| display
View
@@ -34,9 +34,9 @@ variable display-height
: e>key 8 + c@ ;
: s>pixels 20 + @ ;
+Lib: /usr/lib/libGL.so
Lib: libSDL.so
-Lib: libGLU.so
-Lib: libGL.so
+Lib: /usr/lib/libGLU.so
4 Symbol: SDL_SetVideoMode
1 Symbol: SDL_PollEvent
1 Symbol: SDL_Init
View
@@ -0,0 +1,5 @@
+0 Symbol: glCreateProgram
+1 Symbol: glCreateShader
+2 Symbol: glAttachShader
+1 Symbol: glLinkProgram
+1 Symbol: glUseProgram
View
@@ -66,7 +66,3 @@ LoadSymbols
: Ident declarex ;
| Concat words on the X-stack
: |> x> x> concat-malloc >x ;
-
-Ident ala
-: a ala ;
-a

0 comments on commit b7b39dd

Please sign in to comment.