X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fgacela_draw.scm;h=5fbc92e6f65e2c7f6e2da579861f97da276b56fa;hb=556fd6c80969ab9a474f2c66ae1aceec3866f16a;hp=184eba20b76348094b64ed3b1cc18b12737c16fa;hpb=770c0935d07abeb28578e236ef8966aed0a31b21;p=gacela.git diff --git a/src/gacela_draw.scm b/src/gacela_draw.scm index 184eba2..5fbc92e 100644 --- a/src/gacela_draw.scm +++ b/src/gacela_draw.scm @@ -63,6 +63,7 @@ (init-sdl) (let ((image (IMG_Load filename))) (cond (image + (SDL_SetAlpha image 0 0) (let* ((width (surface-w image)) (height (surface-h image)) (power-2 (nearest-power-of-two (min width height))) (resized-image #f)) @@ -85,8 +86,8 @@ (cond (image (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))) + (if (= (surface-format-BytesPerPixel image) 3) GL_RGB GL_RGBA) + (if (= (surface-format-BytesPerPixel image) 3) GL_BGR GL_BGRA))) (texture (car (glGenTextures 1)))) (glBindTexture GL_TEXTURE_2D texture)