|
@@ -369,11 +369,8 @@ bool Texture::loadVolatile()
|
|
if (isReadable())
|
|
if (isReadable())
|
|
createTexture();
|
|
createTexture();
|
|
|
|
|
|
- if (!usingDefaultTexture && framebufferStatus == GL_FRAMEBUFFER_COMPLETE
|
|
|
|
- && (!isReadable() || actualSamples > 1))
|
|
|
|
- {
|
|
|
|
|
|
+ if (framebufferStatus == GL_FRAMEBUFFER_COMPLETE && (!isReadable() || actualSamples > 1))
|
|
framebufferStatus = newRenderbuffer(pixelWidth, pixelHeight, actualSamples, format, renderbuffer);
|
|
framebufferStatus = newRenderbuffer(pixelWidth, pixelHeight, actualSamples, format, renderbuffer);
|
|
- }
|
|
|
|
|
|
|
|
textureGLError = glGetError();
|
|
textureGLError = glGetError();
|
|
|
|
|
|
@@ -403,7 +400,6 @@ bool Texture::loadVolatile()
|
|
|
|
|
|
setGraphicsMemorySize(memsize);
|
|
setGraphicsMemorySize(memsize);
|
|
|
|
|
|
- usingDefaultTexture = false;
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -575,13 +571,6 @@ void Texture::setSamplerState(const SamplerState &s)
|
|
samplerState.mipmapFilter = SamplerState::MIPMAP_FILTER_NEAREST;
|
|
samplerState.mipmapFilter = SamplerState::MIPMAP_FILTER_NEAREST;
|
|
}
|
|
}
|
|
|
|
|
|
- // We don't want filtering or (attempted) mipmaps on the default texture.
|
|
|
|
- if (usingDefaultTexture)
|
|
|
|
- {
|
|
|
|
- samplerState.mipmapFilter = SamplerState::MIPMAP_FILTER_NONE;
|
|
|
|
- samplerState.minFilter = samplerState.magFilter = SamplerState::FILTER_NEAREST;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// If we only have limited NPOT support then the wrap mode must be CLAMP.
|
|
// If we only have limited NPOT support then the wrap mode must be CLAMP.
|
|
if ((GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 || GLAD_OES_texture_npot))
|
|
if ((GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 || GLAD_OES_texture_npot))
|
|
&& (pixelWidth != nextP2(pixelWidth) || pixelHeight != nextP2(pixelHeight) || depth != nextP2(depth)))
|
|
&& (pixelWidth != nextP2(pixelWidth) || pixelHeight != nextP2(pixelHeight) || depth != nextP2(depth)))
|