gpu: don't compute scene if the scene buffer isn't filled yet
This commit is contained in:
@@ -740,6 +740,10 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
gl.glBufferSubData(gl.GL_UNIFORM_BUFFER, 0, uniformBuffer.limit() * Integer.BYTES, uniformBuffer);
|
gl.glBufferSubData(gl.GL_UNIFORM_BUFFER, 0, uniformBuffer.limit() * Integer.BYTES, uniformBuffer);
|
||||||
gl.glBindBuffer(gl.GL_UNIFORM_BUFFER, 0);
|
gl.glBindBuffer(gl.GL_UNIFORM_BUFFER, 0);
|
||||||
|
|
||||||
|
// Draw 3d scene
|
||||||
|
final TextureProvider textureProvider = client.getTextureProvider();
|
||||||
|
if (textureProvider != null && this.bufferId != -1)
|
||||||
|
{
|
||||||
gl.glUniformBlockBinding(glSmallComputeProgram, uniBlockSmall, 0);
|
gl.glUniformBlockBinding(glSmallComputeProgram, uniBlockSmall, 0);
|
||||||
gl.glUniformBlockBinding(glComputeProgram, uniBlockLarge, 0);
|
gl.glUniformBlockBinding(glComputeProgram, uniBlockLarge, 0);
|
||||||
|
|
||||||
@@ -778,10 +782,6 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
|
|
||||||
gl.glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
|
gl.glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
|
||||||
|
|
||||||
// Draw 3d scene
|
|
||||||
final TextureProvider textureProvider = client.getTextureProvider();
|
|
||||||
if (textureProvider != null)
|
|
||||||
{
|
|
||||||
if (textureArrayId == -1)
|
if (textureArrayId == -1)
|
||||||
{
|
{
|
||||||
// lazy init textures as they may not be loaded at plugin start.
|
// lazy init textures as they may not be loaded at plugin start.
|
||||||
|
|||||||
Reference in New Issue
Block a user