Getting an error when using the opengl renderer

192 views
Skip to first unread message

Ricardo Sanchez

unread,
Mar 29, 2013, 6:05:41 AM3/29/13
to clj-pro...@googlegroups.com
When I set my sketch to opengl render mode I get the following error:

no jogl in java.library.path

I checked the Leiningen dependencies and I can see org.processing.jogl-1.5.1.jar is there

I'm on a Mac 10.8.3 using Quil 1.5.1 and the CounterClockwise Eclipse plugin

Sam Aaron

unread,
Mar 29, 2013, 6:31:37 AM3/29/13
to clj-pro...@googlegroups.com
Hi Ricardo,

can you get an opengl sketch working from a plain lein repl (i.e. not through CCW)?

Sam

---
http://sam.aaron.name
> --
> You received this message because you are subscribed to the Google Groups "clj-processing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clj-processin...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Ricardo Sanchez

unread,
Mar 30, 2013, 7:32:55 AM3/30/13
to clj-pro...@googlegroups.com
Yes I  can run from the terminal but I get the following message:

Exception in thread "main" java.lang.ClassCastException: quil.applet.proxy$processing.core.PApplet$IMeta$c506c738 cannot be cast to clojure.lang.IFn
at opengl_test.core$_main.doInvoke(core.clj:26)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:411)
at user$eval555.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$eval_opt.invoke(main.clj:297)
at clojure.main$initialize.invoke(main.clj:316)
at clojure.main$null_opt.invoke(main.clj:349)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
OpenGL error 1286 at render_triangles in: invalid framebuffer operation
OpenGL error 1286 at render_triangles out: invalid framebuffer operation

Any ideas?

Nikita Beloglazov

unread,
Mar 30, 2013, 8:03:55 AM3/30/13
to clj-pro...@googlegroups.com

Hi, Ricardo

Can you show your core.clj?

Nikita

--

Ricardo Sanchez

unread,
Mar 30, 2013, 8:52:28 AM3/30/13
to clj-pro...@googlegroups.com
Sure, its a simple sketch that draws a sphere in the center of if:

(ns opengl-test.core
  (:use [quil.core]))

(defn setup []
  (background 0))

(defn draw []
  (background 0)
  (push-matrix)
  (translate (/ (width) 2) (/ (height) 2))
  (sphere 50)
  (pop-matrix))

(defsketch opengl-test
  :title "opengl test"
  :setup setup
  :draw draw
  :size [800 600]
  :renderer :opengl)

(defn -main [& args]
  (opengl-test))

Ricardo Sanchez

unread,
Apr 13, 2013, 7:03:14 AM4/13/13
to clj-pro...@googlegroups.com

Does anyone using CounterClockWise is having this opengl problem?

Niels van Klaveren

unread,
Apr 25, 2013, 8:34:37 AM4/25/13
to clj-pro...@googlegroups.com
Yeah, same problem here with Eclipse CCW 12 and quil 1.6.0.

To fix:
Rightclick project name > Properties
Java Build Path > tab Libraries
Expand Leiningen Dependencies
Click Native Library Location
Click Edit button
Click External Folder
browse to project subfolder \test\target\native\macosx\ choose either x86 or 86_64, depending on 64 or 32 bits Java used.
click OK, OK,OK

Now rightclick on filename of clj file in project explorer and choose Run As > Clojure Application.

Ricardo Sanchez

unread,
May 7, 2013, 5:00:28 PM5/7/13
to clj-pro...@googlegroups.com
Hi Niels,

That works for me, the program compiles but I get the following message in the console
Reply all
Reply to author
Forward
0 new messages