Fix warnings when running on null renderer
This commit is contained in:
@@ -222,7 +222,7 @@ void FontTextureAtlas::Flush()
|
||||
|
||||
void FontTextureAtlas::EnsureTextureCreated() const
|
||||
{
|
||||
if (_texture->IsAllocated() == false)
|
||||
if (_texture->IsAllocated() == false && GPUDevice::Instance->GetRendererType() != RendererType::Null)
|
||||
{
|
||||
// Initialize atlas texture
|
||||
if (_texture->Init(GPUTextureDescription::New2D(_width, _height, 1, _format, GPUTextureFlags::ShaderResource)))
|
||||
|
||||
@@ -220,7 +220,9 @@ namespace FlaxEngine.GUI
|
||||
width = _customResolution.Value.X;
|
||||
height = _customResolution.Value.Y;
|
||||
}
|
||||
if (_backBuffer == null || _backBuffer.Width == width && _backBuffer.Height == height)
|
||||
if (_backBuffer == null || (_backBuffer.Width == width && _backBuffer.Height == height))
|
||||
return;
|
||||
if (GPUDevice.Instance.RendererType == RendererType.Null)
|
||||
return;
|
||||
if (width < 1 || height < 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user