GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
A SDL surface to GFXprim pixmap conversion. More...
Go to the source code of this file.
Functions | |
static int | gp_pixmap_from_sdl_surface (gp_pixmap *pixmap, const SDL_Surface *surf) |
A SDL surface to GFXprim pixmap conversion. | |
A SDL surface to GFXprim pixmap conversion.
Definition in file gp_sdl_pixmap.h.
|
inlinestatic |
A SDL surface to GFXprim pixmap conversion.
This function lets you use GFXprim together with SDL. All you need to do is to initialize pixmap from surface. The usage is as follows:
Now you have initialized pixmap that shares the pixel buffer with the SDL surface.
TODO: Make use of the SDL_GetGammaRamp()?
pixmap | A pointer to a pixmap to be initialized. |
surf | A SDL surface to be mapped into pixmap. |
Definition at line 43 of file gp_sdl_pixmap.h.
References gp_pixmap::bytes_per_row, gp_pixmap::gamma, gp_pixel_rgb_match(), GP_WARN, gp_pixmap::h, gp_pixmap::pixel_type, gp_pixmap::pixels, and gp_pixmap::w.