Closed Zaijab closed 4 years ago
Try it without applying slime-compile-defun
to that final (run-loop)
form.
Instead, try entering (run-loop)
at the repl after you have done (cepl:repl)
.
e.g. something like:
CL-USER> (ql:quickload :graphics)
To load "graphics":
Load 1 ASDF system:
graphics
; Loading "graphics"
......
(:GRAPHICS)
CL-USER> (in-package :graphics)
#<PACKAGE "GRAPHICS">
GRAPHICS> (cepl:repl)
-----------------
CEPL-REPL
-----------------
#<DEFAULT-FBO COLOR-ATTRS (0 1)>
GRAPHICS> (run-loop)
; uploading (PROG-1 ...)
; No value
GRAPHICS>
where the graphics
package is your code above, but without that final (run-loop)
line.
This method works perfect. Thank you so much!
Goal: Run the code in "cepl/docs/001 - Into the code.md" and perform some of the operations outlined in Baggers YouTube video "0 - CEPL - Lispy OpenGL".
Setup: I made a project using the directions in the README called "graphics", and changed the code to resolve some definition errors like those pointed out in #344 .
Steps to reproduce error:
(ql:quickload :cepl.sdl2)
then(cepl:repl)
Expected result: To have a multicolored triangle appear in the sdl2 window Actual result: The following error arises.
Heap exhausted (no more space for allocation). 931987456 bytes available, 15089770976 requested.
Other methods: There are other methods to run the code with varying results.
Other method 1: Performing the following yields the expected multicolored triangle.
(ql:quickload :cepl.sdl2)
then(cepl:repl)
However, this does not allow me to update the triangle using pull-g and push-g as when I hit enter into the repl, an Emacs message pops up in the minibuffer saying
REPL is busy
.Other method 2: First insert
(cepl:repl)
after(in-package #:graphics)
then useslime-compile-and-load
on the file results in the expected multicolored triangle. However, running(cepl:pull-g *array*)
in the file and using slime-compile-defun gives the error `with-gpu-array-as-*: buffer mapped to null pointer Have you defintely got an opengl context?.(SB-SYS:INT-SAP #X00000000)`
and running
(cepl:pull-g *array*)
in the slime repl gives the following errorThe variable *ARRAY* is unbound.
Other method 3: Very similar to method 2, but use
slime-eval-buffer
instead ofslime-compile-and-load
. First insert(cepl:repl)
after(in-package #:graphics)
then useslime-eval-buffer
on the file results in the expected multicolored triangle. However, running(cepl:pull-g *array*)
in the file and using slime-compile-defun gives the error `with-gpu-array-as-*: buffer mapped to null pointer Have you defintely got an opengl context?.(SB-SYS:INT-SAP #X00000000)`
and running
(cepl:pull-g *array*)
in the slime repl gives the following errorThe variable *ARRAY* is unbound.
Conclusion: So I am unable to continue on with the next part of the video / video series.
Please let me know if I need to put more information or something is wrong stylistically. I would do anything to get this to work.