@Override public void setClipTestEnabled(final boolean enabled) { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); setClippingEnabled(record, enabled); }
public boolean isClipTestEnabled() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); return record.isClippingTestEnabled(); }
public void popClip() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().pop(); LwjglRendererUtil.applyScissors(record); }
public void pushEmptyClip() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().push(null); JoglRendererUtil.applyScissors(record); }
public void clearClips() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().clear(); LwjglRendererUtil.applyScissors(record); }
@Override public void pushEmptyClip() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().push(null); applyScissors(record); }
public void pushClip(final ReadOnlyRectangle2 rectangle) { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().push(rectangle); LwjglRendererUtil.applyScissors(record); }
public void clearClips() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().clear(); JoglRendererUtil.applyScissors(record); }
public void popClip() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord record = context.getRendererRecord(); record.getScissorClips().pop(); JoglRendererUtil.applyScissors(record); }
public void unbindVBO() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); JoglRendererUtil.setBoundVBO(rendRecord, 0); JoglRendererUtil.setBoundElementVBO(rendRecord, 0); }
public void setProjectionMatrix(final FloatBuffer matrix) { final RendererRecord matRecord = ContextManager.getCurrentContext().getRendererRecord(); LwjglRendererUtil.switchMode(matRecord, GL11.GL_PROJECTION); loadMatrix(matrix); }
public void unbindVBO() { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); LwjglRendererUtil.setBoundVBO(rendRecord, 0); LwjglRendererUtil.setBoundElementVBO(rendRecord, 0); }
public void setModelViewMatrix(final FloatBuffer matrix) { final JoglRendererRecord matRecord = (JoglRendererRecord) ContextManager.getCurrentContext() .getRendererRecord(); JoglRendererUtil.switchMode(matRecord, GLMatrixFunc.GL_MODELVIEW); loadMatrix(matrix); }
public void setProjectionMatrix(final FloatBuffer matrix) { final JoglRendererRecord matRecord = (JoglRendererRecord) ContextManager.getCurrentContext() .getRendererRecord(); JoglRendererUtil.switchMode(matRecord, GLMatrixFunc.GL_PROJECTION); loadMatrix(matrix); }
private void loadMatrix(final FloatBuffer matrix) { final JoglRendererRecord matRecord = (JoglRendererRecord) ContextManager.getCurrentContext() .getRendererRecord(); matRecord.getMatrixBackend().loadMatrix(matrix); }
public void undoTransforms(final ReadOnlyTransform transform) { final JoglRendererRecord matRecord = (JoglRendererRecord) ContextManager.getCurrentContext() .getRendererRecord(); JoglRendererUtil.switchMode(matRecord, GLMatrixFunc.GL_MODELVIEW); matRecord.getMatrixBackend().popMatrix(); }
private FloatBuffer getMatrix(final int matrixType, final FloatBuffer store) { FloatBuffer result = store; if (result.remaining() < 16) { result = BufferUtils.createFloatBuffer(16); } final JoglRendererRecord matRecord = (JoglRendererRecord) ContextManager.getCurrentContext() .getRendererRecord(); matRecord.getMatrixBackend().getMatrix(matrixType, store); // GLContext.getCurrentGL().glGetFloatv(matrixType, store); return result; }
public void setupNormalDataVBO(final FloatBufferData data) { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY); LwjglRendererUtil.setBoundVBO(rendRecord, vboID); GL11.glNormalPointer(GL11.GL_FLOAT, 0, 0); } else { GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY); } }
public void setupColorDataVBO(final FloatBufferData data) { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { GL11.glEnableClientState(GL11.GL_COLOR_ARRAY); LwjglRendererUtil.setBoundVBO(rendRecord, vboID); GL11.glColorPointer(data.getValuesPerTuple(), GL11.GL_FLOAT, 0, 0); } else { GL11.glDisableClientState(GL11.GL_COLOR_ARRAY); } }
public void setupVertexDataVBO(final FloatBufferData data) { final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); LwjglRendererUtil.setBoundVBO(rendRecord, vboID); GL11.glVertexPointer(data.getValuesPerTuple(), GL11.GL_FLOAT, 0, 0); } else { GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); } }