MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / defaultGLPreamble

Method defaultGLPreamble

src/main/java/fieldbox/Open.java:489–502  ·  view source on GitHub ↗
(int pass)

Source from the content-addressed store, hash-verified

487 glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
488 glDisable(GL11.GL_DEPTH_TEST);
489 if (Main.os != Main.OS.mac) glEnable(GL13.GL_MULTISAMPLE);
490
491 return true;
492 }
493
494
495 public boolean defaultGLPreambleBackground(int pass) {
496
497 GraphicsContext.getContext().stateTracker.viewport.set(new int[]{0, 0, window.getFrameBufferWidth(), window.getFrameBufferHeight()});
498 GraphicsContext.getContext().stateTracker.scissor.set(new int[]{0, 0, window.getFrameBufferWidth(), window.getFrameBufferHeight()});
499 glEnable(GL11.GL_BLEND);
500 glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
501 glDisable(GL11.GL_DEPTH_TEST);
502 if (Main.os != Main.OS.mac) glEnable(GL13.GL_MULTISAMPLE);
503
504 return true;
505 }

Callers

nothing calls this directly

Calls 9

getContextMethod · 0.95
getFrameBufferWidthMethod · 0.80
getFrameBufferHeightMethod · 0.80
glClearColorMethod · 0.80
glClearMethod · 0.80
glEnableMethod · 0.80
glBlendFuncMethod · 0.80
glDisableMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected