···9898 GPU_BLEND_PUNCHOUT = 10,
9999 GPU_BLEND_CUTOUT = 11,
100100 GPU_BLEND_OVERRIDE = 100 // Lets you specify direct GL calls before blitting. Note: You should call GPU_FlushBlitBuffer() before you change blend modes via OpenGL so the new blend mode doesn't affect SDL_gpu's previously buffered blits.
101101-} GPU_BlendEnum;
101101+} GPU_BlendEnum;
102102+103103+/*! Image format enum
104104+ * \see GPU_CreateImage()
105105+ */
106106+typedef enum {
107107+ GPU_FORMAT_LUMINANCE = 1,
108108+ GPU_FORMAT_LUMINANCE_ALPHA = 2,
109109+ GPU_FORMAT_RGB = 3,
110110+ GPU_FORMAT_RGBA = 4,
111111+ GPU_FORMAT_ALPHA = 5,
112112+ GPU_FORMAT_RG = 6,
113113+ GPU_FORMAT_YCbCr422 = 7,
114114+ GPU_FORMAT_YCbCr420P = 8
115115+} GPU_FormatEnum;
102116103117/*! Image object for containing pixel/texture data.
104118 * A GPU_Image can be created with GPU_CreateImage(), GPU_LoadImage(), GPU_CopyImage(), or GPU_CopyImageFromSurface().
···113127{
114128 struct GPU_Renderer* renderer;
115129 GPU_Target* target;
116116- Uint16 w, h;
130130+ Uint16 w, h;
131131+ GPU_FormatEnum format;
117132 int channels;
118133 Uint32 texture_w, texture_h; // Underlying texture dimensions
119134 Uint8 has_mipmaps;
···466481 GPU_Camera (*SetCamera)(GPU_Renderer* renderer, GPU_Target* target, GPU_Camera* cam);
467482468483 /*! \see GPU_CreateImage() */
469469- GPU_Image* (*CreateImage)(GPU_Renderer* renderer, Uint16 w, Uint16 h, Uint8 channels);
484484+ GPU_Image* (*CreateImage)(GPU_Renderer* renderer, Uint16 w, Uint16 h, GPU_FormatEnum format);
470485471486 /*! \see GPU_LoadImage() */
472487 GPU_Image* (*LoadImage)(GPU_Renderer* renderer, const char* filename);
···1009102410101025// Image controls
1011102610121012-/*! Create a new, blank image with a format determined by the number of channels requested. Don't forget to GPU_FreeImage() it.
10271027+/*! Create a new, blank image with the given format. Don't forget to GPU_FreeImage() it.
10131028 * \param w Image width in pixels
10141029 * \param h Image height in pixels
10151015- * \param channels Number of color channels. Usually in the range of [1,4] with 3 being RGB and 4 being RGBA.
10301030+ * \param format Format of color channels.
10161031 */
10171017-GPU_Image* GPU_CreateImage(Uint16 w, Uint16 h, Uint8 channels);
10321032+GPU_Image* GPU_CreateImage(Uint16 w, Uint16 h, GPU_FormatEnum format);
1018103310191034/*! Load image from an image file that is supported by this renderer. Don't forget to GPU_FreeImage() it. */
10201035GPU_Image* GPU_LoadImage(const char* filename);