Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
W3DVideoBuffer Class Reference

#include <W3DVideobuffer.h>

Inherits VideoBuffer.

Public Member Functions

 W3DVideoBuffer (Type format)
 
virtual ~W3DVideoBuffer ()
 
virtual Bool allocate (UnsignedInt width, UnsignedInt height)
 Allocates buffer.
 
virtual void free (void)
 Free buffer.
 
virtual void * lock (void)
 Returns memory pointer to start of buffer.
 
virtual void unlock (void)
 Release buffer.
 
virtual Bool valid (void)
 Is the buffer valid to use.
 
TextureClasstexture (void)
 Returns texture object.
 
- Public Member Functions inherited from VideoBuffer
 VideoBuffer (Type format)
 
virtual ~VideoBuffer ()
 
UnsignedInt xPos (void)
 
UnsignedInt yPos (void)
 X pixel offset to draw into.
 
void setPos (UnsignedInt x, UnsignedInt y)
 Y pixel offset to draw into.
 
UnsignedInt width (void)
 Set the x and y buffer offset.
 
UnsignedInt height (void)
 Returns pixel width of visible texture.
 
UnsignedInt textureWidth (void)
 Returns pixel height of visible texture.
 
UnsignedInt textureHeight (void)
 Returns pixel width of texture.
 
UnsignedInt pitch (void)
 Returns pixel height of texture.
 
Type format (void)
 Returns buffer pitch in bytes.
 
RectClass Rect (Real x1, Real y1, Real x2, Real y2)
 Returns buffer pixel format.
 

Static Public Member Functions

static WW3DFormat TypeToW3DFormat (VideoBuffer::Type format)
 
static VideoBuffer::Type W3DFormatToType (WW3DFormat w3dFormat)
 

Protected Attributes

TextureClassm_texture
 
SurfaceClassm_surface
 
- Protected Attributes inherited from VideoBuffer
UnsignedInt m_xPos
 X pixel buffer offset.
 
UnsignedInt m_yPos
 Y pixel buffer offset.
 
UnsignedInt m_width
 Buffer visible width.
 
UnsignedInt m_height
 Buffer height.
 
UnsignedInt m_textureWidth
 Buffer visible width.
 
UnsignedInt m_textureHeight
 Buffer height.
 
UnsignedInt m_pitch
 buffer pitch
 
Type m_format
 buffer pixel format
 

Additional Inherited Members

- Public Types inherited from VideoBuffer
enum  Type {
  TYPE_UNKNOWN , TYPE_R8G8B8 , TYPE_X8R8G8B8 , TYPE_R5G6B5 ,
  TYPE_X1R5G5B5 , NUM_TYPES
}
 

Detailed Description

Video buffer interface class to a W3D TextureClass

Definition at line 74 of file W3DVideobuffer.h.

Constructor & Destructor Documentation

◆ W3DVideoBuffer()

W3DVideoBuffer::W3DVideoBuffer ( VideoBuffer::Type format)

Definition at line 104 of file W3DVideoBuffer.cpp.

◆ ~W3DVideoBuffer()

W3DVideoBuffer::~W3DVideoBuffer ( )
virtual

Definition at line 158 of file W3DVideoBuffer.cpp.

Member Function Documentation

◆ allocate()

Bool W3DVideoBuffer::allocate ( UnsignedInt width,
UnsignedInt height )
virtual

Allocates buffer.

Implements VideoBuffer.

Definition at line 117 of file W3DVideoBuffer.cpp.

◆ free()

void W3DVideoBuffer::free ( void )
virtual

Free buffer.

Implements VideoBuffer.

Definition at line 213 of file W3DVideoBuffer.cpp.

◆ lock()

void * W3DVideoBuffer::lock ( void )
virtual

Returns memory pointer to start of buffer.

Implements VideoBuffer.

Definition at line 167 of file W3DVideoBuffer.cpp.

◆ texture()

TextureClass * W3DVideoBuffer::texture ( void )
inline

Returns texture object.

Definition at line 103 of file W3DVideobuffer.h.

◆ TypeToW3DFormat()

WW3DFormat W3DVideoBuffer::TypeToW3DFormat ( VideoBuffer::Type format)
static

Definition at line 233 of file W3DVideoBuffer.cpp.

◆ unlock()

void W3DVideoBuffer::unlock ( void )
virtual

Release buffer.

Implements VideoBuffer.

Definition at line 190 of file W3DVideoBuffer.cpp.

◆ valid()

Bool W3DVideoBuffer::valid ( void )
virtual

Is the buffer valid to use.

Implements VideoBuffer.

Definition at line 204 of file W3DVideoBuffer.cpp.

◆ W3DFormatToType()

VideoBuffer::Type W3DVideoBuffer::W3DFormatToType ( WW3DFormat w3dFormat)
static

Definition at line 262 of file W3DVideoBuffer.cpp.

Member Data Documentation

◆ m_surface

SurfaceClass* W3DVideoBuffer::m_surface
protected

Definition at line 79 of file W3DVideobuffer.h.

◆ m_texture

TextureClass* W3DVideoBuffer::m_texture
protected

Definition at line 78 of file W3DVideobuffer.h.


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