nux-0.9.48

nux::GpuDevice Class Reference

#include <NuxGraphics/GpuDevice.h>

Data Structures

struct  PixelBufferObject

Public Member Functions

ObjectPtr< IOpenGLTexture2DCreateTexture (int Width, int Height, int Levels, BitmapFormat PixelFormat)
ObjectPtr
< IOpenGLRectangleTexture
CreateRectangleTexture (int Width, int Height, int Levels, BitmapFormat PixelFormat)
ObjectPtr< IOpenGLCubeTextureCreateCubeTexture (int EdgeLength, int Levels, BitmapFormat PixelFormat)
ObjectPtr< IOpenGLVolumeTextureCreateVolumeTexture (int Width, int Height, int Depth, int Levels, BitmapFormat PixelFormat)
ObjectPtr< IOpenGLAnimatedTextureCreateAnimatedTexture (int Width, int Height, int Depth, BitmapFormat PixelFormat)
ObjectPtr< IOpenGLVertexBufferCreateVertexBuffer (int Length, VBO_USAGE Usage)
ObjectPtr< IOpenGLIndexBufferCreateIndexBuffer (int Length, VBO_USAGE Usage, INDEX_FORMAT Format)
ObjectPtr
< IOpenGLPixelBufferObject
CreatePixelBufferObject (int Size, VBO_USAGE Usage)
ObjectPtr< IOpenGLQueryCreateQuery (QUERY_TYPE Type)
ObjectPtr
< IOpenGLVertexDeclaration
CreateVertexDeclaration (const VERTEXELEMENT *pVertexElements)
ObjectPtr
< IOpenGLFrameBufferObject
CreateFrameBufferObject ()
ObjectPtr< IOpenGLShaderProgramCreateShaderProgram ()
ObjectPtr< IOpenGLVertexShaderCreateVertexShader ()
ObjectPtr< IOpenGLPixelShaderCreatePixelShader ()
ObjectPtr
< IOpenGLAsmShaderProgram
CreateAsmShaderProgram ()
ObjectPtr< IOpenGLAsmVertexShaderCreateAsmVertexShader ()
ObjectPtr< IOpenGLAsmPixelShaderCreateAsmPixelShader ()
int SetTexture (unsigned int TextureUnit, IOpenGLBaseTexture *texture)
int DrawIndexedPrimitive (ObjectPtr< IOpenGLIndexBuffer > IndexBuffer, ObjectPtr< IOpenGLVertexDeclaration > VertexDeclaration, PRIMITIVE_TYPE PrimitiveType, int BaseVertexIndex, int MinIndex, int NumVertices, int StartIndex, int PrimitiveCount)
int DrawPrimitive (ObjectPtr< IOpenGLVertexDeclaration > VertexDeclaration, PRIMITIVE_TYPE pt_, unsigned vtx_start_, unsigned num_prims_)
int DrawPrimitiveUP (ObjectPtr< IOpenGLVertexDeclaration > VertexDeclaration, PRIMITIVE_TYPE PrimitiveType, unsigned int PrimitiveCount, const void *pVertexStreamZeroData, unsigned int VertexStreamZeroStride)
int SetStreamSource (unsigned int StreamNumber, ObjectPtr< IOpenGLVertexBuffer > pStreamData, unsigned int OffsetInBytes, unsigned int Stride, unsigned int NumComponent=0, unsigned int ComponentFormat=0)
void InvalidateVertexBuffer ()
 Setup a NULL vertex buffer.
void InvalidateIndexBuffer ()
 Setup a NULL index buffer.
void InvalidateTextureUnit (int TextureUnitIndex)
 Setup a NULL texture.
unsigned int GetPixelStoreAlignment ()
int AllocateUnpackPixelBufferIndex (int *index)
int FreeUnpackPixelBufferIndex (const int index)
int BindUnpackPixelBufferIndex (const int index)
int BindPackPixelBufferIndex (const int index)
void * LockUnpackPixelBufferIndex (const int index, const int Size)
void * LockPackPixelBufferIndex (const int index, const int Size)
void UnlockUnpackPixelBufferIndex (const int index)
void UnlockPackPixelBufferIndex (const int index)
int FormatFrameBufferObject (unsigned int Width, unsigned int Height, BitmapFormat PixelFormat)
int SetColorRenderTargetSurface (unsigned int ColorAttachmentIndex, ObjectPtr< IOpenGLSurface > pRenderTargetSurface)
int SetDepthRenderTargetSurface (ObjectPtr< IOpenGLSurface > pDepthSurface)
ObjectPtr< IOpenGLSurfaceGetColorRenderTargetSurface (unsigned int ColorAttachmentIndex)
ObjectPtr< IOpenGLSurfaceGetDepthRenderTargetSurface ()
void ActivateFrameBuffer ()
void DeactivateFrameBuffer ()
 Restore the backbuffer as the render target.
void SetCurrentFrameBufferObject (ObjectPtr< IOpenGLFrameBufferObject > fbo)
ObjectPtr
< IOpenGLFrameBufferObject
GetCurrentFrameBufferObject ()
int GetOpenGLMajorVersion () const
int GetOpenGLMinorVersion () const
bool UsePixelBufferObjects () const
GpuBrand GetGPUBrand () const
GpuRenderStatesGetRenderStates ()
GpuInfoGetGpuInfo ()
void ResetRenderStates ()
void VerifyRenderStates ()
ObjectPtr< IOpenGLBaseTextureCreateSystemCapableDeviceTexture (int Width, int Height, int Levels, BitmapFormat PixelFormat)
 Create a texture that the system supports. Rectangle texture or 2D texture.
BaseTextureCreateSystemCapableTexture ()
 Created a cached texture.
bool SUPPORT_GL_ARB_TEXTURE_NON_POWER_OF_TWO () const
bool SUPPORT_GL_EXT_TEXTURE_RECTANGLE () const
bool SUPPORT_GL_ARB_TEXTURE_RECTANGLE () const
 ~GpuDevice ()

Friends

class IOpenGLSurface
class GraphicsEngine

Constructor & Destructor Documentation

nux::GpuDevice::~GpuDevice ( )

Member Function Documentation

void nux::GpuDevice::ActivateFrameBuffer ( )
int nux::GpuDevice::AllocateUnpackPixelBufferIndex ( int *  index)
int nux::GpuDevice::BindPackPixelBufferIndex ( const int  index)
int nux::GpuDevice::BindUnpackPixelBufferIndex ( const int  index)
ObjectPtr<IOpenGLAnimatedTexture> nux::GpuDevice::CreateAnimatedTexture ( int  Width,
int  Height,
int  Depth,
BitmapFormat  PixelFormat 
)
ObjectPtr<IOpenGLAsmPixelShader> nux::GpuDevice::CreateAsmPixelShader ( )
ObjectPtr<IOpenGLAsmShaderProgram> nux::GpuDevice::CreateAsmShaderProgram ( )
ObjectPtr<IOpenGLAsmVertexShader> nux::GpuDevice::CreateAsmVertexShader ( )
ObjectPtr<IOpenGLCubeTexture> nux::GpuDevice::CreateCubeTexture ( int  EdgeLength,
int  Levels,
BitmapFormat  PixelFormat 
)
ObjectPtr<IOpenGLFrameBufferObject> nux::GpuDevice::CreateFrameBufferObject ( )
ObjectPtr<IOpenGLIndexBuffer> nux::GpuDevice::CreateIndexBuffer ( int  Length,
VBO_USAGE  Usage,
INDEX_FORMAT  Format 
)
ObjectPtr<IOpenGLPixelBufferObject> nux::GpuDevice::CreatePixelBufferObject ( int  Size,
VBO_USAGE  Usage 
)
ObjectPtr<IOpenGLPixelShader> nux::GpuDevice::CreatePixelShader ( )
ObjectPtr<IOpenGLQuery> nux::GpuDevice::CreateQuery ( QUERY_TYPE  Type)
ObjectPtr<IOpenGLRectangleTexture> nux::GpuDevice::CreateRectangleTexture ( int  Width,
int  Height,
int  Levels,
BitmapFormat  PixelFormat 
)
ObjectPtr<IOpenGLShaderProgram> nux::GpuDevice::CreateShaderProgram ( )
ObjectPtr<IOpenGLBaseTexture> nux::GpuDevice::CreateSystemCapableDeviceTexture ( int  Width,
int  Height,
int  Levels,
BitmapFormat  PixelFormat 
)

Create a texture that the system supports. Rectangle texture or 2D texture.

Texture width. Texture height. Texture number of mipmaps. If 0, all the mipmaps levels are created Texture format.

Returns:
A device texture. Depending on the system capabilities returns a ObjectPtr<IOpenGLTexture2D> or ObjectPtr<IOpenGLRectangleTexture>.
BaseTexture* nux::GpuDevice::CreateSystemCapableTexture ( )

Created a cached texture.

Returns:
A cached texture. Depending on the system capabilities, returns a Texture2D or TextureRectangle.
ObjectPtr<IOpenGLTexture2D> nux::GpuDevice::CreateTexture ( int  Width,
int  Height,
int  Levels,
BitmapFormat  PixelFormat 
)
ObjectPtr<IOpenGLVertexBuffer> nux::GpuDevice::CreateVertexBuffer ( int  Length,
VBO_USAGE  Usage 
)
ObjectPtr<IOpenGLVertexDeclaration> nux::GpuDevice::CreateVertexDeclaration ( const VERTEXELEMENT pVertexElements)
ObjectPtr<IOpenGLVertexShader> nux::GpuDevice::CreateVertexShader ( )
ObjectPtr<IOpenGLVolumeTexture> nux::GpuDevice::CreateVolumeTexture ( int  Width,
int  Height,
int  Depth,
int  Levels,
BitmapFormat  PixelFormat 
)
void nux::GpuDevice::DeactivateFrameBuffer ( )

Restore the backbuffer as the render target.

int nux::GpuDevice::DrawIndexedPrimitive ( ObjectPtr< IOpenGLIndexBuffer IndexBuffer,
ObjectPtr< IOpenGLVertexDeclaration VertexDeclaration,
PRIMITIVE_TYPE  PrimitiveType,
int  BaseVertexIndex,
int  MinIndex,
int  NumVertices,
int  StartIndex,
int  PrimitiveCount 
)
int nux::GpuDevice::DrawPrimitive ( ObjectPtr< IOpenGLVertexDeclaration VertexDeclaration,
PRIMITIVE_TYPE  pt_,
unsigned  vtx_start_,
unsigned  num_prims_ 
)
int nux::GpuDevice::DrawPrimitiveUP ( ObjectPtr< IOpenGLVertexDeclaration VertexDeclaration,
PRIMITIVE_TYPE  PrimitiveType,
unsigned int  PrimitiveCount,
const void *  pVertexStreamZeroData,
unsigned int  VertexStreamZeroStride 
)
int nux::GpuDevice::FormatFrameBufferObject ( unsigned int  Width,
unsigned int  Height,
BitmapFormat  PixelFormat 
)
int nux::GpuDevice::FreeUnpackPixelBufferIndex ( const int  index)
ObjectPtr<IOpenGLSurface> nux::GpuDevice::GetColorRenderTargetSurface ( unsigned int  ColorAttachmentIndex)
ObjectPtr<IOpenGLFrameBufferObject> nux::GpuDevice::GetCurrentFrameBufferObject ( )
ObjectPtr<IOpenGLSurface> nux::GpuDevice::GetDepthRenderTargetSurface ( )
GpuBrand nux::GpuDevice::GetGPUBrand ( ) const
GpuInfo& nux::GpuDevice::GetGpuInfo ( )
int nux::GpuDevice::GetOpenGLMajorVersion ( ) const
int nux::GpuDevice::GetOpenGLMinorVersion ( ) const
unsigned int nux::GpuDevice::GetPixelStoreAlignment ( ) [inline]
GpuRenderStates& nux::GpuDevice::GetRenderStates ( )
void nux::GpuDevice::InvalidateIndexBuffer ( )

Setup a NULL index buffer.

void nux::GpuDevice::InvalidateTextureUnit ( int  TextureUnitIndex)

Setup a NULL texture.

void nux::GpuDevice::InvalidateVertexBuffer ( )

Setup a NULL vertex buffer.

void* nux::GpuDevice::LockPackPixelBufferIndex ( const int  index,
const int  Size 
)
void* nux::GpuDevice::LockUnpackPixelBufferIndex ( const int  index,
const int  Size 
)
void nux::GpuDevice::ResetRenderStates ( )
int nux::GpuDevice::SetColorRenderTargetSurface ( unsigned int  ColorAttachmentIndex,
ObjectPtr< IOpenGLSurface pRenderTargetSurface 
)
void nux::GpuDevice::SetCurrentFrameBufferObject ( ObjectPtr< IOpenGLFrameBufferObject fbo)
int nux::GpuDevice::SetDepthRenderTargetSurface ( ObjectPtr< IOpenGLSurface pDepthSurface)
int nux::GpuDevice::SetStreamSource ( unsigned int  StreamNumber,
ObjectPtr< IOpenGLVertexBuffer pStreamData,
unsigned int  OffsetInBytes,
unsigned int  Stride,
unsigned int  NumComponent = 0,
unsigned int  ComponentFormat = 0 
)
int nux::GpuDevice::SetTexture ( unsigned int  TextureUnit,
IOpenGLBaseTexture texture 
)
bool nux::GpuDevice::SUPPORT_GL_ARB_TEXTURE_NON_POWER_OF_TWO ( ) const [inline]
bool nux::GpuDevice::SUPPORT_GL_ARB_TEXTURE_RECTANGLE ( ) const [inline]
bool nux::GpuDevice::SUPPORT_GL_EXT_TEXTURE_RECTANGLE ( ) const [inline]
void nux::GpuDevice::UnlockPackPixelBufferIndex ( const int  index)
void nux::GpuDevice::UnlockUnpackPixelBufferIndex ( const int  index)
bool nux::GpuDevice::UsePixelBufferObjects ( ) const [inline]
void nux::GpuDevice::VerifyRenderStates ( )

Friends And Related Function Documentation

friend class GraphicsEngine [friend]
friend class IOpenGLSurface [friend]

The documentation for this class was generated from the following file: