cbaggers / cepl Goto Github PK
View Code? Open in Web Editor NEWCode Evaluate Play Loop
License: BSD 2-Clause "Simplified" License
Code Evaluate Play Loop
License: BSD 2-Clause "Simplified" License
I don't have this project forked, but a simple copy paste removal of the cepl-utils package specifier for the call to update-swank seems to work.
The following program produces this error:
*** Error in `sbcl': malloc(): memory corruption: 0x0000000000745430 ***
*** Error in `sbcl': malloc(): memory corruption: 0x0000000000745430 ***
When the texture is square, the program works as expected (displays a quad with a texture).
;;(ql:quickload :cepl-default)
;;(cepl:repl)
(in-package :cepl)
(defparameter *count* 0.0)
(defparameter *texture* nil)
(defparameter *v-stream* nil)
(defun-g tex-vert ((vert g-pt))
(values (v! (pos vert) 1)
(:smooth (tex vert))))
(defun-g tex-frag ((tex-coord :vec2) &uniform (texture :sampler-2d)
(count :float) (pos-offset :vec4))
(let* ((rip-size 0.02) (centre (v! 0.0 0.0)) (damp 0.6)
(peaks 9.0)
(dif (- tex-coord centre))
(dist (dot dif dif))
(height (/ (+ (cos (+ count (* dist peaks)))
(sin (- count (* (y tex-coord) peaks))))
2.0))
(rip-offset (* (* (normalize dif) rip-size) height damp)))
(+ (texture texture (+ rip-offset tex-coord))
(v! (* -0.2 height) (* -0.2 height) 0.0 0.0))))
(defpipeline ripple-with-wobble () (g-> #'tex-vert #'tex-frag))
(defun step-demo ()
(evt:pump-events)
(update-swank)
(gl:clear-color 0 0 0 1)
(gl:clear :color-buffer-bit :depth-buffer-bit)
(map-g #'ripple-with-wobble *v-stream*
:texture *texture* :count *count* :pos-offset (v! 0 0 0 0))
(incf *count* 0.08)
(update-display))
(let ((running nil))
(defun run-loop ()
(setf running t)
(let* ((img-data (loop :for i :below 128 :collect
(loop :for j :below 64 :collect (random 254))))
(indicies (make-gpu-array '(2 3 0 0 1 2)
:dimensions (* 2 3) :element-type :unsigned-short)))
(setf *v-stream*
(make-buffer-stream
(make-gpu-array `((,(v! -0.5 -0.5 0) ,(v! -1 -1))
(,(v! 0.5 -0.5 0) ,(v! 1 -1))
(,(v! 0.5 0.5 0) ,(v! 1 1))
(,(v! -0.5 0.5 0) ,(v! -1 1)))
:dimensions 4 :element-type 'g-pt)
:index-array indicies
:retain-arrays t))
(setf *texture* (with-c-array
(temp (make-c-array img-data :dimensions '(128 64)
:element-type :ushort))
(make-texture temp)))
(loop :while running :do (continuable (step-demo)))))
(defun stop-loop () (setf running nil)))
(evt:def-event-listener sys-listener (e :sys)
(when (typep e 'evt:will-quit) (stop-loop)))
#+nil
(run-loop)
I think I found a bug in defpipeline. Shouldn't
" (if (eq (first shader) :post-compile) (push shader post-compile)"
be
" (if (eq (first shader) :post-compile) (push (cadr shader) post-compile)"?
Otherwise I get a ":post-compile is not a function compiler error.
No rush but this would be nice
The problem is os x can't handle reliably interactions with the windowing system outside of the 'main thread'. The solution (for me) is to load the lispbuilder libs, and start the demos on the main thread.
The on-main macro looks like this:
(defmacro on-main (&body b)
`(let ((thread (first (last (sb-thread:list-all-threads)))))
(sb-thread:interrupt-thread thread
#'(lambda () (sb-int:with-float-traps-masked (:underflow :overflow :inexact :invalid :divide-by-zero),@b)))))
Hi,
I'm trying to run the example with sbcl and sdl2 from the Ubuntu 13.10 repository. When I compile it I get the following error. Example 1 does not work either
CL-USER> (ql:quickload :cepl)
To load "cepl":
Load 1 ASDF system:
cepl
; Loading "cepl"
...................
(:CEPL)
CEPL-REPL
NIL
CEPL>
; compiling file "~/quicklisp/local-projects/cepl/examples/1b.lisp" (written 22 MAR 2014 11:42:59 AM):
; file: ~/quicklisp/local-projects/cepl/examples/1b.lisp
; in: DEFPIPELINE PROG-1
; ((VERT VERT-DATA))
;
; caught ERROR:
; illegal function call
; (LET ((LERP-VALUE (/ (Y GL-FRAG-COORD) 500.0)))
; (OUT OUTPUTCOLOR (MIX THE-COLOR (VEC4 0.2 0.2 0.2 1.0) LERP-VALUE)))
;
; note: deleting unreachable code
; (:FRAGMENT
; (LET ((LERP-VALUE (/ # 500.0)))
; (OUT OUTPUTCOLOR (MIX THE-COLOR (VEC4 0.2 0.2 0.2 1.0) LERP-VALUE))))
;
; note: deleting unreachable code
; (POS VERT)
;
; note: deleting unreachable code
;
; caught ERROR:
; READ error during COMPILE-FILE:
;
; Symbol "COLLECT-EVENT-TYPES" not found in the SDL2 package.
;
; Line: 27, Column: 52, File-Position: 1090
;
; Stream: #<SB-SYS:FD-STREAM
; for "file /home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp"
; {1004CE2603}>
;
; compilation unit aborted
; caught 1 fatal ERROR condition
; caught 2 ERROR conditions
; printed 3 notes
; compilation aborted after 0:00:00.015
5 compiler notes:
/home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp:228
error: illegal function call
/home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp:350
note: deleting unreachable code
/home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp:339
note: deleting unreachable code
/home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp:276
note: deleting unreachable code
/home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp:1091
read-error: READ error during COMPILE-FILE:
Symbol "COLLECT-EVENT-TYPES" not found in the SDL2 package.
Line: 27, Column: 52, File-Position: 1090
Stream: #<SB-SYS:FD-STREAM
for "file /home/jonas/quicklisp/local-projects/cepl/examples/1b.lisp"
{1004CE2603}>
Hi,
when running (cepl:repl) I get this error:
SDL Error (-1): No available audio device
[Condition of type SDL2::SDL-RC-ERROR]
Restarts:
0: [*CONTINUE] Return to the SDL2 main loop.
1: [ABORT] Abort, quitting SDL2 entirely.
2: [ABORT] abort thread (#<THREAD "SDL2 Main Thread" RUNNING {1005F694B3}>)
Backtrace:
0: ((LAMBDA NIL :IN SDL2:INIT))
1: (SDL2::HANDLE-MESSAGE (#<CLOSURE (LAMBDA NIL :IN SDL2:INIT) {1005F6958B}> . #S(TRIVIAL-CHANNELS:CHANNEL :QUEUE #S(TRIVIAL-CHANNELS.QUEUE:QUEUE :HEAD NIL :TAIL NIL) :Q-CONDITION #<SB-THREAD:WAITQUEUE A..
2: (SDL2::SDL-MAIN-THREAD)
3: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
4: ((FLET #:WITHOUT-INTERRUPTS-BODY-1124 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
5: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
6: ((FLET #:WITHOUT-INTERRUPTS-BODY-584 :IN SB-THREAD::CALL-WITH-MUTEX))
7: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FFFCFDAED3B}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THR..
8: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "SDL2 Main Thread" RUNNING {1005F694B3}> NIL #<CLOSURE (LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS) {1005F6943B}> (#<SB..
9: ("foreign function: call_into_lisp")
10: ("foreign function: new_thread_trampoline")
11: ("foreign function: #x7FFFF79C16BC")
I run SBCL 1.2.12.51-012345e on gentoo 64bit with
* media-libs/sdl2-mixer
Latest version available: 2.0.0-r1
* media-libs/libsdl2
Latest version available: 2.0.3-r200
lshw shows that I have an audio device:
*-multimedia
description: Audio device
product: 82801I (ICH9 Family) HD Audio Controller
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=snd_hda_intel latency=0
resources: irq:22 memory:e3220000-e3223fff
I made the following replacement in cepl-sdl.lisp and then now it works
(defmethod cepl-backend:init ((backend-name (eql :sdl)))
(setf *backend* :sdl)
(unless *initd*
(unless (sdl2:init sdl2-ffi:+sdl-init-timer+ sdl2-ffi:+sdl-init-video+) (error "Failed to initialise SDL"))
(setf *initd* t)))
Regards, Martin
If I compile the example files and start (run-demo) an error appears,
mostly this error:
The value -468072688 is not of type SB-INT:INDEX.
[Condition of type TYPE-ERROR]
sometimes it also disconnects or c code is shown as error
I use brew instead of macports to install the dependencies. The below version of osx.lisp works with such a setup. Please note this is a dirty hack as it will break if dependencies are upgraded.
(in-package :cepl-osx)
(defun start ()
(push "/usr/local/Cellar/devil/1.7.8_1/lib/" cffi:*foreign-library-directories*)
(push "/usr/local/Cellar/sdl2/2.0.3/lib/" cffi:*foreign-library-directories*)
(push "/usr/local/Cellar/assimp/3.1.1/lib/" cffi:*foreign-library-directories*)
(sdl2:make-this-thread-main
(lambda () (swank:create-server :style nil :dont-close t))))
Starting from a clean sbcl-slime session, (ql:quickload :cepl-default), and (cepl:repl), there's an odd inconsistency in defun-g.
(cepl:defun-g subtract ((x :float) (r :float)) (- x r))
fails, but
(cepl:defun-g subtract ((x :float) (r :float)) (values (- x r)))
and
(cepl:defun-g subtract ((x :float) (r :float)) (- x (floor r)))
succeed.
http://pastebin.com/cw7bBsWc <- the slime backtrace.
Updated to latest cepl, varjo and traingles.lisp. Cleaned out cached build and recompiled after getting latest...
; SLIME 2015-02-19
CL-USER> (ql:quickload :cepl)
To load "cepl":
Load 1 ASDF system:
cepl
; Loading "cepl"
..................................................
[package varjo]...................................
..................................................
..................................................
[package temporal-functions]......................
[package tiny-time-manager].......................
[package cepl-generics]...........................
[package cepl-backend]............................
[package cepl-utils]..............................
[package base-maths]..............................
[package maths]...................................
[package base-vectors]............................
[package base-matrices]...........................
[package vector2].................................
[package vector3].................................
[package vector4].................................
[package vectors].................................
[package matrix3].................................
[package matrix4].................................
[package matrices]................................
[package quaternions].............................
[package projection]..............................
[package base-space]..............................
[package %cgl]....................................
[package cepl-gl].................................
[package varjo-bridge-types]......................
[package cepl-camera].............................
[package primitives]..............................
[package tools]...................................
[package cepl.events].............................
[package live]....................................
[package cepl]....................................
..................................................
..................................................
..................................................
..................................................
..................................................
.....
(:CEPL)
CL-USER> (ql:quickload :cepl-backend-sdl)
To load "cepl-backend-sdl":
Load 1 ASDF system:
cepl-backend-sdl
; Loading "cepl-backend-sdl"
[package cepl.events.sdl].........
(:CEPL-BACKEND-SDL)
CL-USER> (cepl:repl)
"Setting default options"
-----------------
CEPL-REPL
-----------------
NIL
CL-USER> (in-package :cepl)
#<Package "CEPL">
;Compiling "e:/home/src/triangles.lisp"...
Read error between positions 1032 and 1049 in e:/home/src/triangles.lisp.
CEPL>
Reader error: No external symbol named "OBSERVE" in package #<Package "CEPL.EVENTS"> .
[Condition of type SIMPLE-ERROR]
Restarts:
0: [CONTINUE] Create and use the internal symbol CEPL.EVENTS::OBSERVE
1: [RETRY-COMPILE-FILE] Retry compiling #P"e:/home/src/triangles.lisp"
2: [SKIP-COMPILE-FILE] Skip compiling #P"e:/home/src/triangles.lisp"
3: [ABORT] Abort compilation.
4: [*ABORT] Return to SLIME's top level.
5: [ABORT-BREAK] Reset this thread
--more--
Backtrace:
0: (CCL::%PARSE-TOKEN #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> #\e (NIL))
1: (CCL::%PARSE-EXPRESSION #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> #\e (NIL))
2: (CCL::%READ-LIST-EXPRESSION #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> (NIL) #\))
3: (CCL::READ-LIST #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> NIL #\))
4: (CCL::%PARSE-EXPRESSION #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> #\( NIL)
5: (CCL::%READ-FORM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> NIL (NIL))
6: (CCL::READ-INTERNAL #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> NIL (NIL) NIL)
7: (CCL::READ-RECORDING-SOURCE #<BASIC-FILE-CHARACTER-INPUT-STREAM ("e:/home/src/triangles.lisp"/5024 UTF-8) #xDB0C27E> :EOFVAL (NIL) :FILE-NAME "e:/home/src/triangles.lisp" :START-OFFSET 0 :MAP #<HASH-T..
8: (CCL::FCOMP-READ-LOOP "e:/home/src/triangles.lisp" "e:/home/src/triangles.lisp" 0 #<CCL::LEXICAL-ENVIRONMENT #xDB0C6BE> :NOT-COMPILE-TIME)
9: (CCL::FCOMP-FILE "e:/home/src/triangles.lisp" "e:/home/src/triangles.lisp" 0 #<CCL::LEXICAL-ENVIRONMENT #xDB0C6BE>)
10: (CCL::%COMPILE-FILE "e:/home/src/triangles.lisp" "e:/home/src/triangles.wx32fsl" T NIL T T NIL T :DEFER NIL #<BACKEND WIN32 #xC0E39D6> :DEFAULT NIL 0)
11: (COMPILE-FILE #P"e:/home/src/triangles.lisp" :OUTPUT-FILE #P"e:/home/src/triangles.wx32fsl" :VERBOSE T :PRINT NIL :LOAD NIL :FEATURES NIL :TARGET :WIN32 :SAVE-LOCAL-SYMBOLS T :SAVE-DOC-STRINGS T :SAVE..
12: (SWANK/BACKEND:CALL-WITH-COMPILATION-HOOKS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK/BACKEND:SWANK-COMPILE-FILE) #xDB0C986>)
Locals:
FUNCTION = #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK/BACKEND:SWANK-COMPILE-FILE) #xDB0C986>
#:G12351 = (CCL:COMPILER-WARNING SWANK/CCL::HANDLE-COMPILER-WARNING)
CCL::%HANDLERS% = ((CCL:COMPILER-WARNING SWANK/CCL::HANDLE-COMPILER-WARNING) (SWANK/BACKEND:COMPILER-CONDITION #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::COLLECT-NOTES) #xDB0CB46>) ..)))
CCL:*MERGE-COMPILER-WARNINGS* = NIL
13: (SWANK::SWANK-COMPILE-FILE* #P"e:/home/src/triangles.lisp" T)
14: ((:INTERNAL SWANK:COMPILE-FILE-FOR-EMACS))
15: ((:INTERNAL SWANK::COLLECT-NOTES))
16: (SWANK::MEASURE-TIME-INTERVAL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::COLLECT-NOTES) #xDB0CB1E>)
17: (SWANK::COLLECT-NOTES #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK:COMPILE-FILE-FOR-EMACS) #xDB0CB76>)
18: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK:COMPILE-FILE-FOR-EMACS) #xDB0CBA6>)
19: (CCL::CALL-CHECK-REGS SWANK:COMPILE-FILE-FOR-EMACS "e:\\home\\src\\triangles.lisp" T)
20: (CCL::CHEAP-EVAL (SWANK:COMPILE-FILE-FOR-EMACS "e:\\home\\src\\triangles.lisp" T))
21: (SWANK:EVAL-FOR-EMACS (SWANK:COMPILE-FILE-FOR-EMACS "e:\\home\\src\\triangles.lisp" T) ":cepl" 10)
22: ((:INTERNAL SWANK::SPAWN-WORKER-THREAD))
23: (SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK #<Compiled-function SWANK:SWANK-DEBUGGER-HOOK #xC667AEE> #<Compiled-function (:INTERNAL SWANK::SPAWN-WORKER-THREAD) (Non-Global) #xC63E736>)
24: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #<SWANK/GRAY::SLIME-OUTPUT-STREAM #xC796F7E>) (*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM #xC79718E>) ..))) #<CCL:COMPILED-LEXICAL-CLOSURE (:I..
25: ((:INTERNAL SWANK::SPAWN-WORKER-THREAD))
26: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS worker(14) [Active] #xDB090F6> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xDB08FAE>))
27: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS worker(14) [Active] #xDB090F6> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xDB08FAE>))
28: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))
I have very little experience with "modern opengl" and it's kind of long time time but if I take your triangle.lisp and add one point more to the vertices shouldn't it draw rectangle?
(make-gpu-array (list
(v! -1 -1 0) (v! 1 0 0 1)
(v! -1 0 0) (v! 1 0 0 1)
(v! 0 0 0) (v! 1 0 0 1)
(v! 0 -1 0) (v! 1 0 0 1))
:dimensions 4 :element-type 'pos-col)
For me that draws only triangle, I also tried doing it using indices like in the basic-3d-objects.lisp but either it did not draw anything or it draw just triangle.
Maybe I'm just doing it wrong?
Also you could add small paragraph in the README to explain what your math functions do.
Some are kind of clear but for example this from moving-triangles.lisp
(s~ position :xyz)
It returns array of first 3 values of position but looks kind of spooky.
Using http://ccl.clozure.com/ (1.10) on Windows 8.1
Additional Notes ;;; have not tested with SBCL yet. Originally used CLISP BUT moved to CCL as it better supports multi-threading on Windows.
CEPL> (ql:quickload :cepl-backend-sdl)
To load "cepl-backend-sdl":
Load 1 ASDF system:
cepl-backend-sdl
; Loading "cepl-backend-sdl"
Bound is not *, a SINGLE-FLOAT or a list of a SINGLE-FLOAT: 3
[Condition of type SIMPLE-ERROR]
Restarts:
0: [RETRY-COMPILE-FILE] Retry compiling #P"C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp"
1: [SKIP-COMPILE-FILE] Skip compiling #P"C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp"
2: [RETRY] Retry compiling #<CL-SOURCE-FILE "cepl" "core/events/event-classes">.
3: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "cepl" "core/events/event-classes"> as having been successful.
4: [RETRY] #<error printing RESTART #x445A166E>
5: [CLEAR-CONFIGURATION-AND-RETRY] #<error printing RESTART #x445A1696>
--more--
Backtrace:
0: (CCL::VALUES-SPECIFIER-TYPE (SIMPLE-ARRAY (SINGLE-FLOAT 3)) #<CCL::LEXICAL-ENVIRONMENT #xE325B8E>)
1: (CCL::SPECIFIER-TYPE (SIMPLE-ARRAY (SINGLE-FLOAT 3)) #<CCL::LEXICAL-ENVIRONMENT #xE325B8E>)
2: ((:INTERNAL CCL::CANONICALIZE-SLOT-SPEC DEFCLASS) (VEC :INITARG :VEC :TYPE (SIMPLE-ARRAY (SINGLE-FLOAT 3))))
3: (DEFCLASS (DEFCLASS MOUSE-SCROLL (CEPL.EVENTS::CEPL-EVENT) ((SOURCE-ID :INITARG :SOURCE-ID :INITFORM 0 :READER ...) (VEC :INITARG :VEC :TYPE (SIMPLE-ARRAY #)))) #<CCL::LEXICAL-ENVIRONMENT #xE325B8E>)
4: (FUNCALL #<Compiled-function DEFCLASS Macroexpander #x484A346> (DEFCLASS MOUSE-SCROLL (CEPL.EVENTS::CEPL-EVENT) ..) #<CCL::LEXICAL-ENVIRONMENT #xE325B8E>)
5: (MACROEXPAND-1 (DEFCLASS MOUSE-SCROLL (CEPL.EVENTS::CEPL-EVENT) ((SOURCE-ID :INITARG :SOURCE-ID :INITFORM 0 :READER ...) (VEC :INITARG :VEC :TYPE (SIMPLE-ARRAY #)))) #<CCL::LEXICAL-ENVIRONMENT #xE325B..
6: (CCL::FCOMP-MACROEXPAND-1 (DEFCLASS MOUSE-SCROLL (CEPL.EVENTS::CEPL-EVENT) ((SOURCE-ID :INITARG :SOURCE-ID :INITFORM 0 :READER ...) (VEC :INITARG :VEC :TYPE (SIMPLE-ARRAY #)))) #<CCL::LEXICAL-ENVIRONM..
7: (CCL::FCOMP-FORM-1 (DEFCLASS MOUSE-SCROLL (CEPL.EVENTS::CEPL-EVENT) ((SOURCE-ID :INITARG :SOURCE-ID :INITFORM 0 :READER ...) (VEC :INITARG :VEC :TYPE (SIMPLE-ARRAY #)))) #<CCL::LEXICAL-ENVIRONMENT #xE..
8: (CCL::FCOMP-FORM (DEFCLASS MOUSE-SCROLL (CEPL.EVENTS::CEPL-EVENT) ((SOURCE-ID :INITARG :SOURCE-ID :INITFORM 0 :READER ...) (VEC :INITARG :VEC :TYPE (SIMPLE-ARRAY #)))) #<CCL::LEXICAL-ENVIRONMENT #xE32..
9: (CCL::FCOMP-READ-LOOP "C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" "C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" 0 #<CCL::LEXICAL-ENVIRONMENT #xE..
10: (CCL::FCOMP-FILE "C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" "C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" 0 #<CCL::LEXICAL-ENVIRONMENT #xE325B8..
11: (CCL::%COMPILE-FILE "C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" "C:/Users/Ay/AppData/Local/common-lisp/cache/ccl-1.10-f96-win-x86/C/quicklisp/local-projects/cepl-master/co..
12: (COMPILE-FILE #P"C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" :OUTPUT-FILE #P"C:/Users/Ay/AppData/Local/common-lisp/cache/ccl-1.10-f96-win-x86/C/quicklisp/local-projects/cep..
13: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL UIOP/LISP-BUILD:COMPILE-FILE*) #xE3221AE> NIL)
14: (UIOP/PATHNAME:CALL-WITH-ENOUGH-PATHNAME #P"C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL ..))
15: (UIOP/LISP-BUILD:COMPILE-FILE* #P"C:/quicklisp/local-projects/cepl-master/core/events/event-classes.lisp" :OUTPUT-FILE #P"C:/Users/Ay/AppData/Local/common-lisp/cache/ccl-1.10-f96-win-x86/C/quicklisp/l..
16: (FUNCALL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL ASDF/LISP-ACTION:PERFORM-LISP-COMPILATION) #xE3222B6>)
17: (ASDF/LISP-ACTION:PERFORM-LISP-COMPILATION #<COMPILE-OP > #<CL-SOURCE-FILE "cepl" "core/events/event-classes">)
18: (CCL::%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL #<STANDARD-METHOD ASDF/ACTION:PERFORM (ASDF/LISP-ACTION:COMPILE-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)> . 286516542))
19: (CCL::%%STANDARD-COMBINED-METHOD-DCODE ((#<STANDARD-METHOD ASDF/ACTION:PERFORM :BEFORE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)>) ..))) 286516542)
20: (NIL #<Unknown Arguments>)
21: (CCL::%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (T T)> . 286516583))
22: (#<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)> #<COMPILE-OP > #<CL-SOURCE-FILE "cepl" "core/events/event-classes">)
23: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)> #<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (T T)>) 286516583)
24: (NIL #<Unknown Arguments>)
25: (#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN (LIST)> ((#<COMPILE-OP > . #<SYSTEM "alexandria">) (#<PREPARE-OP > . #<SYSTEM "uiop">) (#<COMPILE-OP > . #<SYSTEM "uiop">) ..))) :FORCE NIL)
26: (CCL::%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN (LIST)> . 286516644))
27: (CCL::CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY (ASDF/PLAN:PERFORM-PLAN :AROUND (T))) #x445A148E> :OVERRIDE NIL)
28: (#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)> ((#<COMPILE-OP > . #<SYSTEM "alexandria">) (#<PREPARE-OP > . #<SYSTEM "uiop">) (#<COMPILE-OP > . #<SYSTEM "uiop">) ..))))
29: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)> #<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN (LIST)>) 286516644)
30: (NIL #<Unknown Arguments>)
31: (CCL::%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN (T)> . 286516697))
32: (CCL::CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY (ASDF/PLAN:PERFORM-PLAN :AROUND (T))) #x445A151E> :OVERRIDE NIL)
33: (#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)> #<ASDF/PLAN:SEQUENTIAL-PLAN #xE26B68E>)
34: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)> #<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN (T)>) 286516697)
35: (NIL #<Unknown Arguments>)
36: (#<STANDARD-METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)> #<LOAD-OP :VERBOSE NIL> #<SYSTEM "cepl-backend-sdl"> :VERBOSE NIL)
37: (CCL::%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)> #<LOAD-OP :VERBOSE NIL> #<SYSTEM "cepl-backend-sdl"> :VERBOSE NIL))
38: ((:INTERNAL (ASDF/OPERATE:OPERATE :AROUND (T T))))
39: (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)> #<LOAD-OP :VERBOSE NIL> #<SYSTEM "cepl-backend-sdl"> :VERBOSE NIL)
40: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)> (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :BEFORE #> #<#>) NIL ..))) 286516769)
41: (NIL #<Unknown Arguments>)
42: (CCL::%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD ASDF/OPERATE:OPERATE (SYMBOL T)> ASDF/LISP-ACTION:LOAD-OP "cepl-backend-sdl" :VERBOSE NIL))
43: ((:INTERNAL (ASDF/OPERATE:OPERATE :AROUND (T T))))
44: (ASDF/CACHE:CALL-WITH-ASDF-CACHE #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL (ASDF/OPERATE:OPERATE :AROUND (T T))) #xE26BA7E> :OVERRIDE NIL :KEY NIL)
45: (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)> ASDF/LISP-ACTION:LOAD-OP "cepl-backend-sdl" :VERBOSE NIL)
46: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)> (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :BEFORE #>) NIL ..) 286516852)
47: (NIL #<Unknown Arguments>)
48: (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)> ASDF/LISP-ACTION:LOAD-OP "cepl-backend-sdl" :VERBOSE NIL)
49: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)> (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :BEFORE #>) NIL ..) 286516887)
50: (NIL #<Unknown Arguments>)
51: (QUICKLISP-CLIENT::CALL-WITH-MACROEXPAND-PROGRESS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL QUICKLISP-CLIENT::APPLY-LOAD-STRATEGY) #xE269B5E>)
52: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "cepl-backend-sdl" :PROMPT NIL)
53: (#<STANDARD-METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)> #<QL-IMPL:CCL #xC45DFE6> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL QUICKLISP-CLIENT::QL ..))
54: (#<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD (T)> (:CEPL-BACKEND-SDL) :PROMPT NIL :SILENT NIL :VERBOSE NIL)
55: (CCL::%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD (T)> :CEPL-BACKEND-SDL))
56: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL (QUICKLISP-CLIENT:QUICKLOAD :AROUND (T))) #xE26A95E>)
57: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD :AROUND (T)> #<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD (T)>) 286516999)
58: (NIL #<Unknown Arguments>)
59: (CCL::CALL-CHECK-REGS QUICKLISP-CLIENT:QUICKLOAD :CEPL-BACKEND-SDL)
60: (CCL::CHEAP-EVAL (QUICKLISP-CLIENT:QUICKLOAD :CEPL-BACKEND-SDL))
Locals:
FORM = (QUICKLISP-CLIENT:QUICKLOAD :CEPL-BACKEND-SDL)
*NX-SOURCE-NOTE-MAP* = NIL
61: (SWANK::EVAL-REGION "(ql:quickload :cepl-backend-sdl)\n")
62: ((:INTERNAL SWANK-REPL::REPL-EVAL))
63: (SWANK-REPL::TRACK-PACKAGE #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xE26AAAE>)
64: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xE26AAFE>)
65: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xE26AB26>)
66: (SWANK-REPL::REPL-EVAL "(ql:quickload :cepl-backend-sdl)\n")
67: (CCL::CALL-CHECK-REGS SWANK-REPL:LISTENER-EVAL "(ql:quickload :cepl-backend-sdl)\n")
68: (CCL::CHEAP-EVAL (SWANK-REPL:LISTENER-EVAL "(ql:quickload :cepl-backend-sdl)\n"))
69: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(ql:quickload :cepl-backend-sdl)\n") "CEPL" 22)
70: (SWANK::PROCESS-REQUESTS NIL)
71: ((:INTERNAL SWANK::HANDLE-REQUESTS))
72: ((:INTERNAL SWANK::HANDLE-REQUESTS))
73: (SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK #<Compiled-function SWANK:SWANK-DEBUGGER-HOOK #xC6A840E> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::HANDLE-REQUESTS) #xC7EB1DE>)
74: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #<SWANK/GRAY::SLIME-OUTPUT-STREAM #xC7DE4BE>) (*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM #xC7DE6CE>) ..))) #<CCL:COMPILED-LEXICAL-CLOSURE (:I..
75: (SWANK::HANDLE-REQUESTS #<MULTITHREADED-CONNECTION #xC700B76> NIL)
76: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS repl-thread(12) [Active] #xC7DE8C6> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xC7DE77E>))
77: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS repl-thread(12) [Active] #xC7DE8C6> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xC7DE77E>))
78: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))
Work if I force it but I need to make it try one version and fallback if it fails
I am using Ubuntu 13.10
I compile and load example 11.lisp (run-demo) produces this error:
Unhandled memory fault at #x4F8.
[Condition of type SB-SYS:MEMORY-FAULT-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {10053D0063}>)
Backtrace:
0: (SB-SYS:MEMORY-FAULT-ERROR)
1: ("foreign function: call_into_lisp")
2: ("foreign function: post_signal_tramp")
3: ("foreign function: #x7FFFF657B469")
4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RUN-DEMO) #)
5: (EVAL (RUN-DEMO))
6: (SWANK::EVAL-REGION "(run-demo)\n")
Running:
platform-specific/osx-sbcl-launch.sh
from the cepl dir produces:
# <THREAD "main thread" RUNNING {1002C0ED23}>:
System "cepl-osx" not found```
A request from a user, to address the fact that cepl doesnt support everything yet and so being able to drop in a glsl shader and have it just work would be useful.
CEPL errors with backtrace
Steps to reproduce
I'm running on (arch) linux with sbcl. My gpu is AMD/ATI Richland's Radeon HD 8650G. I snuck a "core" in varjo's gen-shader-string and modified cepl-backend to request a context for OpenGL 3.3 core. I will attach diffs.
Crash description
Anyway, (cepl:repl) crashes with backtrace
OpenGL signalled (1280 . INVALID-ENUM) from GET-STRING.
[Condition of type CL-OPENGL-BINDINGS:OPENGL-ERROR]
Restarts:
0: [CONTINUE] Continue
1: [RETRY] Retry SLIME REPL evaluation request.
2: [*ABORT] Return to SLIME's top level.
3: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1004388033}>)
Backtrace:
0: (CL-OPENGL-BINDINGS:CHECK-ERROR #)
[No Locals]
1: (CEPL-GL:HAS-FEATURE "GL_ARB_texture_storage")
Locals:
SB-DEBUG::ARG-0 = "GL_ARB_texture_storage"
2: (CEPL-GL::TEXTURE-FEATURE-CHECK #)
[No Locals]
3: (CEPL.EVENTS::|context| #<CEPL.EVENTS:CONTEXT-CREATED {1003C0DFD3}>)
Locals:
SB-DEBUG::ARG-0 = #<CEPL.EVENTS:CONTEXT-CREATED {1003C0DFD3}>
4: (CEPL.EVENTS::|all-events| #<CEPL.EVENTS:CONTEXT-CREATED {1003C0DFD3}>)
Locals:
SB-DEBUG::ARG-0 = #<CEPL.EVENTS:CONTEXT-CREATED {1003C0DFD3}>
5: (CEPL:REPL 320 240 :SDL)
Locals:
BACKEND = :SDL
HEIGHT = 240
WIDTH = 320
6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CEPL:REPL) #)
Locals:
SB-DEBUG::ARG-0 = (CEPL:REPL)
SB-DEBUG::ARG-1 = #
7: (EVAL (CEPL:REPL))
Locals:
SB-DEBUG::ARG-0 = (CEPL:REPL)
...
defined in cepl.lisp, declared by package.lisp to be in cepl-utils.
https://github.com/cbaggers/cepl/blob/master/package.lisp#L21
https://github.com/cbaggers/cepl/blob/master/cepl.lisp#L70
I'm just starting to learn common lisp and cepl. So far I love it! Beautiful piece of craftsmanship.
Hi
Have you manage to get classimp working on Windows with the laters assimp.dll version. I could not load models using it when i tried.
Sorry I know it's not cepl specific but thought it worth asking as it seems to be a cepl dependency and i would like to use cepl on windows.
Cheers,
Downloaded latest, ran (ql:quickload :cepl) got following errors:
To load "cepl":
Load 1 ASDF system:
cepl
; Loading "cepl"
...........; Failure to alias foreign type __BUILTIN_VA_LIST to VA-LIST
; due to undefined foreign type: __BUILTIN_VA_LIST
; Failure to alias foreign type __BUILTIN_VA_LIST to __GNUC_VA_LIST due to
; undefined foreign type: __BUILTIN_VA_LIST
; Unable to define foreign STRUCT #:ANON-TYPE-1012 due to:
; Failure to define :struct #:ANON-TYPE-1012 wrt. field FP of type
; (:POINTER FILE) due to undefined foreign type: FILE
; Unable to define foreign UNION #:ANON-TYPE-1011 due to:
; Failure to define :union #:ANON-TYPE-1011 wrt. field STDIO of type
; (AUTOWRAP::STRUCT
; (COMMON-LISP:NIL :ID 35 :BIT-SIZE 128 :BIT-ALIGNMENT 64)
; (AUTOCLOSE SDL-BOOL :BIT-SIZE 32 :BIT-OFFSET 0 :BIT-ALIGNMENT 32)
; (FP (:POINTER FILE) :BIT-SIZE 64 :BIT-OFFSET 64 :BIT-ALIGNMENT 64))
; due to undefined foreign type:
; (STRUCT (NIL ID 35 BIT-SIZE 128 BIT-ALIGNMENT 64)
; (AUTOCLOSE SDL-BOOL BIT-SIZE 32 BIT-OFFSET 0 BIT-ALIGNMENT 32)
; (FP (POINTER FILE) BIT-SIZE 64 BIT-OFFSET 64 BIT-ALIGNMENT 64))
; Unable to define foreign STRUCT SDL-RWOPS due to:
; Failure to define :struct SDL-RWOPS wrt. field HIDDEN of type
; (COMMON-LISP:UNION
; (COMMON-LISP:NIL :ID 34 :BIT-SIZE 192 :BIT-ALIGNMENT 64)
; (STDIO
; (AUTOWRAP::STRUCT
; (COMMON-LISP:NIL :ID 35 :BIT-SIZE 128 :BIT-ALIGNMENT 64)
; (AUTOCLOSE SDL-BOOL :BIT-SIZE 32 :BIT-OFFSET 0 :BIT-ALIGNMENT 32)
; (FP (:POINTER FILE) :BIT-SIZE 64 :BIT-OFFSET 64 :BIT-ALIGNMENT 64))
; :BIT-SIZE 128 :BIT-OFFSET 0 :BIT-ALIGNMENT 64)
; (MEM
; (AUTOWRAP::STRUCT
; (COMMON-LISP:NIL :ID 36 :BIT-SIZE 192 :BIT-ALIGNMENT 64)
; (BASE (:POINTER UINT8) :BIT-SIZE 64 :BIT-OFFSET 0 :BIT-ALIGNMENT
; 64)
; (HERE (:POINTER UINT8) :BIT-SIZE 64 :BIT-OFFSET 64 :BIT-ALIGNMENT
; 64)
; (STOP (:POINTER UINT8) :BIT-SIZE 64 :BIT-OFFSET 128 :BIT-ALIGNMENT
; 64))
; :BIT-SIZE 192 :BIT-OFFSET 0 :BIT-ALIGNMENT 64)
; (UNKNOWN
; (AUTOWRAP::STRUCT
; (COMMON-LISP:NIL :ID 37 :BIT-SIZE 128 :BIT-ALIGNMENT 64)
; (DATA1 (:POINTER :VOID) :BIT-SIZE 64 :BIT-OFFSET 0 :BIT-ALIGNMENT
; 64)
; (DATA2 (:POINTER :VOID) :BIT-SIZE 64 :BIT-OFFSET 64 :BIT-ALIGNMENT
; 64))
; :BIT-SIZE 128 :BIT-OFFSET 0 :BIT-ALIGNMENT 64))
; due to undefined foreign type:
; (UNION (NIL ID 34 BIT-SIZE 192 BIT-ALIGNMENT 64)
; (STDIO
; (STRUCT (NIL ID 35 BIT-SIZE 128 BIT-ALIGNMENT 64)
; (AUTOCLOSE SDL-BOOL BIT-SIZE 32 BIT-OFFSET 0 BIT-ALIGNMENT
; 32)
; (FP (POINTER FILE) BIT-SIZE 64 BIT-OFFSET 64 BIT-ALIGNMENT
; 64))
; BIT-SIZE 128 BIT-OFFSET 0 BIT-ALIGNMENT 64)
; (MEM
; (STRUCT (NIL ID 36 BIT-SIZE 192 BIT-ALIGNMENT 64)
; (BASE (POINTER UINT8) BIT-SIZE 64 BIT-OFFSET 0 BIT-ALIGNMENT
; 64)
; (HERE (POINTER UINT8) BIT-SIZE 64 BIT-OFFSET 64 BIT-ALIGNMENT
; 64)
; (STOP (POINTER UINT8) BIT-SIZE 64 BIT-OFFSET 128
; BIT-ALIGNMENT 64))
; BIT-SIZE 192 BIT-OFFSET 0 BIT-ALIGNMENT 64)
; (UNKNOWN
; (STRUCT (NIL ID 37 BIT-SIZE 128 BIT-ALIGNMENT 64)
; (DATA1 (POINTER VOID) BIT-SIZE 64 BIT-OFFSET 0 BIT-ALIGNMENT
; 64)
; (DATA2 (POINTER VOID) BIT-SIZE 64 BIT-OFFSET 64 BIT-ALIGNMENT
; 64))
; BIT-SIZE 128 BIT-OFFSET 0 BIT-ALIGNMENT 64))
; Failure to define function SDL-RW-FROM-FP (nee "SDL_RWFromFP") wrt.
; parameter FP of type (:POINTER FILE) due to undefined foreign type: FILE
; Failure to alias foreign type |UNKNOWN-TYPE:VECTOR| to |__M64| due to
; undefined foreign type: UNKNOWN-TYPE:VECTOR
; Failure to alias foreign type |UNKNOWN-TYPE:VECTOR| to __V2SI due to
; undefined foreign type: UNKNOWN-TYPE:VECTOR
... lots more of these
Hi, I tried using cepl on Mac 10.8, it fails with this:
OpenGL signalled (1280 . INVALID-ENUM) from GET-INTEGER-V.
[Condition of type CL-OPENGL-BINDINGS:OPENGL-ERROR]
Restarts:
0: [CONTINUE] Continue
1: [RETRY] Retry SLIME REPL evaluation request.
2: [*ABORT] Return to SLIME's top level.
3: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {1003468023}>)
Backtrace:
0: (CL-OPENGL-BINDINGS:CHECK-ERROR #<unavailable argument>)
[No Locals]
1: (CL-OPENGL:GET-INTEGER :NUM-EXTENSIONS 1)
Locals:
COUNT = 1
VALUE = :NUM-EXTENSIONS
2: (CEPL::GET-GL-EXTENSIONS)
[No Locals]
3: (CEPL::CEPL-POST-CONTEXT-INITIALIZE)
[No Locals]
4: (CEPL:REPL 640 480)
Locals:
HEIGHT = 480
WIDTH = 640
5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CEPL:REPL) #<NULL-LEXENV>)
Locals:
SB-DEBUG::ARG-0 = (CEPL:REPL)
SB-DEBUG::ARG-1 = #<NULL-LEXENV>
6: (EVAL (CEPL:REPL))
SDL 2.0.0 was installed from source.
If I define get-gl-extensions to nil, I can load the examples.
I am pretty sure this is a problem on my side, but maybe you can help. I've put the error message and the results of glxinfo below. glxinfo shows some results for 3.3. Any ideas how I can resolve this?
Thanks,
Michael
Here is the error I get when I try to compile the basic-3d-objects example:
Error compiling vertex-shader:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
struct G_PC {
vec3 POS;
vec4 COL;
};
My computer is running Ubuntu 14.04 with an NVidia graphics card:
mfleming@poincare:~$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.4
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 11.0.4
OpenGL shading language version string: 1.30
Easiest way to test this is (make-fbo :c)
, you will need to disable immutable tex storage for now but we get a crash about an incomplete attachment, which makes sense if the texture is incomplete. Does not happen with our immutable-storage backed textures
When I try to compile the shader,
(defun-g vert ((vert :vec2))
(values (v! (+ vert *pos*) 0.0 1.0)
(v! 0 0)))
I get a compilation error (backtrace attached).
This is probably not a cepl error, but I don't know how to debug it
vertex-error.txt
.
I'm under the impression that you've been using cepl on osx and ccl occasionally, and I was trying to figure out how you modified utils-kt to work. a read macro seems to disable utils-kt from working on ccl in the utils-kt.asd, but there is other weirdness that follows, and my build machine was recently wiped so I'd lost whatever work I'd done to make this project and cepl work together. Any thoughts?
(make-texture nil :dimensions 10 :element-type :uint8 :layer-count 8)
There is a project going on where common lisp was ported to run on top of the llvm. The name of the project is clasp. I wanted to let you know since you are doing quite a bit of interop with c/c++.
https://github.com/drmeister/clasp
https://drmeister.wordpress.com/author/drmeister/
I am not sure of where performance is right now, but it is something to keep an eye out for =)
CL-USER> (cepl:repl)
CEPL-REPL
NIL
CL-USER>
OS: Windows
CL: SBCL
Arch: x86_64
I was trying to render 16 * 16 * 16 boxes.
I collected the vertices into one list and indices into other, so all of the vertices from 4096 boxes where in the same list.
(let ((vr (make-gpu-array verts :dimensions v-count :element-type 'g-pnc))
(ir (make-gpu-array ind :dimensions i-count :element-type :unsigned-int)))
(vector-push-extend (cons id (make-buffer-stream vr :index-array ir)) meshes)
(free-gpu-array vr)
(free-gpu-array ir)
Then I rendered, and it worked. I called free-vertex-stream on the buffer-stream.
I tried to create new mesh but I got opengl error 1285 . out-of-memory
Is it correct to free the gpu arrays after the stream has been made?
What am I not freeing correctly if I run out of memory?
I was looking at cepl's source and found possible bug?
delete-vertex-arrays is not inside the loop.
(defun free-vaos (vaos)
(with-foreign-object (id :uint (length vaos))
(loop :for vao :in vaos :for i :from 0 :do
(setf (mem-aref id :uint i) vao))
(%gl:delete-vertex-arrays 1 id)))
platform-specific/osx.lisp
is currently adding places to search for libs installed via macports and brew.
The search is WAAY to broad so we need to narrow it down
osx.lisp
[EDIT]
Because of refactoring this code is currently in repl.lisp
also the main task is to find some info on best practices.
OpenGL signalled (1280 . INVALID-ENUM) from GET-INTEGER-V.
[Condition of type CL-OPENGL-BINDINGS:OPENGL-ERROR]
Restarts:
0: [CONTINUE] Continue
1: [RETRY] Retry SLIME REPL evaluation request.
2: [*ABORT] Return to SLIME's top level.
3: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {1003448023}>)
Backtrace:
0: (CL-OPENGL-BINDINGS:CHECK-ERROR #)
1: (CL-OPENGL:GET-INTEGER :NUM-EXTENSIONS 1)
2: (CEPL::GET-GL-EXTENSIONS)
3: (CEPL::CEPL-POST-CONTEXT-INITIALIZE)
4: (CEPL:REPL 640 480)
5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (CEPL:REPL) #)
6: (EVAL (CEPL:REPL))
7: (SWANK::EVAL-REGION "(cepl:repl) ..)
8: ((LAMBDA NIL :IN SWANK::REPL-EVAL))
9: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK::REPL-EVAL) {1002FD84DB}>)
10: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK::REPL-EVAL) {1002FD83FB}>)
11: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK::REPL-EVAL) {1002FD83DB}>)
12: (SWANK::REPL-EVAL "(cepl:repl) ..)
I've decided to try CEPL on ECL. Everything builds fine, but can't run any demo – the condition is rised:
In function STRUCTURE-REF, the value of the first argument is
NIL
which is not of the expected type FBO
[Condition of type SIMPLE-TYPE-ERROR]
Related part of the backtrace:
5: STRUCTURE-REF
6: %ATTACHMENT
Locals:
"CEPL-GL:FBO" = NIL
"CEPL-GL::ATTACHMENT-NAME" = 0
7: ATTACHMENT
Locals:
"CEPL-GL:FBO" = NIL
"CEPL-GL::ATTACHMENT-NAME" = 0
8: CURRENT-VIEWPORT
9: STEP-DEMO
10: RUN-LOOP
11: #<bytecompiled-function BYTECODES>
12: EVAL-REGION
Locals:
"COMMON-LISP:STRING" = "(cepl::run-loop)\n"
"COMMON-LISP:STREAM" = #<string-input stream from "(cepl...">
"COMMON-LISP:VALUES" = NIL
"SWANK::FORM" = (CEPL::RUN-LOOP)
"#:G863" = #<frame 0>
"#:G862" = LIST
Regards,
Daniel
http://projects.tuxee.net/cl-vectors/
net.tuxee.vectors is already nicknamed 'vectors' and clashes with the package of the same name
Swank does not start automatically when launching platform-specific/osx-sbcl-launch.sh but can I can start it manually using:
(swank:create-server :port 4005)
After installing sdl2, devil and assimp using hombrew I get the following error when running:
(ql:quickload :cepl-default)
Unable to load any of the alternatives: ("libIL.dylib" "libIL.1.dylib") [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]
We should be able to specify out of order attachment mapping. CEPL internals know how to do this in a performant way, which will not be possible in this case, BUT we should still be able to do it.
This can be found in a package called devil
on ArchLinux, not sure about what else.
cgl:make-texture internal format can not accept :depth-component16 and over special internal formats. This is due to the limitation imposed by the calc-sampler-type function.
As a workaround i just added :depth-component16 to the the non int lists.
This started since by switch to sdl2. I'm not sure if this is related to my hardware. I need to do two things.
This is a stupid mistake. I may hold off on this for now though as I am rewriting Varjo and sfuns will be part of the core functionality. I will handle all this chaining in varjo at that point.
Error compiling vertex-shader:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
#version 330
layout(location = 0) in vec4 position;
uniform vec4 offset;
uniform int i;
uniform float loop;
vec4 calc_offset_8v(float i_5v, float loop_6v);
vec4 calc_offset_8v(float i_5v, float loop_6v) {
float i_7v = (i_5v / 2);
return vec4(sin((cos(i_7v) + loop_6v)),cos((tan(i_7v) + loop_6v)),0.0f,0.0f);
}
void main() {
gl_Position = (offset + (position + calc_offset_8v(float(i),loop)));
}
[Condition of type SIMPLE-ERROR]
Restarts:
0: [CONTINUE] CEPL Continue
1: [RETRY] Retry SLIME REPL evaluation request.
2: [*ABORT] Return to SLIME's top level.
3: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {100930B313}>)
Backtrace:
0: (CEPL-GL::MAKE-SHADER :VERTEX-SHADER "#version 330 ..)
Locals:
SHADER-ID = 1
SHADER-TYPE = :VERTEX-SHADER
SOURCE-STRING = "#version 330\n\nlayout(location = 0) in vec4 position;\n\nuniform vec4 offset;\nuniform int i;\nuniform float loop;\n\nvec4 calc_offset_8v(float i_5v, float loop_6v);\n\nvec4 calc_offset_8v(float i_5..
1: (CEPL-GL::%%-PROG-1)
[No Locals]
2: (PROG-1 #S(CEPL-GL::VERTEX-STREAM :VAO 1 :START 0 :LENGTH 3 :INDEX-TYPE NIL :MANAGED T) :OFFSET #(0.0 0.0 0.0 0.0) :I 0.0 :LOOP 0.01)
Locals:
#:I-DEFAULTING-TEMP = 0.0
#:LOOP-DEFAULTING-TEMP = 0.01
#:OFFSET-DEFAULTING-TEMP = #(0.0 0.0 0.0 0.0)
STREAM = #S(CEPL-GL::VERTEX-STREAM :VAO 1 :START 0 :LENGTH 3 :INDEX-TYPE NIL :MANAGED T)
3: (DRAW #S(CEPL-GL::VERTEX-STREAM :VAO 1 :START 0 :LENGTH 3 :INDEX-TYPE NIL :MANAGED T))
Locals:
SB-DEBUG::ARG-0 = #S(CEPL-GL::VERTEX-STREAM :VAO 1 :START 0 :LENGTH 3 :INDEX-TYPE NIL :MANAGED T)
4: (RUN-DEMO)
[No Locals]
5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RUN-DEMO) #<NULL-LEXENV>)
Locals:
SB-DEBUG::ARG-0 = (RUN-DEMO)
SB-DEBUG::ARG-1 = #<NULL-LEXENV>
6: (EVAL (RUN-DEMO))
Locals:
SB-DEBUG::ARG-0 = (RUN-DEMO)
7: (SWANK::EVAL-REGION "(run-demo) ..)
Locals:
SB-DEBUG::ARG-0 = "(run-demo)\n"
8: ((LAMBDA NIL :IN SWANK::REPL-EVAL))
[No Locals]
9: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK::REPL-EVAL) {100B758F1B}>)
Locals:
SB-DEBUG::ARG-0 = #<CLOSURE (LAMBDA () :IN SWANK::REPL-EVAL) {100B758F1B}>
10: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK::REPL-EVAL) {100B758E5B}>)
Locals:
SB-DEBUG::ARG-0 = "Retry SLIME REPL evaluation request."
SB-DEBUG::ARG-1 = #<CLOSURE (LAMBDA () :IN SWANK::REPL-EVAL) {100B758E5B}>
11: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK::REPL-EVAL) {100B758E3B}>)
Locals:
SB-DEBUG::ARG-0 = NIL
SB-DEBUG::ARG-1 = #<CLOSURE (LAMBDA () :IN SWANK::REPL-EVAL) {100B758E3B}>
12: (SWANK::REPL-EVAL "(run-demo) ..)
Locals:
SB-DEBUG::ARG-0 = "(run-demo)\n"
13: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(run-demo) ..)
Locals:
SB-DEBUG::ARG-0 = (SWANK:LISTENER-EVAL "(run-demo)\n")
SB-DEBUG::ARG-1 = #<NULL-LEXENV>
14: (EVAL (SWANK:LISTENER-EVAL "(run-demo) ..)
Locals:
SB-DEBUG::ARG-0 = (SWANK:LISTENER-EVAL "(run-demo)\n")
15: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(run-demo) ..)
Locals:
SB-DEBUG::ARG-0 = (SWANK:LISTENER-EVAL "(run-demo)\n")
SB-DEBUG::ARG-1 = "CEPL"
SB-DEBUG::ARG-2 = 2535
16: (SWANK::PROCESS-REQUESTS NIL)
Locals:
SB-DEBUG::ARG-0 = NIL
17: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
[No Locals]
18: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
[No Locals]
19: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {10093100EB}>)
Locals:
CONTINUATION = #<CLOSURE (LAMBDA () :IN SWANK::HANDLE-REQUESTS) {10093100EB}>
HOOK = #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
20: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/francis/quicklisp/dists/quicklisp/software/slime-2.5/swank-sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HA..
Locals:
SWANK-BACKEND::FUN = #<CLOSURE (LAMBDA () :IN SWANK::HANDLE-REQUESTS) {10093100EB}>
SWANK-BACKEND::HOOK = #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
21: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #1=#<SWANK-BACKEND::SLIME-OUTPUT-STREAM {10092EB8F3}>) (*STANDARD-INPUT* . #2=#<SWANK-BACKEND::SLIME-INPUT-STREAM {1005850003}>) (*TRACE-OUTPUT* . #1#)..
Locals:
SB-DEBUG::ARG-0 = ((*STANDARD-OUTPUT* . #<SWANK-BACKEND::SLIME-OUTPUT-STREAM {10092EB8F3}>) (*STANDARD-INPUT* . #<SWANK-BACKEND::SLIME-INPUT-STREAM {1005850003}>) ..)
SB-DEBUG::ARG-1 = #<CLOSURE (LAMBDA () :IN SWANK::HANDLE-REQUESTS) {100931010B}>
22: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {1006F4FB73}> NIL)
Locals:
CONNECTION = #<SWANK::MULTITHREADED-CONNECTION {1006F4FB73}>
TIMEOUT = NIL
23: ((FLET #:WITHOUT-INTERRUPTS-BODY-1226 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
[No Locals]
Catch-tags:
SB-THREAD::%RETURN-FROM-THREAD
24: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE))
[No Locals]
Catch-tags:
SB-THREAD::%ABORT-THREAD
SB-IMPL::%END-OF-THE-WORLD
SB-INT:TOPLEVEL-CATCHER
25: ((FLET #:WITHOUT-INTERRUPTS-BODY-660 :IN SB-THREAD::CALL-WITH-MUTEX))
[No Locals]
26: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FFFE7DAEBAB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THR..
Locals:
SB-DEBUG::ARG-0 = #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FFFE7DAEBAB}>
SB-DEBUG::ARG-1 = #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "repl-thread" RUNNING {100930B313}>>
SB-DEBUG::ARG-2 = NIL
SB-DEBUG::ARG-3 = T
SB-DEBUG::ARG-4 = NIL
27: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "repl-thread" RUNNING {100930B313}> #S(SB-THREAD:SEMAPHORE :NAME "Thread setup semaphore" :%COUNT 0 :WAITCOUNT 0 :MUTEX #<SB-THREAD:MU..
Locals:
SB-DEBUG::ARG-0 = #<SB-THREAD:THREAD "repl-thread" RUNNING {100930B313}>
SB-DEBUG::ARG-1 = #S(SB-THREAD:SEMAPHORE :NAME "Thread setup semaphore" :%COUNT 0 :WAITCOUNT 0 :MUTEX #<SB-THREAD:MUTEX (free) {100930B383}> :QUEUE #<SB-THREAD:WAITQUEUE {100930B3B3}>)
SB-DEBUG::ARG-2 = #<CLOSURE (LAMBDA () :IN SWANK::SPAWN-REPL-THREAD) {100930B29B}>
SB-DEBUG::ARG-3 = NIL
SB-DEBUG::ARG-4 = NIL
SB-DEBUG::ARG-5 = NIL
SB-DEBUG::ARG-6 = NIL
28: ("foreign function: call_into_lisp")
[No Locals]
29: ("foreign function: new_thread_trampoline")
[No Locals]
The error occurs when I attempt to run /examples/2.lisp
. It's bubbling up from cl-opengl:compile-shader
(ie, the underlying C code). I am, as far as I know, using the versions of everything as specified in cl-sdl2, varjo and cepl. (google "common lisp depend on a specific version of a C program")
doesn't turn up a canonical way to go about this.
I currently don't understand the codebase well enough to say what should be done about the situation. (An asdf operation that indicates if you're running the supported versions of the required software? [Note: the UNIX program glxinfo appears to provide much of the information necessary for this])
Machine & Lisp information
{:os-info "Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy"
:machine-type "X86-64"
:machine-version "Intel(R) Celeron(R) CPU B800 @ 1.50GHz"
:software-type "Linux"
:software-version "3.11.0-12-generic"
:lisp-implementation-type "SBCL"
:lisp-implementation-version "1.1.17.9-4e815e8"}
Can be found in the package assimp
on ArchLinux
CEPL> (ql:quickload :cepl)
To load "cepl":
Load 1 ASDF system:
cepl
; Loading "cepl"
(:CEPL)
CEPL> (ql:quickload :cepl-backend-sdl)
To load "cepl-backend-sdl":
Load 1 ASDF system:
cepl-backend-sdl
; Loading "cepl-backend-sdl"
(:CEPL-BACKEND-SDL)
CEPL> (cepl:repl)
"Setting default options"
-----------------
CEPL-REPL
-----------------
NIL
CEPL> (in-package :cepl)
#<Package "CEPL">
;Compiling "e:/home/src/moving-triangles.lisp"...
CEPL> (run-loop)
; uploading (PROG-1 ...)
OpenGL signalled (1282 . INVALID-OPERATION) from ATTACH-SHADER.
[Condition of type CL-OPENGL-BINDINGS:OPENGL-ERROR]
Restarts:
0: [CONTINUE] Continue
1: [CONTINUE] CEPL Continue
2: [RETRY] Retry SLIME REPL evaluation request.
3: [*ABORT] Return to SLIME's top level.
4: [ABORT-BREAK] Reset this thread
5: [ABORT] Kill this thread
Backtrace:
0: (CL-OPENGL-BINDINGS:CHECK-ERROR CL-OPENGL-BINDINGS:ATTACH-SHADER)
1: (CL-OPENGL-BINDINGS:ATTACH-SHADER 1 1)
2: (CEPL-GL::LINK-SHADERS (1 2) 1 (#<VARJO::VARJO-COMPILE-RESULT #xE10FB2E> #<VARJO::VARJO-COMPILE-RESULT #xE101DEE>))
3: (CEPL-GL::%COMPILE-LINK-AND-UPLOAD PROG-1 1 ((:VERTEX . VERT) (:FRAGMENT . FRAG)))
4: (#:|init14979|)
5: (PROG-1 #S(CEPL-GL::VERTEX-STREAM :VAO 1 :START 0 :LENGTH ...) :LOOP 0.004 :I 0.0)
6: (STEP-DEMO)
7: (RUN-LOOP)
8: (CCL::CALL-CHECK-REGS RUN-LOOP)
9: (CCL::CHEAP-EVAL (RUN-LOOP))
10: (SWANK::EVAL-REGION "(run-loop)\n")
Locals:
STRING = "(run-loop)\n"
STREAM = #<STRING-INPUT-STREAM #xE081FB6>
VALUES = NIL
- = (RUN-LOOP)
FORM = (RUN-LOOP)
11: ((:INTERNAL SWANK-REPL::REPL-EVAL))
12: (SWANK-REPL::TRACK-PACKAGE #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xE081FCE>)
13: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xE08201E>)
14: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xE082046>)
15: (SWANK-REPL::REPL-EVAL "(run-loop)\n")
16: (CCL::CALL-CHECK-REGS SWANK-REPL:LISTENER-EVAL "(run-loop)\n")
17: (CCL::CHEAP-EVAL (SWANK-REPL:LISTENER-EVAL "(run-loop)\n"))
18: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(run-loop)\n") "CEPL" 53)
19: (SWANK::PROCESS-REQUESTS NIL)
20: ((:INTERNAL SWANK::HANDLE-REQUESTS))
21: ((:INTERNAL SWANK::HANDLE-REQUESTS))
22: (SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK #<Compiled-function SWANK:SWANK-DEBUGGER-HOOK #xC665B56> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::HANDLE-REQUESTS) #xC79DEBE>)
23: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #<SWANK/GRAY::SLIME-OUTPUT-STREAM #xC79A0DE>) (*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM #xC79A2EE>) ..))) #<CCL:COMPILED-LEXICAL-CLOSURE (:I..
24: (SWANK::HANDLE-REQUESTS #<MULTITHREADED-CONNECTION #xC6BE22E> NIL)
25: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS repl-thread(12) [Active] #xC789C3E> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xC789AF6>))
26: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS repl-thread(12) [Active] #xC789C3E> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xC789AF6>))
27: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))
Might be of importance, I had to run (cepl:repl)
twice before the 'CEPL REPL' window displayed.
Also, not mentioned in the 'Running Example steps', had to run (ql:quickload :cepl-backend-sdl)
before calling (cepl:repl)
CL-USER> (ql:quickload :cepl-backend-sdl)
To load "cepl-backend-sdl":
Load 1 ASDF system:
cepl-backend-sdl
; Loading "cepl-backend-sdl"
(:CEPL-BACKEND-SDL)
CL-USER> (cepl:repl)
"Setting default options"
-----------------
CEPL-REPL
-----------------
NIL
CL-USER> (cepl:repl)
"Setting default options"
-----------------
CEPL-REPL
-----------------
NIL
CL-USER> (in-package :cepl)
#<Package "CEPL">
;Compiling "e:/home/src/triangles.lisp"...
CEPL> (run-loop)
OpenGL signalled (1282 . INVALID-OPERATION) from BUFFER-DATA.
[Condition of type CL-OPENGL-BINDINGS:OPENGL-ERROR]
Restarts:
0: [CONTINUE] Continue
1: [RETRY] Retry SLIME REPL evaluation request.
2: [*ABORT] Return to SLIME's top level.
3: [ABORT-BREAK] Reset this thread
4: [ABORT] Kill this thread
Backtrace:
0: (CL-OPENGL-BINDINGS:CHECK-ERROR CL-OPENGL-BINDINGS:BUFFER-DATA)
1: (CL-OPENGL-BINDINGS:BUFFER-DATA :ARRAY-BUFFER 84 #<A Foreign Pointer #x1FB0440> :STATIC-DRAW)
2: (BUFFER-DATA-RAW #<A Foreign Pointer #x1FB0440> POS-COL 84 #S(CEPL-GL::GLBUFFER :BUFFER-ID 1 :FORMAT NIL :MANAGED ...) :ARRAY-BUFFER :STATIC-DRAW 0)
3: (#<STANDARD-METHOD MAKE-GPU-ARRAY (CEPL-GL::C-ARRAY)> #<C-ARRAY :element-type POS-COL :dimensions (3)> :ACCESS-STYLE :STATIC-DRAW)
4: (CCL::%%CHECK-KEYWORDS #(1 #(:ALIGNMENT :ELEMENT-TYPE :DIMENSIONS :ACCESS-STYLE) #<CCL:METHOD-FUNCTION MAKE-GPU-ARRAY (CEPL-GL::C-ARRAY)>) 286566115)
5: (NIL #<Unknown Arguments>)
6: (#<STANDARD-METHOD MAKE-GPU-ARRAY (T)> ((#(0.5 -0.36 0.0) #(0.0 1.0 0.0 1.0)) (#(0.0 0.5 0.0) #(1.0 0.0 0.0 1.0)) (#(-0.5 -0.36 0.0) #(0.0 0.0 1.0 1.0))) :DIMENSIONS NIL :ELEMENT-TYPE POS-COL :ACCESS-..
7: (CCL::%%CHECK-KEYWORDS #(1 #(:ALIGNMENT :ACCESS-STYLE :ELEMENT-TYPE :DIMENSIONS) #<CCL:METHOD-FUNCTION MAKE-GPU-ARRAY (T)>) 286566147)
8: (NIL #<Unknown Arguments>)
9: (RUN-LOOP)
10: (CCL::CALL-CHECK-REGS RUN-LOOP)
11: (CCL::CHEAP-EVAL (RUN-LOOP))
12: (SWANK::EVAL-REGION "(run-loop)\n")
Locals:
STRING = "(run-loop)\n"
STREAM = #<STRING-INPUT-STREAM #xDAE42A6>
VALUES = NIL
- = (RUN-LOOP)
FORM = (RUN-LOOP)
13: ((:INTERNAL SWANK-REPL::REPL-EVAL))
14: (SWANK-REPL::TRACK-PACKAGE #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xDAE42BE>)
15: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xDAE430E>)
16: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK-REPL::REPL-EVAL) #xDAE4336>)
17: (SWANK-REPL::REPL-EVAL "(run-loop)\n")
18: (CCL::CALL-CHECK-REGS SWANK-REPL:LISTENER-EVAL "(run-loop)\n")
19: (CCL::CHEAP-EVAL (SWANK-REPL:LISTENER-EVAL "(run-loop)\n"))
20: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(run-loop)\n") "CEPL" 17)
21: (SWANK::PROCESS-REQUESTS NIL)
22: ((:INTERNAL SWANK::HANDLE-REQUESTS))
23: ((:INTERNAL SWANK::HANDLE-REQUESTS))
24: (SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK #<Compiled-function SWANK:SWANK-DEBUGGER-HOOK #xC672A66> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::HANDLE-REQUESTS) #xC7A285E>)
25: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #<SWANK/GRAY::SLIME-OUTPUT-STREAM #xC796796>) (*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM #xC7969A6>) ..))) #<CCL:COMPILED-LEXICAL-CLOSURE (:I..
26: (SWANK::HANDLE-REQUESTS #<MULTITHREADED-CONNECTION #xC6BA676> NIL)
27: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS repl-thread(12) [Active] #xC796B9E> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xC796A56>))
28: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS repl-thread(12) [Active] #xC796B9E> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #xC796A56>))
29: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))
Hi
Not sure if you have checked this out before but there is a matrix math library available called sb-cga.
While you own implementation are more than likely spot on the sb-cga library has the interesting property of making use of some low level SSE optimization when used with SBCL.
The library is available here https://github.com/nikodemus/sb-cga and via quicklisp.
It does have some draw backs though; it supports only vec3 and mat4x4 and only floats.
But might be worth checking out if you are interested in low level optimisation.
Cheers,
(defun-g test ()
(let ((x (v! 0 0 0 0)))
x))
Ugh this is a dumb bug which is the fault of the 'external function finder'
we NEED a better solution for that
Is there any more cleanup, or lisp side undefining that can be done?
Do we have good error messages for using an undefined function?
When this is understood add to public api
people are using them and they may be broken. Find out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.