PS2GL
OpenGL*-like API for the PS2
|
Public Member Functions | |
CLinearRenderer (void *packet, int packetSize, CRendererProps caps, CRendererProps reqs, int inQuadsPerVert, int outQuadsPerVert, int inGeomOffset, int inGeomBufSize, const char *name) | |
CLinearRenderer (void *packet, int packetSize, int inQuadsPerVert, int outQuadsPerVert, int inGeomOffset, int inGeomBufSize, const char *name) | |
virtual void | InitContext (GLenum primType, uint32_t rcChanges, bool userRcChanged) |
virtual void | DrawLinearArrays (CGeometryBlock &block) |
Draw arrays of vertices that are accessed linearly (i.e., glDrawArrays) | |
virtual int | GetPacketQwordSize (const CGeometryBlock &geometry) |
virtual CRendererProps | GetRenderContextDeps () |
virtual bool | GetCachePackets (const CGeometryBlock &geometry) |
![]() | |
virtual void | Load () |
Load the renderer into vu0/vu1 memory. | |
virtual const char * | GetName () |
Return a pointer to the text name of this renderer. | |
![]() | |
virtual uint64_t | GetCapabilities () const |
virtual uint64_t | GetRequirements () const |
virtual void | DrawIndexedArrays (CGeometryBlock &block) |
Draw arrays of vertices that are accessed by index (i.e., glDrawElements) | |
Protected Member Functions | |
void | DrawBlock (CVifSCDmaPacket &packet, CGeometryBlock &block, int maxVertsPerBuffer) |
void | FindNumBuffers (int numToAdd, int numVertsToRestart, int numVertsAlreadyInFirstBuffer, int maxVertsPerBuffer, int &numVertsFirstBuffer, int &numVertsLastBuffer, int &numBuffers) |
void | FinishBuffer (CVifSCDmaPacket &packet, int numVertsToBreakStrip, int numVertsInBuffer, int vu1QuadsPerVert, int numStripsInBuffer, unsigned short *stripOffsets) |
void | XferBufferHeader (CVifSCDmaPacket &packet, int numVertsToBreakStrip, int numVerts, int numStripsInBuffer, unsigned short *stripOffsets) |
![]() | |
CBaseRenderer (void *packet, int packetSize, int inQuadsPerVert, int outQuadsPerVert, int inGeomOffset, const char *name) | |
CBaseRenderer (void *packet, int packetSize, CRendererProps caps, CRendererProps reqs, int inQuadsPerVert, int outQuadsPerVert, int inGeomOffset, const char *name) | |
void | SetVifDoubleBuffered (bool db) |
void | GetUnpackAttribs (int numWords, unsigned int &mode, Vifs::tMask &mask) |
void | InitXferBlock (CVifSCDmaPacket &packet, int wordsPerVertex, int wordsPerNormal, int wordsPerTex, int wordsPerColor) |
void | XferBlock (CVifSCDmaPacket &packet, const void *vertices, const void *normals, const void *texCoords, const void *colors, int vu1Offset, int firstElement, int numToAdd) |
void | XferVectors (CVifSCDmaPacket &packet, unsigned int *dataStart, int startOffset, int numVectors, int wordsPerVec, Vifs::tMask unpackMask, uint32_t unpackMode, int vu1MemOffset) |
void | AddVu1RendererContext (CVifSCDmaPacket &packet, GLenum primType, int vu1Offset) |
tGifTag | BuildGiftag (GLenum primType) |
void | CacheRendererState () |
float | GetMaxColorValue (bool texEnabled) |
![]() | |
CRenderer (uint64_t caps, uint64_t reqs) | |
void | SetCapabilities (uint64_t caps) |
void | SetRequirements (uint64_t reqs) |
Protected Attributes | |
int | InputGeomBufSize |
![]() | |
bool | XferVertices |
bool | XferColors |
bool | XferNormals |
bool | XferTexCoords |
bool | VifDoubleBuffered |
float | CurTexCoord [2] |
cpu_vec_xyz | CurNormal |
CDmaPacket * | TexCoordBuf |
CDmaPacket * | NormalBuf |
int | WordsPerVertex |
int | WordsPerNormal |
int | WordsPerTexCoord |
int | WordsPerColor |
unsigned int | VertexUnpackMode |
unsigned int | NormalUnpackMode |
unsigned int | TexCoordUnpackMode |
unsigned int | ColorUnpackMode |
Vifs::tMask | VertexUnpackMask |
Vifs::tMask | NormalUnpackMask |
Vifs::tMask | TexCoordUnpackMask |
Vifs::tMask | ColorUnpackMask |
int | InputQuadsPerVert |
int | OutputQuadsPerVert |
int | InputGeomOffset |
void * | MicrocodePacket |
int | MicrocodePacketSize |
const char * | Name |
![]() | |
uint64_t | Capabilities |
uint64_t | Requirements |
Definition at line 17 of file linear_renderer.h.
|
inline |
Definition at line 41 of file linear_renderer.h.
|
inline |
Definition at line 51 of file linear_renderer.h.
|
protected |
Definition at line 96 of file linear_renderer.cpp.
|
protected |
Definition at line 249 of file linear_renderer.cpp.
|
protected |
Definition at line 231 of file linear_renderer.cpp.
|
protected |
Definition at line 282 of file linear_renderer.cpp.
|
virtual |
called by the geometry manager when the default renderer context has changed, when the user context has changed, or after the renderer has been loaded (and a different renderer was in use). The renderer must record all necessary context at this point (usually by adding it to the vif1 chain) as the rendering context may have changed when it is called to actually render with Draw*Arrays().
primType | the primitive type to render (can be a custom type) |
rcChanges | changed in the rendering context as returned by CGLContext::GetRendererContextChanged(). |
userRcChanged | whether the user (custom) rendering context has changed |
Implements CRenderer.
Definition at line 52 of file linear_renderer.cpp.
|
virtual |
Draw arrays of vertices that are accessed linearly (i.e., glDrawArrays)
Reimplemented from CRenderer.
Definition at line 23 of file linear_renderer.cpp.
References CBaseRenderer::InitXferBlock().
|
virtual |
Estimate the amount of memory, in qwords, the packet to render "geometry" will take. (For display list cacheing.)
Implements CRenderer.
Definition at line 72 of file linear_renderer.cpp.
|
virtual |
What parts of the render context are encoded into packets produced by this renderer? When the packets are cached in display lists, this cached state must remain valid to continue using the cached packet. This method returns a CRendererProps bitmask with '1' set for each property that is cached in the packet. Note that this does not include the render context kept by InitContext(); this will never be cached by ps2gl. The default renderers, for example, do not transfer normals even when specified if lighting is not enabled. The packets they generate therefore depend on whether or not lighting is enabled, so they set the "Lighting" bit.
Implements CRenderer.
Definition at line 79 of file linear_renderer.cpp.
|
virtual |
Can the packets generated by this renderer for the given geometry be cached when called from a display list, or should they be rebuilt each time? (The default renderers, for example, don't cache packets that depend on the current normal when lighting is enabled.)
Implements CRenderer.
Definition at line 90 of file linear_renderer.cpp.
|
protected |
Definition at line 19 of file linear_renderer.h.