X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FRenderingContext.java;fp=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FRenderingContext.java;h=63ff0d9abb88fd6fd05b0cdfe36d64a5bce6f43e;hp=a5f7fb70018ae2c6d6a4162a6b13fd62cd74bbd4;hb=5a51f90f06561a1262ea9805f58d856a9cadd015;hpb=037f1a226b5305f605fa15afb1abd9399554eccb diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java b/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java index a5f7fb7..63ff0d9 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java @@ -13,13 +13,32 @@ import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import java.awt.image.WritableRaster; +/** + * Rendering context that contains all the information that is needed to render the scene. + */ + public class RenderingContext { public static final int bufferedImageType = BufferedImage.TYPE_4BYTE_ABGR; + public final Graphics2D graphics; + + /** + * Pixels of the rendering area. + * Each pixel is represented by 4 bytes: alpha, blue, green, red. + */ public final byte[] pixels; + + /** + * Width of the rendering area in pixels. + */ public final int width; + + /** + * Height of the rendering area in pixels. + */ public final int height; + /** * Center of the screen in screen space (pixels). * This is the point where (0,0) coordinate of the world space is rendered.