Permalink
Browse files

Moved duplicate code to utils.lisp

  • Loading branch information...
1 parent a42613c commit 61842c831a5e71bf924286d984d050f7017f8cd3 @patzy patzy committed Jan 22, 2014
Showing with 10 additions and 20 deletions.
  1. +10 −0 src/utils.lisp
  2. +0 −10 src/win32/wgl.lisp
  3. +0 −10 src/x11/glx.lisp
View
@@ -148,4 +148,14 @@ Otherwise, only one key-press event will be triggered.")
(t (:default "gdi32")))
(cffi:use-foreign-library gdi32)))
+(defun parse-gl-version-string-values (string)
+ ;; major version is integer value up to first #\.
+ ;; minor version is integer from first #\. to a #\. or #\space
+ (let ((dot (position #\. string)))
+ (values
+ (values (parse-integer string :end dot :junk-allowed t)) ; major
+ (if dot ; minor
+ (values (parse-integer string :start (1+ dot) :junk-allowed t))
+ 0))))
+
View
@@ -189,16 +189,6 @@
(dc hdc))
-;; FIXME: this is copied from x11/glx.lisp, we should put this in some common file
-(defun parse-gl-version-string-values (string)
- ;; major version is integer value up to first #\.
- ;; minor version is integer from first #\. to a #\. or #\space
- (let ((dot (position #\. string)))
- (values
- (values (parse-integer string :end dot :junk-allowed t)) ; major
- (if dot ; minor
- (values (parse-integer string :start (1+ dot) :junk-allowed t))
- 0))))
(defun correct-context? (major-desired minor-desired)
(multiple-value-bind (major minor)
View
@@ -236,16 +236,6 @@
(defcfun ("glXGetProcAddress" glx-get-proc-address) :pointer
(proc-name :string))
-(defun parse-gl-version-string-values (string)
- ;; major version is integer value up to first #\.
- ;; minor version is integer from first #\. to a #\. or #\space
- (let ((dot (position #\. string)))
- (values
- (values (parse-integer string :end dot :junk-allowed t)) ; major
- (if dot ; minor
- (values (parse-integer string :start (1+ dot) :junk-allowed t))
- 0))))
-
(defun correct-context? (major-desired minor-desired)
(multiple-value-bind (major minor)
(parse-gl-version-string-values

0 comments on commit 61842c8

Please sign in to comment.