Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9792f85
)
ecere/gfx/drivers/OpenGL: Fixed support for textures with width/height ratio > 2
author
Jerome St-Louis
<jerome@ecere.com>
Tue, 8 Apr 2014 19:05:33 +0000
(15:05 -0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Tue, 8 Apr 2014 19:05:33 +0000
(15:05 -0400)
ecere/src/gfx/drivers/OpenGLDisplayDriver.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gfx/drivers/OpenGLDisplayDriver.ec
b/ecere/src/gfx/drivers/OpenGLDisplayDriver.ec
index
6715480
..
0f983e7
100644
(file)
--- a/
ecere/src/gfx/drivers/OpenGLDisplayDriver.ec
+++ b/
ecere/src/gfx/drivers/OpenGLDisplayDriver.ec
@@
-2321,6
+2321,9
@@
class OpenGLDisplayDriver : DisplayDriver
w = Min(w, oglSystem.maxTextureSize);
h = Min(h, oglSystem.maxTextureSize);
+ if(w * 2 < h) w = h / 2;
+ else if(h * 2 < w) h = w / 2;
+
// Switch ARGB to RGBA
//if(bitmap.format != pixelFormatRGBA)
{