Functions | |
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) |
An area is defined by a width and height (in pixels) and a pixel format. The area can then be given an address in GS ram by the application or be bound to a memory slot (either automatically or by the user) which will set the address in GS ram.
An allocated memory area (one that has an address) can be used as a texture, drawn to, or displayed.
|
Allocate GS ram by binding to a slot. This operation will first find a list of slots which are closest in dimension and pixel format to the memory area in question, then bind either to a free slot or, if none are available, to the least-recently-used slot after first freeing it. Note that this will always succeed. If no suitable, unlocked slots exist the memory manager will panic and fail an assertion. Definition at line 218 of file gsmemory.cpp. |
|
This is the manual equivalent of pglAllocGsMemArea() (except that the slot does not have to be unlocked).
Definition at line 252 of file gsmemory.cpp. |
|
Create a memory area.
Definition at line 191 of file gsmemory.cpp. |
|
Destroy a memory area (free the memory it occupies).
Definition at line 201 of file gsmemory.cpp. |
|
Free a memory area. Note that this does not free any main ram; the user must still call pglDestroyGsMemArea(); Definition at line 229 of file gsmemory.cpp. |
|
Definition at line 301 of file gsmemory.cpp. |
|
Definition at line 292 of file gsmemory.cpp. |
|
Prevent this area from being allocated or freed automatically by the memory manager (it may still be operated on manually).
Definition at line 274 of file gsmemory.cpp. |
|
Manually set the starting GS ram word address of this area (mainly for compatibility with existing code).
Definition at line 241 of file gsmemory.cpp. |
|
Release the slot bound to this area.
Definition at line 263 of file gsmemory.cpp. |
|
Let the memory manager affect the allocation of this area.
Definition at line 283 of file gsmemory.cpp. |