OGLMachine::OGLInternalViewPort Class Reference

Inherits InternalViewPort.

List of all members.


Detailed Description

Definition at line 141 of file OGLMachine.h.

Public Member Functions

 OGLInternalViewPort (OGLInternalViewPort *_pFather, OGLMachine *_pCreator)
 Constructor.
virtual ~OGLInternalViewPort ()
 Destructor. See DeleteViewport().
virtual void Clear (float _red=0.0f, float _green=0.0f, float _blue=0.0f)
 Reset color to black (or given color),and depth buffer, of this ViewPort.
virtual void RenderMesh (InternalObject3DBuffer *_pMeshBuffer, InternalTexture *_pTexture=0L)
 Render a 3D Object. The vertexes are transformed with matrix _pMatrix, the object shape is defined by _pMeshBuffer, the texture of the object is defined by _pTexture, the ViewPort that define the rectangle where to draw, and the camera parameters is _pViewPort, or the default viewport if not specified. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.
virtual void DrawRGBARectangle (unsigned char *_prgbaTable, unsigned int _PixelWidth, unsigned int _PixelHeight)
 Render directly a 32bit pixel bitmap image from memory on a viewport. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.
virtual void SwapBuffer ()
 Swap buffer so that what was drawn on the viewport is shown. this is needed to active all Clear(), RenderMesh() ,... It has to be done with main screen viewport like texture-rendering viewports.
void ResetRootPixelSize (unsigned int _pixelWidth, unsigned int _pixelHeight)
 Change the root viewport pixel resolution.This is a low level call in case of resize or screen init.
int GetPixelX1 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
int GetPixelY1 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
int GetPixelX2 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
int GetPixelY2 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
virtual void SetGLToViewPort ()
 Tool for other methods: Set the current GL viewport matrix to an InternalViewPort.

Public Attributes

float m_ScaleRootX1
 2d Scale coordinates of the rectangle recomputed in the Root ViewPort scale.
float m_ScaleRootY1
float m_ScaleRootX2
float m_ScaleRootY2
float m_ClippingRootX1
 2d coordinates of the rectangle recomputed in the Root ViewPort scale.
float m_ClippingRootY1
float m_ClippingRootX2
float m_ClippingRootY2
float m_FinalClipFrustrumX1
 real clipped frustrum
float m_FinalClipFrustrumY1
float m_FinalClipFrustrumX2
float m_FinalClipFrustrumY2
OGLInternalTexturem_pRenderTexture
 in case of texture rendering, otherwise 0L:
int m_RenderTextureLayer
 layer index affected on texture: m_pRenderTexture.

Protected Attributes

OGLMachinem_pOGLMachine
 machine that created us:
bool m_Valid
 if false, can't be drawn, because invalid coordinates.
int m_pixel_x1
 the rectangle coordinates in term of screen pixel.
int m_pixel_y1
 the rectangle coordinates in term of screen pixel.
int m_pixel_x2
 the rectangle coordinates in term of screen pixel.
int m_pixel_y2
 the rectangle coordinates in term of screen pixel.
InternalViewPort ** m_ppClippingHierarchyAttached


Constructor & Destructor Documentation

OGLInternalViewPort OGLInternalViewPort _pFather,
OGLMachine _pCreator
 

Constructor.

Parameters:
_pFather the father, or NULL if new root.
_pCreator the machine upon that manage the VP.

virtual ~OGLInternalViewPort  )  [virtual]
 

Destructor. See DeleteViewport().


Member Function Documentation

virtual void Clear float  _red = 0.0f,
float  _green = 0.0f,
float  _blue = 0.0f
[virtual]
 

Reset color to black (or given color),and depth buffer, of this ViewPort.

Parameters:
_red [0.0,1.0]
_green [0.0,1.0]
_blue [0.0,1.0]

virtual void DrawRGBARectangle unsigned char *  _prgbaTable,
unsigned int  _PixelWidth,
unsigned int  _PixelHeight
[virtual]
 

Render directly a 32bit pixel bitmap image from memory on a viewport. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.

Parameters:
_prgbaTable pointer to the beginning of a 32bit RGBA table.
_PixelWidth number of pixel of a line
_PixelHeight number of pixel lines.

int GetPixelX1  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 227 of file OGLMachine.h.

References m_pixel_x1.

int GetPixelX2  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 237 of file OGLMachine.h.

References m_pixel_x2.

int GetPixelY1  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 232 of file OGLMachine.h.

References m_pixel_y1.

int GetPixelY2  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 242 of file OGLMachine.h.

virtual void RenderMesh InternalObject3DBuffer *  _pMeshBuffer,
InternalTexture *  _pTexture = 0L
[virtual]
 

Render a 3D Object. The vertexes are transformed with matrix _pMatrix, the object shape is defined by _pMeshBuffer, the texture of the object is defined by _pTexture, the ViewPort that define the rectangle where to draw, and the camera parameters is _pViewPort, or the default viewport if not specified. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.

Parameters:
_pMatrix Internal3DMatrixStack
_pMeshBuffer InternalObject3DBuffer
_pTexture InternalTexture or nothing, will draw shades.

void ResetRootPixelSize unsigned int  _pixelWidth,
unsigned int  _pixelHeight
 

Change the root viewport pixel resolution.This is a low level call in case of resize or screen init.

Parameters:
_pixelWidth 
_pixelHeight 

virtual void SetGLToViewPort  )  [virtual]
 

Tool for other methods: Set the current GL viewport matrix to an InternalViewPort.

virtual void SwapBuffer  )  [virtual]
 

Swap buffer so that what was drawn on the viewport is shown. this is needed to active all Clear(), RenderMesh() ,... It has to be done with main screen viewport like texture-rendering viewports.


Member Data Documentation

float m_ClippingRootX1
 

2d coordinates of the rectangle recomputed in the Root ViewPort scale.

Definition at line 251 of file OGLMachine.h.

float m_FinalClipFrustrumX1
 

real clipped frustrum

Definition at line 257 of file OGLMachine.h.

int m_pixel_x1 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 284 of file OGLMachine.h.

Referenced by GetPixelX1().

int m_pixel_x2 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 288 of file OGLMachine.h.

Referenced by GetPixelX2().

int m_pixel_y1 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 286 of file OGLMachine.h.

Referenced by GetPixelY1().

int m_pixel_y2 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 290 of file OGLMachine.h.

OGLMachine* m_pOGLMachine [protected]
 

machine that created us:

Definition at line 280 of file OGLMachine.h.

InternalViewPort** m_ppClippingHierarchyAttached [protected]
 

the pointer where this viewport was attached in the clipping hierarchy, father or brother. Used to destroy the object. Use ClippingHierarchy_AttachTo to change it.

Definition at line 299 of file OGLMachine.h.

OGLInternalTexture* m_pRenderTexture
 

in case of texture rendering, otherwise 0L:

Definition at line 263 of file OGLMachine.h.

int m_RenderTextureLayer
 

layer index affected on texture: m_pRenderTexture.

Definition at line 265 of file OGLMachine.h.

float m_ScaleRootX1
 

2d Scale coordinates of the rectangle recomputed in the Root ViewPort scale.

Definition at line 242 of file OGLMachine.h.

bool m_Valid [protected]
 

if false, can't be drawn, because invalid coordinates.

Definition at line 282 of file OGLMachine.h.


The documentation for this class was generated from the following file:
      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/