Has anyone done any work sharing OpenGL contexts in Clojure?  I was
wondering the best way to create a GLCanvas if I want all of them to
share the same context.

Right now it seems calling (.getContext (new GLCanvas)) returns nil,
which may be a JOGL thing, but I was hoping to create one canvas with
the argument-less GLCanvas constructor and once one is made use its
context to create the other ones that take a context in their
constructor.  The JOGL user's guide isn't too detailed about how this
works.

http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.0/jogl-1.1.0-windows-i586/Userguide.html

I'm curious in general how an OpenGL program should properly be
written when dealing with multiple windows.  If I were to make a
change to the data in memory, my instincts would be to set it as
"dirty" and have the first GLCanvas rebuild the OpenGL stuff, set the
data as clean, and have the other GLCanvases use the updated OpenGL
stuff (VBOs, display lists, textures, etc.).  I figure since it's all
single threaded, I wouldn't need any locks on a process like that in
Java, correct?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to