Functions | |
pgl_area_handle_t | pglCreateGsMemArea (int width, int height, unsigned int pix_format) |
Create a memory area. | |
void | pglDestroyGsMemArea (pgl_area_handle_t mem_area) |
Destroy a memory area (free the memory it occupies). | |
void | pglAllocGsMemArea (pgl_area_handle_t mem_area) |
Allocate GS ram by binding to a slot. | |
void | pglFreeGsMemArea (pgl_area_handle_t mem_area) |
Free a memory area. | |
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). | |
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). | |
void | pglUnbindGsMemArea (pgl_area_handle_t mem_area) |
Release the slot bound to this area. | |
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). | |
void | pglUnlockGsMemArea (pgl_area_handle_t mem_area) |
Let the memory manager affect the allocation of this area. | |
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 216 of file gsmemory.cpp. |
|
This is the manual equivalent of pglAllocGsMemArea() (except that the slot does not have to be unlocked).
Definition at line 250 of file gsmemory.cpp. |
|
Create a memory area.
Definition at line 189 of file gsmemory.cpp. |
|
Destroy a memory area (free the memory it occupies).
Definition at line 199 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 227 of file gsmemory.cpp. |
|
Definition at line 298 of file gsmemory.cpp. |
|
Definition at line 289 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 271 of file gsmemory.cpp. |
|
Manually set the starting GS ram word address of this area (mainly for compatibility with existing code).
Definition at line 239 of file gsmemory.cpp. |
|
Release the slot bound to this area.
Definition at line 260 of file gsmemory.cpp. |
|
Let the memory manager affect the allocation of this area.
Definition at line 280 of file gsmemory.cpp. |