Permalink
Browse files

Add gl-vendor compat function

  • Loading branch information...
Shinmera committed Nov 26, 2017
1 parent 9e847b6 commit 8965875458526ea3bffa051c003ae3427f9265d8
Showing with 8 additions and 0 deletions.
  1. +8 −0 toolkit.lisp
View
@@ -398,6 +398,14 @@
(/ (sb-ext:dynamic-space-size) 1024.0)))
#-sbcl (values 1 1))
(defun gl-vendor ()
(let ((vendor (gl:get-string :vendor)))
(cond ((search "Intel" vendor) :intel)
((search "NVIDIA" vendor) :nvidia)
((search "ATI" vendor) :amd)
((search "AMD" vendor) :amd)
(T :unknown))))
(defun check-texture-size (width height)
(let ((max (gl:get* :max-texture-size)))
(when (< max (max width height))

0 comments on commit 8965875

Please sign in to comment.