@ -486,13 +486,13 @@ public class LwjglRenderer implements Renderer {
context . depthTestEnabled = false ;
context . depthTestEnabled = false ;
}
}
if ( state . isAlphaTest ( ) & & ! context . alphaTestEnabled ) {
if ( state . isAlphaTest ( ) & & context . alphaTestFallOff = = 0 ) {
glEnable ( GL_ALPHA_TEST ) ;
glEnable ( GL_ALPHA_TEST ) ;
glAlphaFunc ( GL_GREATER , state . getAlphaFallOff ( ) ) ;
glAlphaFunc ( GL_GREATER , state . getAlphaFallOff ( ) ) ;
context . alphaTestEnabled = true ;
context . alphaTestFallOff = state . getAlphaFallOff ( ) ;
} else if ( ! state . isAlphaTest ( ) & & context . alphaTestEnabled ) {
} else if ( ! state . isAlphaTest ( ) & & context . alphaTestFallOff ! = 0 ) {
glDisable ( GL_ALPHA_TEST ) ;
glDisable ( GL_ALPHA_TEST ) ;
context . alphaTestEnabled = false ;
context . alphaTestFallOff = 0 ;
}
}
if ( state . isDepthWrite ( ) & & ! context . depthWriteEnabled ) {
if ( state . isDepthWrite ( ) & & ! context . depthWriteEnabled ) {
@ -1038,7 +1038,7 @@ public class LwjglRenderer implements Renderer {
// Check if GLSL version is 1.5 for shader
// Check if GLSL version is 1.5 for shader
GL30 . glBindFragDataLocation ( id , 0 , "outFragColor" ) ;
GL30 . glBindFragDataLocation ( id , 0 , "outFragColor" ) ;
// For MRT
// For MRT
for ( int i = 0 ; i < maxMRTFBOAttachs ; i + + ) {
for ( int i = 0 ; i < maxMRTFBOAttachs ; i + + ) {
GL30 . glBindFragDataLocation ( id , i , "outFragData[" + i + "]" ) ;
GL30 . glBindFragDataLocation ( id , i , "outFragData[" + i + "]" ) ;
}
}
}
}
@ -1201,8 +1201,8 @@ public class LwjglRenderer implements Renderer {
mask | = GL_DEPTH_BUFFER_BIT ;
mask | = GL_DEPTH_BUFFER_BIT ;
}
}
glBlitFramebufferEXT ( srcX0 , srcY0 , srcX1 , srcY1 ,
glBlitFramebufferEXT ( srcX0 , srcY0 , srcX1 , srcY1 ,
dstX0 , dstY0 , dstX1 , dstY1 , mask ,
dstX0 , dstY0 , dstX1 , dstY1 , mask ,
GL_NEAREST ) ;
GL_NEAREST ) ;
glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , prevFBO ) ;
glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , prevFBO ) ;
@ -1895,7 +1895,7 @@ public class LwjglRenderer implements Renderer {
public void setTexture ( int unit , Texture tex ) {
public void setTexture ( int unit , Texture tex ) {
Image image = tex . getImage ( ) ;
Image image = tex . getImage ( ) ;
if ( image . isUpdateNeeded ( ) | | ( image . isGeneratedMipmapsRequired ( ) & & ! image . isMipmapsGenerated ( ) ) ) {
if ( image . isUpdateNeeded ( ) | | ( image . isGeneratedMipmapsRequired ( ) & & ! image . isMipmapsGenerated ( ) ) ) {
updateTexImageData ( image , tex . getType ( ) , unit ) ;
updateTexImageData ( image , tex . getType ( ) , unit ) ;
}
}