Initial import --> to head
Wed Mar 10 18:16:16 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Add missing GLuint GLint and GLenum type translators.
Fixes "GLuint conversion error" reported by Elliott Slaughter
Sun Feb 28 09:14:44 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Initial import
diff -rN -u old-qt.opengl/cl-smoke.qt.opengl.asd new-qt.opengl/cl-smoke.qt.opengl.asd
--- old-qt.opengl/cl-smoke.qt.opengl.asd 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.opengl/cl-smoke.qt.opengl.asd 2014-10-30 07:51:47.000000000 +0100
@@ -0,0 +1,13 @@
+(defsystem :cl-smoke.qt.opengl
+ :name :cl-smoke.qt.opengl
+ :version (0 0 1)
+ :author "Tobias Rautenkranz"
+ :license "GPL with linking exception"
+ :description "Qt network module."
+
+ :depends-on (:cl-smoke.smoke :cl-smoke.qt.core :cl-smoke.qt.gui)
+ :components
+ ((:module "src"
+ :components
+ ((:file "package")
+ (:file "qt.opengl" :depends-on ("package"))))))
diff -rN -u old-qt.opengl/src/package.lisp new-qt.opengl/src/package.lisp
--- old-qt.opengl/src/package.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.opengl/src/package.lisp 2014-10-30 07:51:47.000000000 +0100
@@ -0,0 +1,4 @@
+(defpackage :qt.opengl
+ (:use :cl :smoke :cffi)
+ (:export))
+
diff -rN -u old-qt.opengl/src/qt.opengl.lisp new-qt.opengl/src/qt.opengl.lisp
--- old-qt.opengl/src/qt.opengl.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.opengl/src/qt.opengl.lisp 2014-10-30 07:51:47.000000000 +0100
@@ -0,0 +1,62 @@
+;;; Copyright (C) 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
+;;;
+;;; This program is free software: you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation, either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;;
+;;; As a special exception, the copyright holders of this library give you
+;;; permission to link this library with independent modules to produce an
+;;; executable, regardless of the license terms of these independent
+;;; modules, and to copy and distribute the resulting executable under
+;;; terms of your choice, provided that you also meet, for each linked
+;;; independent module, the terms and conditions of the license of that
+;;; module. An independent module is a module which is not derived from or
+;;; based on this library. If you modify this library, you may extend this
+;;; exception to your version of the library, but you are not obligated to
+;;; do so. If you do not wish to do so, delete this exception statement
+;;; from your version.
+
+(in-package :qt.opengl)
+
+(smoke:define-smoke-module :cl-smoke.qt libsmokeqtopengl
+ (*qtopengl-smoke* "qtopengl_Smoke")
+ (init-qtopengl-smoke "init_qtopengl_Smoke"))
+
+;;; OpenGL type conversion using the types as defined in:
+;;; http://www.opengl.org/registry/ABI/#2
+;;; Note: this is probably not that portable.
+
+;;; GLuint
+(defun coerce-gluint (pointer)
+ (mem-ref pointer :unsigned-int))
+
+(define-to-lisp-translation "GLuint" coerce-gluint foreign-free)
+
+(defun to-gluint (integer)
+ (make-auto-pointer (foreign-alloc :unsigned-int :initial-element integer)))
+
+(define-from-lisp-translation "GLuint" integer to-gluint)
+
+;;; GLint
+(defun coerce-glint (pointer)
+ (mem-ref pointer :int))
+
+(define-to-lisp-translation "GLint" coerce-glint foreign-free)
+
+(defun to-glint (integer)
+ (make-auto-pointer (foreign-alloc :int :initial-element integer)))
+
+(define-from-lisp-translation "GLint" integer to-glint)
+
+;;; GLenum
+; no GLenum returned, thus no to-lisp translation
+(define-from-lisp-translation "GLenum" integer to-gluint)