diff options
Diffstat (limited to 'minuitwrp')
-rw-r--r-- | minuitwrp/graphics.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c index 99f584183..ddff571fe 100644 --- a/minuitwrp/graphics.c +++ b/minuitwrp/graphics.c @@ -483,13 +483,21 @@ void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) { } GGLContext *gl = gr_context; - gl->bindTexture(gl, (GGLSurface*) source); + GGLSurface *surface = (GGLSurface*)source; + + if(surface->format == GGL_PIXEL_FORMAT_RGBX_8888) + gl->disable(gl, GGL_BLEND); + + gl->bindTexture(gl, surface); gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE); gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE); gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE); gl->enable(gl, GGL_TEXTURE_2D); gl->texCoord2i(gl, sx - dx, sy - dy); gl->recti(gl, dx, dy, dx + w, dy + h); + + if(surface->format == GGL_PIXEL_FORMAT_RGBX_8888) + gl->enable(gl, GGL_BLEND); } unsigned int gr_get_width(gr_surface surface) { |