(resized-image #f))
(cond ((and (= width power-2) (= height power-2)) (values image width height))
(else (set! resized-image (resize-surface image power-2 power-2))
(resized-image #f))
(cond ((and (= width power-2) (= height power-2)) (values image width height))
(else (set! resized-image (resize-surface image power-2 power-2))
(define (resize-surface surface width height)
(let ((old-width (surface-w surface)) (old-height (surface-h surface)))
(define (resize-surface surface width height)
(let ((old-width (surface-w surface)) (old-height (surface-h surface)))
- (let ((width (get-surface-width image)) (height (get-surface-height image))
- (byteorder (if (= (SDL_ByteOrder) SDL_LIL_ENDIAN)
+ (let ((width (surface-w image)) (height (surface-h image))
+ (byteorder (if (= SDL_BYTEORDER SDL_LIL_ENDIAN)
(if (= (surface-format-BytesPerPixel image) 3) GL_BGR GL_BGRA)
(if (= (surface-format-BytesPerPixel image) 3) GL_RGB GL_RGBA)))
(texture (car (glGenTextures 1))))
(if (= (surface-format-BytesPerPixel image) 3) GL_BGR GL_BGRA)
(if (= (surface-format-BytesPerPixel image) 3) GL_RGB GL_RGBA)))
(texture (car (glGenTextures 1))))