created ImageMaskFromImage and LoadTextureMaskFromImage
These functions adds the possibility to retrieve a mask from the alpha channel of an image.
This commit is contained in:
parent
c7bda3d10f
commit
1fc3072275
1 changed files with 128 additions and 13 deletions
|
|
@ -1334,6 +1334,7 @@ RLAPI Image ImageCopy(Image image);
|
|||
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||
RLAPI Image ImageMaskFromImage(Image image, Color color, float threshold); // Create an image mask from an image (alpha channel)
|
||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
|
||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||
|
|
@ -1394,6 +1395,7 @@ RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 posi
|
|||
// NOTE: These functions require GPU access
|
||||
RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM)
|
||||
RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
||||
RLAPI Texture2D LoadTextureMaskFromImage(Image image, Color color, float threshold); // Load texture mask from image data (alpha channel)
|
||||
RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
||||
RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||
RLAPI bool IsTextureReady(Texture2D texture); // Check if a texture is ready
|
||||
|
|
|
|||
Loading…
Reference in a new issue