#include "GL/gl.h"
Go to the source code of this file.
Defines | |
#define | PGL_CLIPPING 2 |
#define | PGL_FORCE_IMMEDIATE_STOP 1 |
#define | PGL_DONT_FORCE_IMMEDIATE_STOP 0 |
#define | PGL_NONINTERLACED 0 |
#define | PGL_INTERLACED 1 |
#define | PGL_DONT_MERGE_CONTIGUOUS 0 |
#define | PGL_MERGE_CONTIGUOUS 1 |
#define | PGL_MAX_CUSTOM_RENDERERS 64 |
#define | PGL_MAX_CUSTOM_PRIM_TYPES 32 |
Typedefs | |
typedef long | pgl64_t |
typedef unsigned long | pglU64_t |
typedef unsigned int | pgl_slot_handle_t |
typedef unsigned int | pgl_area_handle_t |
Functions | |
int | pglInit (int immBufferVertexSize, int immDrawBufferQwordSize) |
Initialize the ps2gl library. More... | |
int | pglHasLibraryBeenInitted (void) |
Has pglInit() been called? More... | |
void | pglFinish (void) |
Do any necessary clean up when finished using ps2gl. More... | |
void | pglWaitForVU1 (void) |
Wait for dma transfers to vif1 to end. More... | |
void | pglWaitForVSync (void) |
Wait for the vertical retrace. More... | |
void | pglSwapBuffers (void) |
Signals the end of the current rendering loop and swaps anything double-buffered (display, draw buffers). More... | |
void | pglPrintGsMemAllocation (void) |
prints the current gs memory allocation to stdout. More... | |
int | pglHasGsMemBeenInitted (void) |
returns whether gs memory has been initialized (by adding one or more slots). More... | |
pgl_slot_handle_t | pglAddGsMemSlot (int startingPage, int pageLength, unsigned int pixelMode) |
Adds a memory slot to the list of free slots. More... | |
void | pglLockGsMemSlot (pgl_slot_handle_t slot_handle) |
Prevents a slot from being allocated or freed automatically. More... | |
void | pglUnlockGsMemSlot (pgl_slot_handle_t slot_handle) |
Lets the memory manager automatically allocate/free a slot that was previously locked. More... | |
void | pglRemoveAllGsMemSlots () |
Removes all gs memory slots. More... | |
pgl_area_handle_t | pglCreateGsMemArea (int width, int height, unsigned int pix_format) |
Create a memory area. More... | |
void | pglDestroyGsMemArea (pgl_area_handle_t mem_area) |
Destroy a memory area (free the memory it occupies). More... | |
void | pglAllocGsMemArea (pgl_area_handle_t mem_area) |
Allocate GS ram by binding to a slot. More... | |
void | pglFreeGsMemArea (pgl_area_handle_t mem_area) |
Free a memory area. More... | |
void | pglSetGsMemAreaWordAddr (pgl_area_handle_t mem_area, unsigned int addr) |
Manually set the starting GS ram word address of this area (mainly for compatibility with existing code). More... | |
void | pglBindGsMemAreaToSlot (pgl_area_handle_t mem_area, pgl_slot_handle_t mem_slot) |
This is the manual equivalent of pglAllocGsMemArea() (except that the slot does not have to be unlocked). More... | |
void | pglUnbindGsMemArea (pgl_area_handle_t mem_area) |
Release the slot bound to this area. More... | |
void | pglLockGsMemArea (pgl_area_handle_t mem_area) |
Prevent this area from being allocated or freed automatically by the memory manager (it may still be operated on manually). More... | |
void | pglUnlockGsMemArea (pgl_area_handle_t mem_area) |
Let the memory manager affect the allocation of this area. More... | |
int | pglGsMemAreaIsAllocated (pgl_area_handle_t mem_area) |
unsigned int | pglGetGsMemAreaWordAddr (pgl_area_handle_t mem_area) |
void | pglSetDisplayBuffers (int interlaced, pgl_area_handle_t frame0_mem, pgl_area_handle_t frame1_mem) |
Tell ps2gl what areas in GS ram to display. More... | |
void | pglSetDrawBuffers (int interlaced, pgl_area_handle_t frame0_mem, pgl_area_handle_t frame1_mem, pgl_area_handle_t depth_mem) |
Set the area(s) in gs mem to draw. More... | |
void | pglTextureFromGsMemArea (pgl_area_handle_t tex_area_handle) |
Texture from the given memory area. More... | |
void | pglBindTextureToSlot (GLuint texId, pgl_slot_handle_t mem_slot) |
Bind the named GL texture object to the given GS memory slot. More... | |
void | pglFreeTexture (GLuint texId) |
Free the named GL texture object. More... | |
void | pglNormalPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) |
Specify a normal pointer with either 3 or 4 elements. More... | |
void | pglDrawIndexedArrays (GLenum primType, int numIndices, const unsigned char *indices, int numVertices) |
void | pglBeginImmediateGeometry (void) |
void | pglEndImmediateGeometry (void) |
void | pglRenderImmediateGeometry (void) |
void | pglFinishRenderingImmediateGeometry (int forceImmediateStop) |
void | pglBeginGeometry (void) |
void | pglEndGeometry (void) |
void | pglRenderGeometry (void) |
void | pglFinishRenderingGeometry (int forceImmediateStop) |
void | pglSetRenderingFinishedCallback (void(*cb)(void)) |
Set a function to be called back when rendering finishes. More... | |
void | pglEnable (GLenum cap) |
void | pglDisable (GLenum cap) |
void | pglSetInterlacingOffset (float yPixels) |
const char * | pglGetCurRendererName () |
Returns the name (string) of the current renderer. More... | |
void | pglBeginRendererDefs () |
Call this before registering any renderers. More... | |
void | pglRegisterRenderer (void *renderer) |
Register a custom renderer. More... | |
void | pglEndRendererDefs () |
Call this after registering custom renderers. More... | |
void | pglRegisterCustomPrimType (GLenum primType, pglU64_t requirements, pglU64_t rendererReqMask, int mergeContiguous) |
Register a new primitive. More... | |
void | pglEnableCustom (pglU64_t flag) |
Enable a custom attribute/state change. More... | |
void | pglDisableCustom (pglU64_t flag) |
Disable a custom attribute/state change. More... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 670 of file glcontext.cpp. |
|
Definition at line 645 of file glcontext.cpp. |
|
Call this before registering any renderers.
Definition at line 736 of file renderermanager.cpp. |
|
Bind the named GL texture object to the given GS memory slot. This functions allows the application to bypass the GS memory manager. Definition at line 753 of file texture.cpp. |
|
Definition at line 707 of file glcontext.cpp. |
|
Disable a custom attribute/state change. Call this to disable the corresponding bit(s) in the renderer requirements bitfield. The lower 32 bits should be zero.
Definition at line 422 of file gmanager.cpp. |
|
Definition at line 354 of file gmanager.cpp. |
|
Definition at line 695 of file glcontext.cpp. |
|
Enable a custom attribute/state change. Call this to enable the corresponding bit(s) in the renderer requirements bitfield (see above). The lower 32 bits should be zero.
Definition at line 409 of file gmanager.cpp. |
|
Definition at line 675 of file glcontext.cpp. |
|
Definition at line 650 of file glcontext.cpp. |
|
Call this after registering custom renderers.
Definition at line 759 of file renderermanager.cpp. |
|
Do any necessary clean up when finished using ps2gl.
Definition at line 545 of file glcontext.cpp. |
|
Definition at line 685 of file glcontext.cpp. Referenced by glutMainLoop().
|
|
Definition at line 660 of file glcontext.cpp. |
|
Free the named GL texture object. Note that this only frees any GS ram the texture is using, not main ram. Definition at line 740 of file texture.cpp. |
|
Returns the name (string) of the current renderer. You'll need to call glFlush() to be sure that the renderer is in in sync. Probably doesn't make much sense to call this inside of a glBegin/glEnd pair.
Definition at line 771 of file renderermanager.cpp. |
|
Has pglInit() been called?
Definition at line 536 of file glcontext.cpp. |
|
Initialize the ps2gl library. You must call this before any other pgl* or gl* functions! (When using glut, it will be called in glutInit() if the ps2gl library was not initialized by the app previously.) Also, the application is now responsible for resetting the machine, including the display mode (putting the gs into the right output state, i.e., resolution and interlaced), usually this just means calling sceGsResetGraph.
Definition at line 523 of file glcontext.cpp. Referenced by glutInit(), and pglU64_t().
|
|
Specify a normal pointer with either 3 or 4 elements. If 4-element normals are specified, the last element (w) will be ignored. Definition at line 337 of file gmanager.cpp. Referenced by glNormalPointer().
|
|
Register a new primitive. After registering a primitive with this call it can be used anywhere a normal primitive can be used (glBegin, glDrawArrays, etc.). Defining a new primitive usually implies writing a renderer to go along with it.
Definition at line 395 of file gmanager.cpp. |
|
Register a custom renderer. The maximum number of custom renderers is indicated by PGL_MAX_CUSTOM_RENDERERS.
Definition at line 749 of file renderermanager.cpp. |
|
Definition at line 680 of file glcontext.cpp. |
|
Definition at line 655 of file glcontext.cpp. |
|
Tell ps2gl what areas in GS ram to display.
Definition at line 107 of file displaycontext.cpp. |
|
Set the area(s) in gs mem to draw. If two frame buffers are given they will be used as double buffers.
Definition at line 724 of file drawcontext.cpp. |
|
Definition at line 735 of file drawcontext.cpp. |
|
Set a function to be called back when rendering finishes. This function will be called from the interrupt handler; be careful!
Definition at line 635 of file glcontext.cpp. |
|
Signals the end of the current rendering loop and swaps anything double-buffered (display, draw buffers). Note that this call is required. (Called by glut.) Definition at line 622 of file glcontext.cpp. |
|
Texture from the given memory area. Used in the same context as glTexImage2D(), this call would probably be used with procedural textures. Definition at line 765 of file texture.cpp. |
|
Wait for the vertical retrace. Note that this call is required for the interlacing to work properly. (Called by glut.) Definition at line 610 of file glcontext.cpp. |
|
Wait for dma transfers to vif1 to end. Polls cop0, so it should not slow down the transfer, unlike sceGsSyncPath(). This call is for convenience only -- there is no need to call it if the app can manage on its own. Definition at line 565 of file glcontext.cpp. |