public void glViewport (int x, int y, int width, int height) { GL11.glViewport(x, y, width, height); }
public void glViewport (int x, int y, int width, int height) { GL11.glViewport(x, y, width, height); }
public void glViewport (int x, int y, int width, int height) { GL11.glViewport(x, y, width, height); }
public void glViewport (int x, int y, int width, int height) { GL11.glViewport(x, y, width, height); }
@Override public void glViewport(final int x, final int y, final int width, final int height) { GL11.glViewport(x, y, width, height); }
public void glViewport(int param1, int param2, int param3, int param4) { GL11.glViewport(param1, param2, param3, param4); }
/** * First sets a viewport and then renders a quad filling it. * * @param x an integer representing the x coordinate (in pixels) of the origin of the viewport. * @param y an integer representing the y coordinate (in pixels) of the origin of the viewport. * @param viewportWidth an integer representing the width (in pixels) the viewport. * @param viewportHeight an integer representing the height (in pixels) the viewport. */ // TODO: perhaps remove this method and make sure the viewport is set explicitly. // TODO: find a much more suitable name for this method public static void renderFullscreenQuad(int x, int y, int viewportWidth, int viewportHeight) { glViewport(x, y, viewportWidth, viewportHeight); renderFullscreenQuad(); }
private void updateViewport() { glViewport(0, 0, Display.getWidth(), Display.getHeight()); propertyChangeSupport.firePropertyChange(DISPLAY_RESOLUTION_CHANGE, 0, 1); }
@Override public void process() { glViewport(0, 0, fbo.width(), fbo.height()); } }
@Override public void unbindFrame() { GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0); GL11.glViewport(vp.get(0), vp.get(1), vp.get(2), vp.get(3)); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, Display.getWidth(), Display.getHeight(), 0, 0, 2048f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); }
private void initOpenGL(Context currentContext) { logger.info("Initializing OpenGL"); checkOpenGL(); glViewport(0, 0, Display.getWidth(), Display.getHeight()); initOpenGLParams(); currentContext.put(ShaderManager.class, new ShaderManagerLwjgl()); }
@Override public void process() { PerformanceMonitor.startActivity("rendering/" + getUri()); // The way things are set-up right now, we can have FBOs that are not the same size as the display (if scale != 100%). // However, when drawing the final image to the screen, we always want the viewport to match the size of display, // and not that of some FBO. Hence, we are manually setting the viewport via glViewport over here. glViewport(0, 0, Display.getWidth(), Display.getHeight()); renderFullscreenQuad(); PerformanceMonitor.endActivity(); }
glViewport(0, 0, lastUpdatedGBuffer.width(), lastUpdatedGBuffer.height());
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glViewport(0, 0, width, height); glScissor(0, 0, width, height);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glViewport(0, 0, width, height); glScissor(0, 0, width, height);
glViewport(0, 0, Display.getWidth(), Display.getHeight());
@Override public void bindFrame() { vp = BufferUtils.createIntBuffer(16); GL11.glGetInteger(GL11.GL_VIEWPORT, vp); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, frame); GL11.glViewport(0, 0, size.x(), size.y()); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, size.x(), size.y(), 0, 0, 2048f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } }
@Override public void resize(int width, int height) { GL11.glViewport(0, 0, width, height); mat.identity(); mat.ortho(0, width, 0, height, -1, 1); mat.get(matBfr); for(ShaderProgram shader : shaders) { useProgram(shader); GL20.glUniformMatrix4fv(shader.ufs[PROJ], false, matBfr); } }
@Override public void render(Window window) { if ( window.isResized() ) { glViewport(0, 0, window.getWidth(), window.getHeight()); window.setResized(false); } window.setClearColor(color, color, color, 0.0f); renderer.clear(); } }
protected void resetCamera() { ScaledResolution scaledresolution = new ScaledResolution(mc); GL11.glViewport(0, 0, mc.displayWidth, mc.displayHeight); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0.0D, scaledresolution.getScaledWidth_double(), scaledresolution.getScaledHeight_double(), 0.0D, 1000.0D, 3000.0D); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); }