Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add depth-component to internal-formats, set texture-compare params i…

…n gen-texture
  • Loading branch information...
commit 9a8a1418cdfa97af025fc1d5f9a71a44bca7d693 1 parent 85da145
Michael van Acken mva authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/penumbra/opengl/texture.clj
8 src/penumbra/opengl/texture.clj
View
@@ -73,7 +73,10 @@
[:unsigned-byte 1 :luminance]
[:unsigned-byte 2 :luminance-alpha]
[:unsigned-byte 3 :rgb]
- [:unsigned-byte 4 :rgba]])
+ [:unsigned-byte 4 :rgba]
+ [:unsigned-byte 2 :depth-component16]
+ [:unsigned-byte 3 :depth-component24]
+ [:unsigned-byte 4 :depth-component32]])
(def tuple->pixel-format
{1 :luminance, 2 :luminance-alpha, 3 :rgb, 4 :rgba})
@@ -226,6 +229,9 @@
(gl-tex-parameter (:target params) (enum p) (params p)))
(doseq [p [:texture-min-filter :texture-mag-filter]]
(gl-tex-parameter (:target params) (enum p) (params p)))
+ (doseq [p [:texture-compare-mode :texture-compare-func]]
+ (if (contains? params p)
+ (gl-tex-parameter (:target params) (enum p) (params p))))
(when-not valid?
(condp = (count dim)
1 (gl-tex-image-1d target 0 i-f (dim 0) 0 p-f i-t nil)
Please sign in to comment.
Something went wrong with that request. Please try again.