40package com.jogamp.opengl.util.awt;
42import java.awt.Graphics2D;
44import com.jogamp.opengl.*;
54 private boolean contentsLost;
59 this.drawable = drawable;
106 public void markDirty(
final int x,
final int y,
final int width,
final int height) {
162 public void draw(
final int x,
final int y,
final int width,
final int height)
throws GLException {
163 draw(x, y, x, y, width, height);
187 public void draw(
final int screenx,
final int screeny,
188 final int overlayx,
final int overlayy,
189 final int width,
final int height)
throws GLException {
199 private void validateRenderer() {
200 if (renderer ==
null) {
210 contentsLost =
false;
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
Provides a Java 2D overlay on top of an arbitrary GLDrawable, making it easier to do things like draw...
void draw(final int screenx, final int screeny, final int overlayx, final int overlayy, final int width, final int height)
Draws the specified sub-rectangle of the overlay at the specified x and y coordinate on top of the Op...
Graphics2D createGraphics()
Creates a Graphics2D instance for rendering into the overlay.
void markDirty(final int x, final int y, final int width, final int height)
Marks the given region of the overlay as dirty.
void beginRendering()
Begins the OpenGL rendering process for the overlay.
void endRendering()
Ends the OpenGL rendering process for the overlay.
void drawAll()
Draws the entire contents of the overlay on top of the OpenGL drawable.
Overlay(final GLDrawable drawable)
Creates a new Java 2D overlay on top of the specified GLDrawable.
void draw(final int x, final int y, final int width, final int height)
Draws the specified sub-rectangle of the overlay on top of the OpenGL drawable.
boolean contentsLost()
Indicates whether the Java 2D contents of the overlay were lost since the last time createGraphics wa...
Provides the ability to render into an OpenGL Texture using the Java 2D APIs.
int getHeight()
Returns the height of the backing store of this renderer.
void setSize(final int width, final int height)
Sets the size of the backing store of this renderer.
void drawOrthoRect(final int screenx, final int screeny)
Draws an orthographically projected rectangle containing all of the underlying texture to the specifi...
void markDirty(final int x, final int y, final int width, final int height)
Marks the given region of the TextureRenderer as dirty.
int getWidth()
Returns the width of the backing store of this renderer.
Graphics2D createGraphics()
Creates a Graphics2D instance for rendering to the backing store of this renderer.
void beginOrthoRendering(final int width, final int height)
Convenience method which assists in rendering portions of the OpenGL texture to the screen,...
void endOrthoRendering()
Convenience method which assists in rendering portions of the OpenGL texture to the screen,...
An abstraction for an OpenGL rendering target.
int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.