gzz.client
Interface GraphicsAPI.RenderingSurface

All Known Subinterfaces:
GraphicsAPI.Window
All Known Implementing Classes:
GLScreen, GraphicsAPI.AbstractRenderingSurface, GraphicsAPI.AbstractWindow
Enclosing interface:
GraphicsAPI

public static interface GraphicsAPI.RenderingSurface

An interface for generic rendering surfaces.


Method Summary
 VobScene createVobScene()
          Create a new vobscene of the appropriate type, with current window size as size.
 VobScene createVobScene(java.awt.Dimension size)
          Create a new vobscene of the appropriate type for this window.
 java.awt.Dimension getSize()
          Get the current size of the window.
 int[] readPixels(int x, int y, int w, int h)
          Read pixels from the screen.
 void renderAnim(VobScene from, VobScene to, float fract, float lod, boolean showFinal)
          Render the interpolated form between the two vobscenes.
 void renderStill(VobScene vs, float lod)
          Render the still image of the vobscreen.
 

Method Detail

getSize

public java.awt.Dimension getSize()
Get the current size of the window.


renderStill

public void renderStill(VobScene vs,
                        float lod)
Render the still image of the vobscreen.


renderAnim

public void renderAnim(VobScene from,
                       VobScene to,
                       float fract,
                       float lod,
                       boolean showFinal)
Render the interpolated form between the two vobscenes.


createVobScene

public VobScene createVobScene()
Create a new vobscene of the appropriate type, with current window size as size. This vobscene will not contain any instructions to clear the window etc., since vobscenes can be used as viewports.


createVobScene

public VobScene createVobScene(java.awt.Dimension size)
Create a new vobscene of the appropriate type for this window.


readPixels

public int[] readPixels(int x,
                        int y,
                        int w,
                        int h)
Read pixels from the screen.

Returns:
An array of size w*h, of A, R, G, B from highest to lowest bit. (BGRA)