ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <zbuffer.h>

Collaboration diagram for TinyGL::FrameBuffer:

List of all members.

Public Member Functions

 FrameBuffer (int xsize, int ysize, const Graphics::PixelBuffer &frame_buffer)
 ~FrameBuffer ()
BuffergenOffscreenBuffer ()
void delOffscreenBuffer (Buffer *buffer)
void clear (int clear_z, int z, int clear_color, int r, int g, int b)
void clearRegion (int x, int y, int w, int h, int clear_z, int z, int clear_color, int r, int g, int b)
bytegetPixelBuffer ()
unsigned int * getZBuffer ()
FORCEINLINE void readPixelRGB (int pixel, byte &r, byte &g, byte &b)
FORCEINLINE bool compareDepth (unsigned int &zSrc, unsigned int &zDst)
FORCEINLINE bool checkAlphaTest (byte aSrc)
template<bool kEnableAlphaTest, bool kBlendingEnabled>
FORCEINLINE void writePixel (int pixel, int value)
template<bool kEnableAlphaTest, bool kBlendingEnabled, bool kDepthWrite>
FORCEINLINE void writePixel (int pixel, int value, unsigned int z)
FORCEINLINE void writePixel (int pixel, int value)
template<bool kEnableAlphaTest>
FORCEINLINE void writePixel (int pixel, int value)
FORCEINLINE void writePixel (int pixel, byte rSrc, byte gSrc, byte bSrc)
FORCEINLINE bool scissorPixel (int x, int y)
FORCEINLINE void writePixel (int pixel, byte aSrc, byte rSrc, byte gSrc, byte bSrc)
template<bool kEnableAlphaTest>
FORCEINLINE void writePixel (int pixel, byte aSrc, byte rSrc, byte gSrc, byte bSrc)
template<bool kEnableAlphaTest, bool kBlendingEnabled>
FORCEINLINE void writePixel (int pixel, byte aSrc, byte rSrc, byte gSrc, byte bSrc)
template<bool kEnableAlphaTest, bool kBlendingEnabled, bool kDepthWrite>
FORCEINLINE void writePixel (int pixel, byte aSrc, byte rSrc, byte gSrc, byte bSrc, unsigned int z)
void copyToBuffer (Graphics::PixelBuffer &buf)
void copyFromBuffer (Graphics::PixelBuffer buf)
void enableBlending (bool enable)
void enableDepthTest (bool enable)
void setBlendingFactors (int sFactor, int dFactor)
void enableAlphaTest (bool enable)
void setAlphaTestFunc (int func, int ref)
void setDepthFunc (int func)
void enableDepthWrite (bool enable)
bool isAlphaBlendingEnabled () const
void blitOffscreenBuffer (Buffer *buffer)
 Blit the buffer to the screen buffer, checking the depth of the pixels.
void selectOffscreenBuffer (Buffer *buffer)
void clearOffscreenBuffer (Buffer *buffer)
void setTexture (const Graphics::PixelBuffer &texture)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawLogic, bool kDepthWrite, bool enableAlphaTest, bool kEnableScissor, bool enableBlending>
void fillTriangle (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode, bool kDepthWrite, bool enableAlphaTest, bool kEnableScissor>
void fillTriangle (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode, bool kDepthWrite, bool enableAlphaTest>
void fillTriangle (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode, bool kDepthWrite>
void fillTriangle (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode>
void fillTriangle (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleTextureMappingPerspectiveSmooth (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleTextureMappingPerspectiveFlat (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleDepthOnly (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleFlat (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleSmooth (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleFlatShadowMask (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void fillTriangleFlatShadow (ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2)
void plot (ZBufferPoint *p)
void fillLine (ZBufferPoint *p1, ZBufferPoint *p2)
void fillLineZ (ZBufferPoint *p1, ZBufferPoint *p2)
void fillLineFlatZ (ZBufferPoint *p1, ZBufferPoint *p2)
void fillLineInterpZ (ZBufferPoint *p1, ZBufferPoint *p2)
void fillLineFlat (ZBufferPoint *p1, ZBufferPoint *p2)
void fillLineInterp (ZBufferPoint *p1, ZBufferPoint *p2)
void setScissorRectangle (const Common::Rect &rect)
void resetScissorRectangle ()
FORCEINLINE bool isBlendingEnabled () const
FORCEINLINE void getBlendingFactors (int &sourceFactor, int &destinationFactor) const
FORCEINLINE bool isAlphaTestEnabled () const
FORCEINLINE bool isDepthWriteEnabled () const
FORCEINLINE int getDepthFunc () const
FORCEINLINE int getDepthWrite () const
FORCEINLINE int getAlphaTestFunc () const
FORCEINLINE int getAlphaTestRefVal () const
FORCEINLINE int getDepthTestEnabled () const

Public Attributes

Common::Rect _clipRectangle
bool _enableScissor
int xsize
int ysize
int linesize
Graphics::PixelFormat cmode
int pixelbytes
Buffer buffer
unsigned char * shadow_mask_buf
int shadow_color_r
int shadow_color_g
int shadow_color_b
int frame_buffer_allocated
unsigned char * dctable
int * ctable
Graphics::PixelBuffer current_texture
int _textureSize
int _textureSizeMask

Private Member Functions

template<bool kDepthWrite>
FORCEINLINE void putPixel (unsigned int pixelOffset, int color, int x, int y, unsigned int z)
template<bool kDepthWrite, bool kEnableScissor>
FORCEINLINE void putPixel (unsigned int pixelOffset, int color, int x, int y, unsigned int z)
template<bool kEnableScissor>
FORCEINLINE void putPixel (unsigned int pixelOffset, int color, int x, int y)
template<bool kInterpRGB, bool kInterpZ, bool kDepthWrite>
void drawLine (const ZBufferPoint *p1, const ZBufferPoint *p2)
template<bool kInterpRGB, bool kInterpZ, bool kDepthWrite, bool kEnableScissor>
void drawLine (const ZBufferPoint *p1, const ZBufferPoint *p2)

Private Attributes

unsigned int * _zbuf
bool _depthWrite
Graphics::PixelBuffer pbuf
bool _blendingEnabled
int _sourceBlendingFactor
int _destinationBlendingFactor
bool _alphaTestEnabled
bool _depthTestEnabled
int _alphaTestFunc
int _alphaTestRefVal
int _depthFunc

Detailed Description

Definition at line 102 of file zbuffer.h.


Constructor & Destructor Documentation

TinyGL::FrameBuffer::FrameBuffer ( int  xsize,
int  ysize,
const Graphics::PixelBuffer frame_buffer 
)

Definition at line 83 of file zbuffer.cpp.

TinyGL::FrameBuffer::~FrameBuffer (  ) 

Definition at line 117 of file zbuffer.cpp.


Member Function Documentation

void TinyGL::FrameBuffer::blitOffscreenBuffer ( Buffer buffer  ) 

Blit the buffer to the screen buffer, checking the depth of the pixels.

Eack pixel is copied if and only if its depth value is bigger than the depth value of the screen pixel, so if it is 'above'.

Definition at line 237 of file zbuffer.cpp.

FORCEINLINE bool TinyGL::FrameBuffer::checkAlphaTest ( byte  aSrc  )  [inline]

Definition at line 160 of file zbuffer.h.

void TinyGL::FrameBuffer::clear ( int  clear_z,
int  z,
int  clear_color,
int  r,
int  g,
int  b 
)

Definition at line 138 of file zbuffer.cpp.

void TinyGL::FrameBuffer::clearOffscreenBuffer ( Buffer buffer  ) 

Definition at line 303 of file zbuffer.cpp.

void TinyGL::FrameBuffer::clearRegion ( int  x,
int  y,
int  w,
int  h,
int  clear_z,
int  z,
int  clear_color,
int  r,
int  g,
int  b 
)

Definition at line 176 of file zbuffer.cpp.

FORCEINLINE bool TinyGL::FrameBuffer::compareDepth ( unsigned int &  zSrc,
unsigned int &  zDst 
) [inline]

Definition at line 123 of file zbuffer.h.

void TinyGL::FrameBuffer::copyFromBuffer ( Graphics::PixelBuffer  buf  )  [inline]

Definition at line 380 of file zbuffer.h.

void TinyGL::FrameBuffer::copyToBuffer ( Graphics::PixelBuffer buf  )  [inline]

Definition at line 376 of file zbuffer.h.

void TinyGL::FrameBuffer::delOffscreenBuffer ( Buffer buffer  ) 

Definition at line 132 of file zbuffer.cpp.

template<bool kInterpRGB, bool kInterpZ, bool kDepthWrite, bool kEnableScissor>
void TinyGL::FrameBuffer::drawLine ( const ZBufferPoint p1,
const ZBufferPoint p2 
) [private]

Definition at line 61 of file zline.cpp.

template<bool kInterpRGB, bool kInterpZ, bool kDepthWrite, bool kEnableScissor>
void TinyGL::FrameBuffer::drawLine ( const ZBufferPoint p1,
const ZBufferPoint p2 
) [private]
void TinyGL::FrameBuffer::enableAlphaTest ( bool  enable  )  [inline]

Definition at line 397 of file zbuffer.h.

void TinyGL::FrameBuffer::enableBlending ( bool  enable  )  [inline]

Definition at line 384 of file zbuffer.h.

void TinyGL::FrameBuffer::enableDepthTest ( bool  enable  )  [inline]

Definition at line 388 of file zbuffer.h.

void TinyGL::FrameBuffer::enableDepthWrite ( bool  enable  )  [inline]

Definition at line 410 of file zbuffer.h.

void TinyGL::FrameBuffer::fillLine ( ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 192 of file zline.cpp.

void TinyGL::FrameBuffer::fillLineFlat ( ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 170 of file zline.cpp.

void TinyGL::FrameBuffer::fillLineFlatZ ( ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 154 of file zline.cpp.

void TinyGL::FrameBuffer::fillLineInterp ( ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 177 of file zline.cpp.

void TinyGL::FrameBuffer::fillLineInterpZ ( ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 162 of file zline.cpp.

void TinyGL::FrameBuffer::fillLineZ ( ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 184 of file zline.cpp.

template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode>
void TinyGL::FrameBuffer::fillTriangle ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 118 of file ztriangle.cpp.

template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode, bool kDepthWrite, bool enableAlphaTest, bool kEnableScissor>
void TinyGL::FrameBuffer::fillTriangle ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode, bool kDepthWrite, bool enableAlphaTest>
void TinyGL::FrameBuffer::fillTriangle ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode, bool kDepthWrite>
void TinyGL::FrameBuffer::fillTriangle ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)
template<bool kInterpRGB, bool kInterpZ, bool kInterpST, bool kInterpSTZ, int kDrawMode>
void TinyGL::FrameBuffer::fillTriangle ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)
void TinyGL::FrameBuffer::fillTriangleDepthOnly ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 669 of file ztriangle.cpp.

void TinyGL::FrameBuffer::fillTriangleFlat ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 680 of file ztriangle.cpp.

void TinyGL::FrameBuffer::fillTriangleFlatShadow ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 736 of file ztriangle.cpp.

void TinyGL::FrameBuffer::fillTriangleFlatShadowMask ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 725 of file ztriangle.cpp.

void TinyGL::FrameBuffer::fillTriangleSmooth ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 692 of file ztriangle.cpp.

void TinyGL::FrameBuffer::fillTriangleTextureMappingPerspectiveFlat ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 714 of file ztriangle.cpp.

void TinyGL::FrameBuffer::fillTriangleTextureMappingPerspectiveSmooth ( ZBufferPoint p0,
ZBufferPoint p1,
ZBufferPoint p2 
)

Definition at line 703 of file ztriangle.cpp.

Buffer * TinyGL::FrameBuffer::genOffscreenBuffer (  ) 

Definition at line 123 of file zbuffer.cpp.

FORCEINLINE int TinyGL::FrameBuffer::getAlphaTestFunc (  )  const [inline]

Definition at line 494 of file zbuffer.h.

FORCEINLINE int TinyGL::FrameBuffer::getAlphaTestRefVal (  )  const [inline]

Definition at line 495 of file zbuffer.h.

FORCEINLINE void TinyGL::FrameBuffer::getBlendingFactors ( int &  sourceFactor,
int &  destinationFactor 
) const [inline]

Definition at line 489 of file zbuffer.h.

FORCEINLINE int TinyGL::FrameBuffer::getDepthFunc (  )  const [inline]

Definition at line 492 of file zbuffer.h.

FORCEINLINE int TinyGL::FrameBuffer::getDepthTestEnabled (  )  const [inline]

Definition at line 496 of file zbuffer.h.

FORCEINLINE int TinyGL::FrameBuffer::getDepthWrite (  )  const [inline]

Definition at line 493 of file zbuffer.h.

byte* TinyGL::FrameBuffer::getPixelBuffer (  )  [inline]

Definition at line 111 of file zbuffer.h.

unsigned int* TinyGL::FrameBuffer::getZBuffer (  )  [inline]

Definition at line 115 of file zbuffer.h.

bool TinyGL::FrameBuffer::isAlphaBlendingEnabled (  )  const [inline]

Definition at line 414 of file zbuffer.h.

FORCEINLINE bool TinyGL::FrameBuffer::isAlphaTestEnabled (  )  const [inline]

Definition at line 490 of file zbuffer.h.

FORCEINLINE bool TinyGL::FrameBuffer::isBlendingEnabled (  )  const [inline]

Definition at line 488 of file zbuffer.h.

FORCEINLINE bool TinyGL::FrameBuffer::isDepthWriteEnabled (  )  const [inline]

Definition at line 491 of file zbuffer.h.

void TinyGL::FrameBuffer::plot ( ZBufferPoint p  ) 

Definition at line 144 of file zline.cpp.

template<bool kDepthWrite, bool kEnableScissor>
FORCEINLINE void TinyGL::FrameBuffer::putPixel ( unsigned int  pixelOffset,
int  color,
int  x,
int  y,
unsigned int  z 
) [private]

Definition at line 34 of file zline.cpp.

template<bool kEnableScissor>
FORCEINLINE void TinyGL::FrameBuffer::putPixel ( unsigned int  pixelOffset,
int  color,
int  x,
int  y 
) [private]

Definition at line 53 of file zline.cpp.

template<bool kDepthWrite, bool kEnableScissor>
FORCEINLINE void TinyGL::FrameBuffer::putPixel ( unsigned int  pixelOffset,
int  color,
int  x,
int  y,
unsigned int  z 
) [private]
FORCEINLINE void TinyGL::FrameBuffer::readPixelRGB ( int  pixel,
byte r,
byte g,
byte b 
) [inline]

Definition at line 119 of file zbuffer.h.

void TinyGL::FrameBuffer::resetScissorRectangle (  )  [inline]

Definition at line 463 of file zbuffer.h.

FORCEINLINE bool TinyGL::FrameBuffer::scissorPixel ( int  x,
int  y 
) [inline]

Definition at line 238 of file zbuffer.h.

void TinyGL::FrameBuffer::selectOffscreenBuffer ( Buffer buffer  ) 

Definition at line 292 of file zbuffer.cpp.

void TinyGL::FrameBuffer::setAlphaTestFunc ( int  func,
int  ref 
) [inline]

Definition at line 401 of file zbuffer.h.

void TinyGL::FrameBuffer::setBlendingFactors ( int  sFactor,
int  dFactor 
) [inline]

Definition at line 392 of file zbuffer.h.

void TinyGL::FrameBuffer::setDepthFunc ( int  func  )  [inline]

Definition at line 406 of file zbuffer.h.

void TinyGL::FrameBuffer::setScissorRectangle ( const Common::Rect rect  )  [inline]

Definition at line 459 of file zbuffer.h.

void TinyGL::FrameBuffer::setTexture ( const Graphics::PixelBuffer texture  ) 

Definition at line 309 of file zbuffer.cpp.

template<bool kEnableAlphaTest, bool kBlendingEnabled>
FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
byte  aSrc,
byte  rSrc,
byte  gSrc,
byte  bSrc 
) [inline]

Definition at line 260 of file zbuffer.h.

FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
byte  aSrc,
byte  rSrc,
byte  gSrc,
byte  bSrc 
) [inline]

Definition at line 242 of file zbuffer.h.

FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
byte  rSrc,
byte  gSrc,
byte  bSrc 
) [inline]

Definition at line 234 of file zbuffer.h.

FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
int  value 
) [inline]

Definition at line 217 of file zbuffer.h.

template<bool kEnableAlphaTest, bool kBlendingEnabled>
FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
int  value 
) [inline]

Definition at line 198 of file zbuffer.h.

template<bool kEnableAlphaTest>
FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
byte  aSrc,
byte  rSrc,
byte  gSrc,
byte  bSrc 
) [inline]

Definition at line 251 of file zbuffer.h.

template<bool kEnableAlphaTest>
FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
int  value 
) [inline]

Definition at line 226 of file zbuffer.h.

template<bool kEnableAlphaTest, bool kBlendingEnabled, bool kDepthWrite>
FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
int  value,
unsigned int  z 
) [inline]

Definition at line 203 of file zbuffer.h.

template<bool kEnableAlphaTest, bool kBlendingEnabled, bool kDepthWrite>
FORCEINLINE void TinyGL::FrameBuffer::writePixel ( int  pixel,
byte  aSrc,
byte  rSrc,
byte  gSrc,
byte  bSrc,
unsigned int  z 
) [inline]

Definition at line 265 of file zbuffer.h.


Member Data Documentation

Definition at line 521 of file zbuffer.h.

Definition at line 523 of file zbuffer.h.

Definition at line 524 of file zbuffer.h.

Definition at line 518 of file zbuffer.h.

Definition at line 525 of file zbuffer.h.

Definition at line 522 of file zbuffer.h.

Definition at line 516 of file zbuffer.h.

Definition at line 520 of file zbuffer.h.

Definition at line 468 of file zbuffer.h.

Definition at line 519 of file zbuffer.h.

Definition at line 485 of file zbuffer.h.

Definition at line 486 of file zbuffer.h.

unsigned int* TinyGL::FrameBuffer::_zbuf [private]

Definition at line 515 of file zbuffer.h.

Definition at line 474 of file zbuffer.h.

Definition at line 483 of file zbuffer.h.

Definition at line 482 of file zbuffer.h.

Definition at line 470 of file zbuffer.h.

Definition at line 517 of file zbuffer.h.

Definition at line 472 of file zbuffer.h.

Definition at line 479 of file zbuffer.h.

Definition at line 478 of file zbuffer.h.

Definition at line 477 of file zbuffer.h.

Definition at line 476 of file zbuffer.h.

Definition at line 469 of file zbuffer.h.

Definition at line 469 of file zbuffer.h.


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


Generated on Sat Jul 20 2019 05:03:37 for ResidualVM by doxygen 1.7.1
curved edge   curved edge