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

Method defaultGLPreambleBackground

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

Source from the content-addressed store, hash-verified

503
504 return true;
505 }
506
507 public boolean defaultGLPreambleTransparent(int pass) {
508
509 GraphicsContext.getContext().stateTracker.viewport.set(new int[]{0, 0, window.getFrameBufferWidth(), window.getFrameBufferHeight()});
510 GraphicsContext.getContext().stateTracker.scissor.set(new int[]{0, 0, window.getFrameBufferWidth(), window.getFrameBufferHeight()});
511 glClearColor((float) window.background.x, (float) window.background.y, (float) window.background.z, 0);
512 glClear(GL11.GL_COLOR_BUFFER_BIT);
513 glEnable(GL11.GL_BLEND);
514 glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
515 glDisable(GL11.GL_DEPTH_TEST);
516 if (Main.os != Main.OS.mac) glEnable(GL13.GL_MULTISAMPLE);
517
518 return true;

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected