Classes | |
| struct | GPU_Camera |
| struct | GPU_Target |
Typedefs | |
| typedef struct GPU_Camera | GPU_Camera |
| DECLSPEC GPU_Target *SDLCALL | GPU_CreateAliasTarget (GPU_Target *target) |
| DECLSPEC GPU_Target *SDLCALL | GPU_LoadTarget (GPU_Image *image) |
| DECLSPEC void SDLCALL | GPU_FreeTarget (GPU_Target *target) |
| DECLSPEC void SDLCALL | GPU_SetVirtualResolution (GPU_Target *target, Uint16 w, Uint16 h) |
| DECLSPEC void SDLCALL | GPU_GetVirtualResolution (GPU_Target *target, Uint16 *w, Uint16 *h) |
| DECLSPEC void SDLCALL | GPU_GetVirtualCoords (GPU_Target *target, float *x, float *y, float displayX, float displayY) |
| DECLSPEC void SDLCALL | GPU_UnsetVirtualResolution (GPU_Target *target) |
| DECLSPEC GPU_Rect SDLCALL | GPU_MakeRect (float x, float y, float w, float h) |
| DECLSPEC SDL_Color SDLCALL | GPU_MakeColor (Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
| DECLSPEC void SDLCALL | GPU_SetViewport (GPU_Target *target, GPU_Rect viewport) |
| DECLSPEC void SDLCALL | GPU_UnsetViewport (GPU_Target *target) |
| DECLSPEC GPU_Camera SDLCALL | GPU_GetDefaultCamera (void) |
| DECLSPEC GPU_Camera SDLCALL | GPU_GetCamera (GPU_Target *target) |
| DECLSPEC GPU_Camera SDLCALL | GPU_SetCamera (GPU_Target *target, GPU_Camera *cam) |
| DECLSPEC void SDLCALL | GPU_EnableCamera (GPU_Target *target, GPU_bool use_camera) |
| DECLSPEC GPU_bool SDLCALL | GPU_IsCameraEnabled (GPU_Target *target) |
| DECLSPEC SDL_Color SDLCALL | GPU_GetPixel (GPU_Target *target, Sint16 x, Sint16 y) |
| DECLSPEC GPU_Rect SDLCALL | GPU_SetClipRect (GPU_Target *target, GPU_Rect rect) |
| DECLSPEC GPU_Rect SDLCALL | GPU_SetClip (GPU_Target *target, Sint16 x, Sint16 y, Uint16 w, Uint16 h) |
| DECLSPEC void SDLCALL | GPU_UnsetClip (GPU_Target *target) |
| DECLSPEC GPU_bool SDLCALL | GPU_IntersectRect (GPU_Rect A, GPU_Rect B, GPU_Rect *result) |
| DECLSPEC GPU_bool SDLCALL | GPU_IntersectClipRect (GPU_Target *target, GPU_Rect B, GPU_Rect *result) |
| DECLSPEC void SDLCALL | GPU_SetTargetColor (GPU_Target *target, SDL_Color color) |
| DECLSPEC void SDLCALL | GPU_SetTargetRGB (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b) |
| DECLSPEC void SDLCALL | GPU_SetTargetRGBA (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
| DECLSPEC void SDLCALL | GPU_UnsetTargetColor (GPU_Target *target) |
| typedef struct GPU_Camera GPU_Camera |
Camera object that determines viewing transform.
| DECLSPEC GPU_Target* SDLCALL GPU_CreateAliasTarget | ( | GPU_Target * | target | ) |
Creates a target that aliases the given target. Aliases can be used to store target settings (e.g. viewports) for easy switching. GPU_FreeTarget() frees the alias's memory, but does not affect the original.
| DECLSPEC void SDLCALL GPU_EnableCamera | ( | GPU_Target * | target, |
| GPU_bool | use_camera | ||
| ) |
Enables or disables using the built-in camera matrix transforms.
| DECLSPEC void SDLCALL GPU_FreeTarget | ( | GPU_Target * | target | ) |
Deletes a render target in the proper way for this renderer.
| DECLSPEC GPU_Camera SDLCALL GPU_GetCamera | ( | GPU_Target * | target | ) |
| DECLSPEC GPU_Camera SDLCALL GPU_GetDefaultCamera | ( | void | ) |
| DECLSPEC SDL_Color SDLCALL GPU_GetPixel | ( | GPU_Target * | target, |
| Sint16 | x, | ||
| Sint16 | y | ||
| ) |
| DECLSPEC void SDLCALL GPU_GetVirtualCoords | ( | GPU_Target * | target, |
| float * | x, | ||
| float * | y, | ||
| float | displayX, | ||
| float | displayY | ||
| ) |
Converts screen space coordinates (such as from mouse input) to logical drawing coordinates. This interacts with GPU_SetCoordinateMode() when the y-axis is flipped (screen space is assumed to be inverted: (0,0) in the upper-left corner).
| DECLSPEC void SDLCALL GPU_GetVirtualResolution | ( | GPU_Target * | target, |
| Uint16 * | w, | ||
| Uint16 * | h | ||
| ) |
Query the logical size of the given target.
| DECLSPEC GPU_bool SDLCALL GPU_IntersectClipRect | ( | GPU_Target * | target, |
| GPU_Rect | B, | ||
| GPU_Rect * | result | ||
| ) |
Returns GPU_TRUE if the given target's clip rect and the given B rect overlap, in which case it also fills the given result rect with the intersection. result can be NULL if you don't need the intersection. If the target doesn't have a clip rect enabled, this uses the whole target area.
Returns GPU_TRUE if the given rects A and B overlap, in which case it also fills the given result rect with the intersection. result can be NULL if you don't need the intersection.
| DECLSPEC GPU_bool SDLCALL GPU_IsCameraEnabled | ( | GPU_Target * | target | ) |
Returns 1 if the camera transforms are enabled, 0 otherwise.
| DECLSPEC GPU_Target* SDLCALL GPU_LoadTarget | ( | GPU_Image * | image | ) |
Creates a new render target from the given image. It can then be accessed from image->target.
| DECLSPEC SDL_Color SDLCALL GPU_MakeColor | ( | Uint8 | r, |
| Uint8 | g, | ||
| Uint8 | b, | ||
| Uint8 | a | ||
| ) |
| DECLSPEC GPU_Rect SDLCALL GPU_MakeRect | ( | float | x, |
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
| DECLSPEC GPU_Camera SDLCALL GPU_SetCamera | ( | GPU_Target * | target, |
| GPU_Camera * | cam | ||
| ) |
Sets the current render target's current camera.
| target | A pointer to the target that will copy this camera. |
| cam | A pointer to the camera data to use or NULL to use the default camera. |
| DECLSPEC GPU_Rect SDLCALL GPU_SetClip | ( | GPU_Target * | target, |
| Sint16 | x, | ||
| Sint16 | y, | ||
| Uint16 | w, | ||
| Uint16 | h | ||
| ) |
Sets the clipping rect for the given render target.
| DECLSPEC GPU_Rect SDLCALL GPU_SetClipRect | ( | GPU_Target * | target, |
| GPU_Rect | rect | ||
| ) |
Sets the clipping rect for the given render target.
| DECLSPEC void SDLCALL GPU_SetTargetColor | ( | GPU_Target * | target, |
| SDL_Color | color | ||
| ) |
Sets the modulation color for subsequent drawing of images and shapes on the given target. This has a cumulative effect with the image coloring functions. e.g. GPU_SetRGB(image, 255, 128, 0); GPU_SetTargetRGB(target, 128, 128, 128); Would make the image draw with color of roughly (128, 64, 0).
| DECLSPEC void SDLCALL GPU_SetTargetRGB | ( | GPU_Target * | target, |
| Uint8 | r, | ||
| Uint8 | g, | ||
| Uint8 | b | ||
| ) |
Sets the modulation color for subsequent drawing of images and shapes on the given target. This has a cumulative effect with the image coloring functions. e.g. GPU_SetRGB(image, 255, 128, 0); GPU_SetTargetRGB(target, 128, 128, 128); Would make the image draw with color of roughly (128, 64, 0).
| DECLSPEC void SDLCALL GPU_SetTargetRGBA | ( | GPU_Target * | target, |
| Uint8 | r, | ||
| Uint8 | g, | ||
| Uint8 | b, | ||
| Uint8 | a | ||
| ) |
Sets the modulation color for subsequent drawing of images and shapes on the given target. This has a cumulative effect with the image coloring functions. e.g. GPU_SetRGB(image, 255, 128, 0); GPU_SetTargetRGB(target, 128, 128, 128); Would make the image draw with color of roughly (128, 64, 0).
| DECLSPEC void SDLCALL GPU_SetViewport | ( | GPU_Target * | target, |
| GPU_Rect | viewport | ||
| ) |
Sets the given target's viewport.
| DECLSPEC void SDLCALL GPU_SetVirtualResolution | ( | GPU_Target * | target, |
| Uint16 | w, | ||
| Uint16 | h | ||
| ) |
Change the logical size of the given target. Rendering to this target will be scaled as if the dimensions were actually the ones given.
| DECLSPEC void SDLCALL GPU_UnsetClip | ( | GPU_Target * | target | ) |
Turns off clipping for the given target.
| DECLSPEC void SDLCALL GPU_UnsetTargetColor | ( | GPU_Target * | target | ) |
Unsets the modulation color for subsequent drawing of images and shapes on the given target. This has the same effect as coloring with pure opaque white (255, 255, 255, 255).
| DECLSPEC void SDLCALL GPU_UnsetViewport | ( | GPU_Target * | target | ) |
Resets the given target's viewport to the entire target area.
| DECLSPEC void SDLCALL GPU_UnsetVirtualResolution | ( | GPU_Target * | target | ) |
Reset the logical size of the given target to its original value.
1.8.6