summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/texture.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/chickadee/render/texture.scm b/chickadee/render/texture.scm
index c37fef9..2b4755e 100644
--- a/chickadee/render/texture.scm
+++ b/chickadee/render/texture.scm
@@ -71,7 +71,7 @@
;; The <texture> object is a simple wrapper around an OpenGL texture
;; id.
(define-record-type <texture>
- (%make-texture id width height min-filter mag-filter wrap-s wrap-t)
+ (%make-texture id width height min-filter mag-filter wrap-s wrap-t gl-size)
texture?
(id texture-id)
(width texture-width)
@@ -79,7 +79,8 @@
(min-filter texture-min-filter)
(mag-filter texture-mag-filter)
(wrap-s texture-wrap-s)
- (wrap-t texture-wrap-t))
+ (wrap-t texture-wrap-t)
+ (gl-size texture-gl-size))
(set-record-type-printer! <texture>
(lambda (texture port)
@@ -92,7 +93,8 @@
(texture-wrap-s texture)
(texture-wrap-t texture))))
-(define null-texture (%make-texture 0 0 0 'linear 'linear 'repeat 'repeat))
+(define null-texture
+ (%make-texture 0 0 0 'linear 'linear 'repeat 'repeat (f32vector 0.0 0.0)))
(define <<texture>> (class-of null-texture))
@@ -152,7 +154,8 @@ clamp-to-edge. FORMAT specifies the pixel format. Currently only
(let ((texture (gpu-guard
(%make-texture (gl-generate-texture) width height
- min-filter mag-filter wrap-s wrap-t))))
+ min-filter mag-filter wrap-s wrap-t
+ (f32vector width height)))))
(texture-set! 0 texture)
(gl-texture-parameter (texture-target texture-2d)
(texture-parameter-name texture-min-filter)