On Wed, 09 May 2007 12:30:25 +0100 Luis Oliveira <[EMAIL PROTECTED]> wrote:
> Mikael Lax <[EMAIL PROTECTED]> writes: > > my apologies for the incomplete patch, I haven't used darcs > > before. Attached now is a second attempt, if it still doesn't work I > > would appreciate any advice on how darcs patches are actually made. > > Hmm. Darcs still refuses to apply that. You should create darcs > patches with: > > $ darcs record > $ darcs send -o foo.patch > > Regular diffs would work too. > > Thanks! Aha, I was doing it wrong all along :) This time for sure! Sincerely yours, Mikael Lax
New patches: [Compressed textures and draw/read-pixels Mikael Lax <[EMAIL PROTECTED]>**20070510115014] { hunk ./gl/framebuffer.lisp 146 -(defun read-pixels (x y width height) - (declare (ignore x y width height)) - (error "not implemented")) +(defun read-pixels (x y width height format type) + (let* ((mult (ecase format + ((:red :green :blue :alpha :luminance) 1) + ((:depth-component :color-index :stencil-index) 1) + (:luminance-alpha 2) + ((:rgb :bgr) 3) + ((:rgba :bgra) 4))) + (size (* width height mult)) + (result-data (make-sequence 'vector size)) + (real-type (symbolic-type->real-type type))) + (with-foreign-object (array real-type size) + (%gl:read-pixels x y width height format type array) + (dotimes (i size result-data) + (setf (svref result-data i) + (mem-aref array real-type i)))))) hunk ./gl/package.lisp 153 + ;; 3.6.4 Pixel Rasterization + #:draw-pixels hunk ./gl/package.lisp 168 + ;; 3.8.3 Compressed Texture Images + #:compressed-tex-image-1d + #:compressed-tex-image-2d + #:compressed-tex-image-3d + #:compressed-tex-sub-image-1d + #:compressed-tex-sub-image-2d + #:compressed-tex-sub-image-3d hunk ./gl/rasterization.lisp 84 +;;; 3.6.1 Pixel Storage Modes + hunk ./gl/rasterization.lisp 94 +;;; 3.6.3 Pixel Transfer Modes + hunk ./gl/rasterization.lisp 112 +;;; 3.6.4 Rasterization of Pixel Rectangles + +(defun draw-pixels (width height format type data) + (with-pixel-array (array type data) + (%gl:draw-pixels width height format type array))) + hunk ./gl/rasterization.lisp 201 -;;; TODO +(defun compressed-tex-image-1d (target level internal-format width border + data &optional (image-size (length data))) + (if (pointerp data) + (%gl:compressed-tex-image-1d target level internal-format + width border image-size data) + (with-pixel-array (array :unsigned-byte data) + (%gl:compressed-tex-image-1d target level internal-format + width border image-size array)))) + +(defun compressed-tex-image-2d (target level internal-format width height border + data &optional (image-size (length data))) + (if (pointerp data) + (%gl:compressed-tex-image-2d target level internal-format + width height border image-size data) + (with-pixel-array (array :unsigned-byte data) + (%gl:compressed-tex-image-2d target level internal-format + width height border image-size array)))) + +(defun compressed-tex-image-3d (target level internal-format width height depth + border data &optional (image-size (length data))) + (if (pointerp data) + (%gl:compressed-tex-image-3d target level internal-format width + height depth border image-size data) + (with-pixel-array (array :unsigned-byte data) + (%gl:compressed-tex-image-3d target level internal-format width + height depth border image-size array)))) + +(defun compressed-tex-sub-image-1d (target level xoffset width format + data &optional (image-size (length data))) + (if (pointerp data) + (%gl:compressed-tex-sub-image-1d target level xoffset width + format image-size data) + (with-pixel-array (array :unsigned-byte data) + (%gl:compressed-tex-sub-image-1d target level xoffset width + format image-size array)))) + +(defun compressed-tex-sub-image-2d (target level xoffset yoffset width height + format data &optional (image-size (length data))) + (if (pointerp data) + (%gl:compressed-tex-sub-image-2d target level xoffset yoffset width height + format image-size data) + (with-pixel-array (array :unsigned-byte data) + (%gl:compressed-tex-sub-image-2d target level xoffset yoffset width height + format image-size array)))) + +(defun compressed-tex-sub-image-3d (target level xoffset yoffset zoffset width height + depth format data &optional (image-size (length data))) + (if (pointerp data) + (%gl:compressed-tex-sub-image-3d target level xoffset yoffset zoffset width + height depth format image-size data) + (with-pixel-array (array :unsigned-byte data) + (%gl:compressed-tex-sub-image-3d target level xoffset yoffset zoffset width + height depth format image-size array)))) } Context: [sbcl/x86-64: disable floating point traps Luis Oliveira <[EMAIL PROTECTED]>**20070403222155] [Fix the ensure-float type to work with doubles Luis Oliveira <[EMAIL PROTECTED]>**20070323045220 Bug reported by alastair37. ] [with-foreign-matrix: use %gl:float instead of :float Luis Oliveira <[EMAIL PROTECTED]>**20070323040609] [Preliminary support for vertex arrays and VBOs courtesy of Thomas Weidner. Luis Oliveira <[EMAIL PROTECTED]>**20070314221152 ] [Remove useless cl-glut-examples-system package Luis Oliveira <[EMAIL PROTECTED]>**20070311011401] [Small change to generate-gl-function Luis Oliveira <[EMAIL PROTECTED]>**20070311002941 - test with pointerp and null-pointer-p ] [Fix name mangling Luis Oliveira <[EMAIL PROTECTED]>**20070309070443 Patch courtesy of Bart Botta. - fixes lispification of a bunch of the new function names. - more type info for array of pointer args (:pointer (:pointer type)) instead of (:pointer :pointer). ] [More simplification. Luis Oliveira <[EMAIL PROTECTED]>**20070307214020 - Use definline and import-export throughout the rest of the bindings. ] [Fix some function names, simplify lispifications Luis Oliveira <[EMAIL PROTECTED]>**20070307191242 - Fixed regex in generate-funcs.lisp and regenerated funcs.lisp. - New macros import-export and definline. - Used them in opengl.lisp. ] [Fix type names in gl/util.lisp Luis Oliveira <[EMAIL PROTECTED]>**20070307011242] [New DEFGLEXTFUN and other minor changes Luis Oliveira <[EMAIL PROTECTED]>**20070307010114 - New DEFGLEXTFUN macro courtesy of Thomas Weidner. - GLUT: set %gl:*gl-get-proc-address* to glut:get-proc-address. ] [Change :color-buffer-bit to :color-buffer, etc, in the examples Luis Oliveira <[EMAIL PROTECTED]>**20070306043408] [Fix typo in gl/opengl.lisp Luis Oliveira <[EMAIL PROTECTED]>**20070306040804] [Add missing gl/bindings.lisp Luis Oliveira <[EMAIL PROTECTED]>**20070306034316] [Fix glu, glut and gl/opengl.lisp with new names Luis Oliveira <[EMAIL PROTECTED]>**20070306033727] [Mega patch from Bart Botta Luis Oliveira <[EMAIL PROTECTED]>**20070306024546 - Merged Bart Botta's stuff for generating gl/funcs.lisp from the .spec files. Also adds new cl-opengl-bindings package with low-level functions. Fixed some parsing bugs. - Updated for OpenGL 2.1. (enums, too) ] [GL enum changes Luis Oliveira <[EMAIL PROTECTED]>**20070305153651 - Updated .spec files for OpenGL 2.1. - Two changes to generate-enums.lisp: * print the symbols lower-cased; * generates some aliases for symbols ending in -bits and -bit. e.g.: :color-buffer-bit and :color-buffer. - Regenerated gl/constants.lisp. ] [Add Lispy abstraction for GLUT's TIMER event. Luis Oliveira <[EMAIL PROTECTED]>**20070304220421] [Make foreign types work with CFFI's new type system. Luis Oliveira <[EMAIL PROTECTED]>**20070304220240] [Some old changes to the manual.. Luis Oliveira <[EMAIL PROTECTED]>**20070304220205] [vertex array addition [EMAIL PROTECTED] Added mostly working functionality for vertex arrays. "with-opengl-sequence" macro modified (hopefully correctly) in gl/util.lisp, possible danger of code breakage. ] [Misc patch Luis Oliveira <[EMAIL PROTECTED]>**20061117024105 Patch courtesy of Bart Botta. ] [Applied patch from Bart Botta Oliver Markovic <[EMAIL PROTECTED]>**20061112111533] [Pushed wrong version of render-to-texture.lisp; fixed Oliver Markovic <[EMAIL PROTECTED]>**20061111152828] [Add render-to-texture example Oliver Markovic <[EMAIL PROTECTED]>**20061111151241 - Add new example in examples/misc/ illustrating the use of FBOs ] [Add support for buffer objects Oliver Markovic <[EMAIL PROTECTED]>**20061111151103 - Add vertex and pixel buffer objects - Add support for the EXT_framebuffer_object extension ] [Fix downcasing issues with enum generation. James Bielman <[EMAIL PROTECTED]>**20060830200239] [Implement GLU projection functions. James Bielman <[EMAIL PROTECTED]>**20060828054332 - New exported functions: GLU:PROJECT, GLU:UN-PROJECT, GLU:UN-PROJECT4. - New utility macro: WITH-OPENGL-ARRAYS for binding multiple arrays. ] [Implement numeric OpenGL state querying functions. James Bielman <[EMAIL PROTECTED]>**20060828054131 - New exported functions: GET-BOOLEAN, GET-DOUBLE, GET-FLOAT, GET-INTEGER, and GET-ENUM. These functions are able to automatically return the correct number of return values when the query enum is in the *QUERY-ENUM-SIZES* table. ] [Replace separate enum types with generated GL:ENUM. James Bielman <[EMAIL PROTECTED]>**20060828052308] [Add a script to generate OpenGL constants from the specifiction. James Bielman <[EMAIL PROTECTED]>**20060828051427] [Add OpenGL specification data files for enum values. James Bielman <[EMAIL PROTECTED]>**20060828051348] [Define foreign functions inline via DEFGLFUN helper macro. James Bielman <[EMAIL PROTECTED]>**20060828045747] [Move GL function DEFCFUNs into funcs.lisp. James Bielman <[EMAIL PROTECTED]>**20060828045514] [More 64-bit-cleanliness fixes, use ints instead of longs. James Bielman <[EMAIL PROTECTED]>**20060828044816] [Fix bug in WITH-OPENGL-ARRAY when VAR and LISP-ARRAY are the same. James Bielman <[EMAIL PROTECTED]>**20060823210517] [Use :INT as the base type for GL:INT and GL:SIZEI. James Bielman <[EMAIL PROTECTED]>**20060823171453 - Using :LONG broke on 64-bit Linux. According to the GL header on my Linux system, GLint and GLsizei are of C type 'int'. ] [Minor fix to glut/interface.lisp Luis Oliveira <[EMAIL PROTECTED]>**20060703224124] [CL-GLUT update Luis Oliveira <[EMAIL PROTECTED]>**20060624235928 - Fix foreign-symbol-pointer usage in glut/fonts.lisp. - Move enums next to the DEFCFUNs where they're used. - Rework the CL-GLUT CLOS interface. - Reorganize examples and rewrite them using the updated CLOS interface. ] [s/windows/cffi-features:windows Luis Oliveira <[EMAIL PROTECTED]>**20060425212810] [Convert array contents to floats in MAP1 and MAP2. James Bielman <[EMAIL PROTECTED]>**20060412015458] [Add evaluator constants to the ENABLE-CAP enum. James Bielman <[EMAIL PROTECTED]>**20060412015045] [New example: glut-teapot.lisp Luis Oliveira <[EMAIL PROTECTED]>**20060326211537 Also, fixed a typo in the README and added a README for the examples. ] [GLUT: add missing event and fix typo Luis Oliveira <[EMAIL PROTECTED]>**20060221054305 - Missing event: passive-motion. - fullscreen -> full-screen - move the (setf title) magic to a :before method. ] [Minor fixes to the examples Luis Oliveira <[EMAIL PROTECTED]>**20060221054151 - add ignore declarations to unused arguments. - use MOD! ] [Oops. Forgot to darcs add examples/mesademos/package.lisp Luis Oliveira <[EMAIL PROTECTED]>**20060219211853] [More examples Luis Oliveira <[EMAIL PROTECTED]>**20060218054241 - New examples: rb{6,7,8,9,10,11,12,13}. - Use with-new-list in mesademos/gears.lisp. - Add copyright notices to examples. - Fix example 4 which was drawing *halftone* twice. ] [with-new-list, with-primitive and call-lists Luis Oliveira <[EMAIL PROTECTED]>**20060218051830] [GLUT: use gl:ensure-double Luis Oliveira <[EMAIL PROTECTED]>**20060217231013] [Small change to with-opengl-sequence Luis Oliveira <[EMAIL PROTECTED]>**20060217224915 - Make it convert the sequence's elements to float or double when the type is gl:float or gl:double respectively. Breaks when type isn't constant, oops. ] [Tiny update to GLU Luis Oliveira <[EMAIL PROTECTED]>**20060217222227 - Mostly move files around. (remind not to create stub files again, ugh) - Added some new functions. ] [New types: gl:ensure-double and gl:ensure-float Luis Oliveira <[EMAIL PROTECTED]>**20060217221729 - Define and export ensure-double and ensure-float. (these need a recent CFFI) - Also export some types that'll be needed for GLU. Maybe a gl-types package would be a good idea? ] [Oops. Forgot darcs add. Luis Oliveira <[EMAIL PROTECTED]>**20060207034827] [New examples Luis Oliveira <[EMAIL PROTECTED]>**20060207032245 - New 5 examples from the redbook. - 2 GLU functions needed for the examples. - Added gl:polygon-stipple needed for one of the examples. - Fixed silly bugs in cl-glut's ascii-to-char type and the base-window initialize-instance. - Moved window's title initform to a special. ] [Preliminary CLOS interface to GLUT Luis Oliveira <[EMAIL PROTECTED]>**20060206182638 - Removed a german 'ss' from rasterization.lisp which was upsetting SBCL. - New macro WITH-PUSHED-MATRIX. WITH-MATRIX might be a better name? - New experimental CLOS-based interface to GLUT. - New example using the new CLOS interface. Moved old gears exmample to gears-raw.lisp. ] [Texturing functions added. Oliver Markovic <[EMAIL PROTECTED]>**20060202185907 - Added preliminary support for glTexImage and glTexSubImage. I'm still not sure on how to handle the data. - Added glCopyTexImage and glCopyTexSubImage - Added glAreTexturesResident and glPrioritizeTextures along with TEXTURE-RESIDENT-P and PRIORITIZE-TEXTURE, which are hopefully less awkward to use than the direct translations. - Added glTexEnv. ] [Optimizations (needs recent CFFI again) Luis Oliveira <[EMAIL PROTECTED]>**20060203014020 - Add declarations in gears.lisp - Define the gl:* types to have no translation ] [Use internal-time-units-per-second Luis Oliveira <[EMAIL PROTECTED]>**20060202200413] [Add fps counter to examples/mesademos/gears.lisp Luis Oliveira <[EMAIL PROTECTED]>**20060202195354] [Oops. Missing glut/main.lisp file. Luis Oliveira <[EMAIL PROTECTED]>**20060202190632] [GLUT update, less straw. Luis Oliveira <[EMAIL PROTECTED]>**20060202124342 (requires recent cffi patches fixing defcenum issue and implementing defbitfield) - add missing depends-on to funcs in cl-opengl.asd - complete glut bindings. next step: high level interface. ] [Add glutSetOption. Alexey Dvoychenkov <[EMAIL PROTECTED]>**20060202031904] [Big patch, lots of straw again. Luis Oliveira <[EMAIL PROTECTED]>**20060201164339 - GLU: added asd file and stub .lisp files. - Examples: - added cl-glut-examples.asd - new example: gears.lisp - GLUT: added asd file and implemented a few routines. (mostly those needed by the gears.lisp example) - Add my name to HEADER too. - 3 separate manuals is probably overkill? Use only one for now. - GL: - fixed enums, these should canonicalize to GLenum, not int. - renamed gl types from GLfoo to gl:foo (and exported them) - fixed erroneus check-type. - look for libGL.so.N if libGL.so isn't found. - removed some tabs from the files. - added missing space between ":constant-attenuation" and "linear-attenuation". - added missing (declare (ignore ..)) to avoid warnings. - fixed a small bug/typo where a foreign array was being accessed as if it were Lisp array. - change ;;;-comments to ;;-comments in package.lisp in order to indent well. ] [Add documentation structure. Luis Oliveira <[EMAIL PROTECTED]>**20060201013908 Just straw, no content. Taken from cffi mostly. ] [Minor changes Luis Oliveira <[EMAIL PROTECTED]>**20060131190956 - added HEADER file. - changed library.lisp to use BSD license. - removed tabs from state.lisp ] [Added examples directory. Oliver Markovic <[EMAIL PROTECTED]>**20060131120521] [Initial revision. Oliver Markovic <[EMAIL PROTECTED]>**20060131115438] Patch bundle hash: e4b0d6c588390df4b712265972a19a10de5e58f8
_______________________________________________ cl-opengl-devel mailing list cl-opengl-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel