gpu: wait for canvas to get it's native peer before starting OpenGL
This commit is contained in:
@@ -235,6 +235,15 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
bufferId = uvBufferId = uniformBufferId = -1;
|
bufferId = uvBufferId = uniformBufferId = -1;
|
||||||
unorderedModels = smallModels = largeModels = 0;
|
unorderedModels = smallModels = largeModels = 0;
|
||||||
|
|
||||||
|
canvas = client.getCanvas();
|
||||||
|
|
||||||
|
if (!canvas.isDisplayable())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.setIgnoreRepaint(true);
|
||||||
|
|
||||||
vertexBuffer = new GpuIntBuffer();
|
vertexBuffer = new GpuIntBuffer();
|
||||||
uvBuffer = new GpuFloatBuffer();
|
uvBuffer = new GpuFloatBuffer();
|
||||||
|
|
||||||
@@ -242,9 +251,6 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
modelBufferSmall = new GpuIntBuffer();
|
modelBufferSmall = new GpuIntBuffer();
|
||||||
modelBuffer = new GpuIntBuffer();
|
modelBuffer = new GpuIntBuffer();
|
||||||
|
|
||||||
canvas = client.getCanvas();
|
|
||||||
canvas.setIgnoreRepaint(true);
|
|
||||||
|
|
||||||
if (log.isDebugEnabled())
|
if (log.isDebugEnabled())
|
||||||
{
|
{
|
||||||
System.setProperty("jogl.debug", "true");
|
System.setProperty("jogl.debug", "true");
|
||||||
@@ -340,7 +346,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
|
|
||||||
shutDown();
|
shutDown();
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user