Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

GraphicsBufferI Class Reference

Graphics buffer class. More...

#include <GraphicsBufferI.h>

Inheritance diagram for GraphicsBufferI:

DeviceInterfaceI DataBlockI OpenGLBufferC List of all members.

Public Methods

virtual Edit::DataBlockIcreate ()=0
 Create new graphics device.

virtual void set_graphicsdevice (GraphicsDeviceI *pDevice)=0
 Sets the owner of the buffer.

virtual PluginClass::SuperClassIdC get_super_class_id () const
 Returns super class ID.

virtual PajaTypes::uint32 save (FileIO::SaveC *pSave)
 Serialize device settings to a Demopaja output stream.

virtual PajaTypes::uint32 load (FileIO::LoadC *pLoad)
 Serialize device settings from a Demopaja input stream.

virtual bool init (PajaTypes::uint32 ui32Flags, PajaTypes::uint32 ui32Width=0, PajaTypes::uint32 ui32Height=0)=0
 Intialises a created graphics buffer.

virtual void flush ()=0
 Flushes the rendering buffer.

virtual void bind_texture (PajaSystem::DeviceInterfaceI *pInterface, PajaTypes::uint32 ui32Properties)=0
 Uses the graphics buffer as a texture in specified device.

virtual void read_pixels (PajaTypes::uint32 ui32Flags, void *pData)=0
 Get contents of the graphics buffer.


Protected Methods

 GraphicsBufferI ()
virtual ~GraphicsBufferI ()

Detailed Description

Graphics buffer class.

To get the dimensions of the graphics buffer, query the GraphicsViewport class from it.


Member Function Documentation

virtual void bind_texture PajaSystem::DeviceInterfaceI   pInterface,
PajaTypes::uint32    ui32Properties
[pure virtual]
 

Uses the graphics buffer as a texture in specified device.

This method works only if the p-buffer is initialsed with GRAPHICSBUFFER_INIT_TEXTURE flag.

Implemented in OpenGLBufferC.

virtual Edit::DataBlockI* create   [pure virtual]
 

Create new graphics device.

Implements DataBlockI.

Implemented in OpenGLBufferC.

virtual void flush   [pure virtual]
 

Flushes the rendering buffer.

Implemented in OpenGLBufferC.

virtual PluginClass::SuperClassIdC get_super_class_id   const [virtual]
 

Returns super class ID.

Implements DeviceInterfaceI.

virtual bool init PajaTypes::uint32    ui32Flags,
PajaTypes::uint32    ui32Width = 0,
PajaTypes::uint32    ui32Height = 0
[pure virtual]
 

Intialises a created graphics buffer.

If init() is called for already created buffer, the old contents is deleted and new buffer is initialised.

If flags is GRAPHICSBUFFER_INIT_OFFSCREEN, the G-Buffer is used for off-screen rendering.

If flags is GRAPHICSBUFFER_INIT_TEXTURE, the G-Buffer is used for render-to-texture operation and can be bind as a texture.

Implemented in OpenGLBufferC.

virtual PajaTypes::uint32 load FileIO::LoadC   pLoad [virtual]
 

Serialize device settings from a Demopaja input stream.

Implements DeviceInterfaceI.

virtual void read_pixels PajaTypes::uint32    ui32Flags,
void *    pData
[pure virtual]
 

Get contents of the graphics buffer.

The array passed to parameter pData depends on the flags.

If flags is GRAPHICSBUFFER_GET_RGB, the array is assumed to be width * height * 3 * sizeof( uint8 ) bytes in length and the data is stored in RGB order, one component in each byte.

If flags is GRAPHICSBUFFER_GET_RGBA, the array is assumed to be width * height * 4 * sizeof( uint8 ) bytes in length and the data is stored in RGBA order, one component in each byte.

If flags is GRAPHICSBUFFER_GET_ALPHA, the array is assumed to be width * height * sizeof( uint8 ) bytes in length and the data is stored as one alpha value in each byte.

If flags is GRAPHICSBUFFER_GET_ALPHA, the array is assumed to be width * height * sizeof( uint8 ) bytes in length and the data is stored as one alpha value in each byte.

If flags is GRAPHICSBUFFER_GET_DEPTH, the array is assumed to be width * height * sizeof( float32 ) bytes in length and the data is stored as one depth value in each floating point value.

If flags is GRAPHICSBUFFER_GET_STENCIL, the array is assumed to be width * height * sizeof( uint8 ) bytes in length and the data is stored as one stencil value in each byte.

Implemented in OpenGLBufferC.

virtual PajaTypes::uint32 save FileIO::SaveC   pSave [virtual]
 

Serialize device settings to a Demopaja output stream.

Implements DeviceInterfaceI.

virtual void set_graphicsdevice GraphicsDeviceI   pDevice [pure virtual]
 

Sets the owner of the buffer.

Implemented in OpenGLBufferC.


Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions