28 Apr 2013 00:32
10 Mar 2013 14:35
slow interpolation issues
cage <cage <at> katamail.com>
2013-03-10 13:35:04 GMT
2013-03-10 13:35:04 GMT
Hello,
I have written an MD2 3d mesh loader, everything works fine except for
the animations.
Because the model save only the key frame for each animation the
loader must interpolate the vertex position of the mesh to get a
smooth animation.
My solution was to save the triangles vertices in a gl-array for each
frame an then doing linear interpolation, something like that:
(defun lerp-gl-array (a b c count interpolation-factor)
(dotimes (i count)
(setf (gl:glaref c i)
(alexandria:lerp interpolation-factor (gl:glaref a i) (gl:glaref b i)))))
but it seem to be too slow as shown by the SBCL profiler
seconds | gc | consed | calls | sec/call | name
-----------------------------------------------------------
264.554 | 8.189 | 8,307,049,792 | 2,870 | 0.092179 | CL-GL-UTILS:LERP-GL-ARRAY
-----------------------------------------------------------
264.554 | 8.189 | 8,307,049,792 | 2,870 | | Total
is this my fault? Any idea how can I improve performance?
Thank you.
C.
(Continue reading)
28 Jan 2013 22:15
glop
Luís Oliveira <luismbo <at> gmail.com>
2013-01-28 21:15:28 GMT
2013-01-28 21:15:28 GMT
Hello, This project is potentially interesting for cl-opengl users: <https://github.com/patzy/glop>. Has anybody tried it out? Cheers, -- -- Luís Oliveira http://r42.eu/~luis/
27 Dec 2012 01:58
package "GL" not found
Nick Khamis <symack <at> gmail.com>
2012-12-27 00:58:33 GMT
2012-12-27 00:58:33 GMT
Hello Everyone,
My current environment consists of (Emacs, SBCL, ASDF, and SLIME).
Trying to run a few minimalistic examples I keep getting:
package "GL" not found
Things I have done to try to make ASDF central registry aware of the
cl-opengl implementation:
#~/.sbclrc
;;; asdf-prep.lisp
(dolist (subdir (list ;; ... some other packages ...
#P"cl-opengl/"))
(push (merge-pathnames subdir #P"/usr/local/tools/")
asdf:*central-registry*))
And in the code I added:
(require :asdf) ; need ASDF to load other things
(asdf:load-system :cl-opengl) ; load OpenGL bindings
(asdf:load-system :cl-glu) ; load GLU bindings
(asdf:load-system :cl-glut) ; load GLUT bindings
I have heard of quicklisp however, trying to understand how
environment variables work, and would like to get it going with
this minimalistic setup first if possible.
Your help is greatly appreciated,
(Continue reading)
7 Aug 2012 15:02
cl-glut not able to open windows until shown how by lispbuilder-sdl
Zach Hall <halloweenincorporated <at> gmail.com>
2012-08-07 13:02:06 GMT
2012-08-07 13:02:06 GMT
Hi everyone,
I'm having a weird problem with cl-glut.
When I run something using glut to produce a window, I don't get a window. Inserting a swank-handler into the loop of the examples, I determined that they WERE running, they just weren't giving me a window.
I'm using Windows 7, Clozure-CL and I have FreeGlut loaded and detected properly. Everything works, except that the window doesn't show.
So! I decided to try Lispbuilder-SDL, I loaded up their examples and they are able to successfully open windows.
What's really odd about this, is that AFTER I've created a window using Lispbuilder, it seems to show Glut what to do, and Glut can suddenly open display windows properly.
Does anyone have any idea what could be causing this?
_______________________________________________ cl-opengl-devel mailing list cl-opengl-devel <at> common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel
4 Aug 2012 19:58
Re: How to install/run the demo code? Successful.
John Crawford <cyclops <at> speakeasy.net>
2012-08-04 17:58:34 GMT
2012-08-04 17:58:34 GMT
> You need FreeGLUT rather than classic GLUT. Thanks, that was the last piece of the puzzle. For the record, the entire set of steps I went through was: File->Load-> C:\Lisp\Tools\quicklisp.lisp - only needs to be done once. or CL-USER 1 : 1 > (load #p"C:/Lisp/Tools/quicklisp.lisp") CL-USER 1 : 1 > (quicklisp-quickstart:install) - only needs to be done once. CL-USER 2 > (load #p"c:/documents and settings/username/quicklisp/setup.lisp") needs to be done every time in LispWorks Personal Edition, which doesn't support init files. CL-USER 3 : 1 > (ql:quickload :cl-opengl) CL-USER 4 : 1 > (ql:quickload :cl-glut-examples) CL-USER 5 : 1 > (cl-glut-examples:list-examples) CL-USER 6 : 1 > (cl-glut-examples:gears)
3 Aug 2012 20:48
Fwd: How to install/run the demo code?
Luís Oliveira <luismbo <at> gmail.com>
2012-08-03 18:48:47 GMT
2012-08-03 18:48:47 GMT
(ups. Also forgot to Cc the list.) ---------- Forwarded message ---------- From: Luís Oliveira <luismbo <at> gmail.com> Date: Fri, Aug 3, 2012 at 4:02 PM Subject: Re: [cl-opengl-devel] How to install/run the demo code? To: John Crawford <cyclops <at> speakeasy.net> On Fri, Aug 3, 2012 at 2:42 PM, John Crawford <cyclops <at> speakeasy.net> wrote: > How do I install and run the demo code? I'm running Lispworks PE 6.01 on > Windows, I've installed quicklisp and ran: (ql:quickload "cl-opengl") which > seemed to download the library. But so far I haven't managed to run the demo > examples. Thanks. (ql:quickload "cl-glut-examples") loads the examples. (cl-glut-examples:list-examples) lists the available examples which you can run individually. There's also a run-examples function which runs all examples simultaneously. HTH, -- Luís Oliveira http://r42.eu/~luis/ -- -- Luís Oliveira http://r42.eu/~luis/
3 Aug 2012 15:42
How to install/run the demo code?
John Crawford <cyclops <at> speakeasy.net>
2012-08-03 13:42:32 GMT
2012-08-03 13:42:32 GMT
How do I install and run the demo code? I'm running Lispworks PE 6.01 on Windows, I've installed quicklisp and ran: (ql:quickload "cl-opengl") which seemed to download the library. But so far I haven't managed to run the demo examples. Thanks. John C>
2 Aug 2012 22:54
19 Jul 2012 14:39
gl-array count
Chris Bagley <chris.bagley <at> gmail.com>
2012-07-19 12:39:36 GMT
2012-07-19 12:39:36 GMT
I've been slowly getting my head round the gl-array macros and there is one last thing that is confusing me
In this struct, size is set to the type of unsigned byte...why? It seem that this stores the length of the foreign array which, as far as I can tell from CFFI doco, is an integer.
(defstruct (gl-array (:copier nil))
"Pointer to C array with size and type information attached."
(pointer (null-pointer))
(size 0 :type unsigned-byte)
(type nil :type symbol))
There's probably something I'm missing and if anyone can explain that would be great!
Thanks folks
_______________________________________________ cl-opengl-devel mailing list cl-opengl-devel <at> common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel
16 Jul 2012 11:58
Thanks to all
Chris Bagley <chris.bagley <at> gmail.com>
2012-07-16 09:58:05 GMT
2012-07-16 09:58:05 GMT
In open source software it can often seem that not many people are using what you are creating. So as one of the silent lurkers around these parts I just want to say thank-you.
I have only recently got into common lisp and cl-opengl has given me a chance to have something FUN to put my efforts into. It can be hard to get enthused about some of the more esoteric sides of lisp, but when it goes into upping frame rates or making virtual explosions suddenly the reason for studying it seems obvious!
So aye, thanks for all your work, hopefully I'll have something playable soonish.
Cheers
Baggers
_______________________________________________ cl-opengl-devel mailing list cl-opengl-devel <at> common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel
RSS Feed