* Added proper check for framebuffer textures when doing NPOT scaling.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7441 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
7d91174b5b
commit
8b2b999bd0
@ -1715,7 +1715,10 @@ public class LwjglRenderer implements Renderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Yes, some OpenGL2 cards (GeForce 5) still dont support NPOT.
|
// Yes, some OpenGL2 cards (GeForce 5) still dont support NPOT.
|
||||||
if (!GLContext.getCapabilities().GL_ARB_texture_non_power_of_two){
|
if (!GLContext.getCapabilities().GL_ARB_texture_non_power_of_two){
|
||||||
|
if (img.getData(0) == null)
|
||||||
|
throw new RendererException("non-power-of-2 framebuffer textures are not supported by the video hardware");
|
||||||
|
|
||||||
if (img.getWidth() != 0 && img.getHeight() != 0){
|
if (img.getWidth() != 0 && img.getHeight() != 0){
|
||||||
if (!FastMath.isPowerOfTwo(img.getWidth())
|
if (!FastMath.isPowerOfTwo(img.getWidth())
|
||||||
|| !FastMath.isPowerOfTwo(img.getHeight())
|
|| !FastMath.isPowerOfTwo(img.getHeight())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user