gl:tex-image-2d seems a bit slow (~23 sec for a 1k by 1k texture on
SBCL 1.0.2 win32), attached patch speeds it up  ~100x (to ~0.25 sec).

Problem was that the element type in with-opengl-array wasn't constant
(since it had been passed as a parameter to tex-image-2d) so cffi
couldn't optimize for a specific type. Patch moves the type check out
of the copy loop, and duplicates the loop for each type, so each case
can be optimized individually.

--
Bart

Attachment: with-opengl-array.patch
Description: Binary data

_______________________________________________
cl-opengl-devel mailing list
cl-opengl-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel

Reply via email to