/** Draws the specified sub-rectangle of the overlay on top of the OpenGL drawable. {@link #beginRendering} and {@link #endRendering} must be used in conjunction with this method to achieve proper rendering results. This method should be called while the OpenGL context for the drawable is current, and after your OpenGL scene has been rendered. @param x the lower-left x coordinate (relative to the lower left of the overlay) of the rectangle to draw @param y the lower-left y coordinate (relative to the lower left of the overlay) of the rectangle to draw @param width the width of the rectangle to draw @param height the height of the rectangle to draw @throws GLException If an OpenGL context is not current when this method is called */ public void draw(final int x, final int y, final int width, final int height) throws GLException { draw(x, y, x, y, width, height); }
/** Draws the entire contents of the overlay on top of the OpenGL drawable. This is a convenience method which encapsulates all portions of the rendering process; if this method is used, {@link #beginRendering}, {@link #endRendering}, etc. should not be used. This method should be called while the OpenGL context for the drawable is current, and after your OpenGL scene has been rendered. @throws GLException If an OpenGL context is not current when this method is called */ public void drawAll() throws GLException { beginRendering(); draw(0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); endRendering(); }