X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FRenderingContext.java;h=63ff0d9abb88fd6fd05b0cdfe36d64a5bce6f43e;hb=HEAD;hp=a5f7fb70018ae2c6d6a4162a6b13fd62cd74bbd4;hpb=a3ff3683bd0a025061667b26b6fcf56fe20f0afc;p=sixth-3d.git 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.