diff options
-rw-r--r-- | chickadee/graphics/texture.scm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chickadee/graphics/texture.scm b/chickadee/graphics/texture.scm index a008174..b6595ee 100644 --- a/chickadee/graphics/texture.scm +++ b/chickadee/graphics/texture.scm @@ -271,12 +271,11 @@ Currently only 32-bit RGBA format is supported." (gl-texture-parameter (texture-target texture-2d) (texture-parameter-name texture-wrap-t) (gl-wrap-mode wrap-t)) - (when pixels - (gl-texture-image-2d (texture-target texture-2d) - 0 (pixel-format rgba) width height 0 - (gl-pixel-format format) - (color-pointer-type unsigned-byte) - pixels)) + (gl-texture-image-2d (texture-target texture-2d) + 0 (pixel-format rgba) width height 0 + (gl-pixel-format format) + (color-pointer-type unsigned-byte) + (or pixels %null-pointer)) ;; Generate mipmaps, if needed. (when (memq min-filter '(nearest-mipmap-nearest |