diff --git a/src/main/resources/assets/opencomputers/lib/native.32.bsd.so b/src/main/resources/assets/opencomputers/lib/native.32.bsd.so index 91ad08322..cf78fac71 100644 Binary files a/src/main/resources/assets/opencomputers/lib/native.32.bsd.so and b/src/main/resources/assets/opencomputers/lib/native.32.bsd.so differ diff --git a/src/main/resources/assets/opencomputers/lib/native.64.bsd.so b/src/main/resources/assets/opencomputers/lib/native.64.bsd.so index 815c3dac4..d3f65ce27 100644 Binary files a/src/main/resources/assets/opencomputers/lib/native.64.bsd.so and b/src/main/resources/assets/opencomputers/lib/native.64.bsd.so differ diff --git a/src/main/scala/li/cil/oc/client/renderer/TextBufferRenderCache.scala b/src/main/scala/li/cil/oc/client/renderer/TextBufferRenderCache.scala index c419617a5..a6faf9e20 100644 --- a/src/main/scala/li/cil/oc/client/renderer/TextBufferRenderCache.scala +++ b/src/main/scala/li/cil/oc/client/renderer/TextBufferRenderCache.scala @@ -31,35 +31,41 @@ object TextBufferRenderCache extends Callable[Int] with RemovalListener[TileEnti compileOrDraw(cache.get(currentBuffer, this)) } - private def compileOrDraw(list: Int) = if (currentBuffer.proxy.dirty) { - RenderState.checkError(getClass.getName + ".compileOrDraw: entering (aka: wasntme)") + private def compileOrDraw(list: Int) = { + if (currentBuffer.proxy.dirty) { + RenderState.checkError(getClass.getName + ".compileOrDraw: entering (aka: wasntme)") - val doCompile = !RenderState.compilingDisplayList - if (doCompile) { - currentBuffer.proxy.dirty = false - GL11.glNewList(list, GL11.GL_COMPILE_AND_EXECUTE) + val doCompile = !RenderState.compilingDisplayList + if (doCompile) { + currentBuffer.proxy.dirty = false + GL11.glNewList(list, GL11.GL_COMPILE_AND_EXECUTE) - RenderState.checkError(getClass.getName + ".compileOrDraw: glNewList") + RenderState.checkError(getClass.getName + ".compileOrDraw: glNewList") + } + + for (((line, color), i) <- currentBuffer.data.buffer.zip(currentBuffer.data.color).zipWithIndex) { + MonospaceFontRenderer.drawString(0, i * MonospaceFontRenderer.fontHeight, line, color, currentBuffer.data.format) + } + + RenderState.checkError(getClass.getName + ".compileOrDraw: drawString") + + if (doCompile) { + GL11.glEndList() + + RenderState.checkError(getClass.getName + ".compileOrDraw: glEndList") + + } + + RenderState.checkError(getClass.getName + ".compileOrDraw: leaving") + + true } + else { + GL11.glCallList(list) - for (((line, color), i) <- currentBuffer.data.buffer.zip(currentBuffer.data.color).zipWithIndex) { - MonospaceFontRenderer.drawString(0, i * MonospaceFontRenderer.fontHeight, line, color, currentBuffer.data.format) + RenderState.checkError(getClass.getName + ".compileOrDraw: glCallList") } - - RenderState.checkError(getClass.getName + ".compileOrDraw: drawString") - - if (doCompile) { - GL11.glEndList() - - RenderState.checkError(getClass.getName + ".compileOrDraw: glEndList") - - } - - RenderState.checkError(getClass.getName + ".compileOrDraw: leaving") - - true } - else GL11.glCallList(list) // ----------------------------------------------------------------------- // // Cache