Review releases, removed external dependencies
Not required any more!
This commit is contained in:
parent
230e78a23e
commit
61679a4bbc
29 changed files with 79 additions and 4804 deletions
|
@ -1,23 +1,23 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v1.8.0
|
||||
* raylib v1.9-dev
|
||||
*
|
||||
* A simple and easy-to-use library to learn videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - Written in plain C code (C99) in PascalCase/camelCase notation
|
||||
* - Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi and HTML5
|
||||
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0)
|
||||
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES2 - choose at compile)
|
||||
* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
|
||||
* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF)
|
||||
* - Outstanding texture formats support, including compressed formats (DXT, ETC, PVRT, ASTC)
|
||||
* - Basic 3d support for Geometrics, Models, Billboards, Heightmaps and Cubicmaps
|
||||
* - Powerful fonts module with SpriteFonts support (XNA fonts, AngelCode fonts, TTF)
|
||||
* - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
|
||||
* - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
|
||||
* - Flexible Materials system, supporting classic maps and PBR maps
|
||||
* - Shaders support, including Model shaders and Postprocessing shaders
|
||||
* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath]
|
||||
* - Audio loading and playing with streaming support and mixing channels: [audio]
|
||||
* - VR stereo rendering support with configurable HMD device parameters
|
||||
* - Minimal external dependencies (GLFW3, OpenGL, OpenAL)
|
||||
* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
|
||||
* - Audio loading and playing with streaming support (WAV, OGG, FLAC, XM, MOD)
|
||||
* - Multiple platforms support: Windows, Linux, FreeBSD, MacOS, UWP, Android, Raspberry Pi, HTML5.
|
||||
* - VR stereo rendering with configurable HMD device parameters
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
* - Complete bindings to LUA (raylib-lua) and Go (raylib-go)
|
||||
*
|
||||
* NOTES:
|
||||
|
@ -25,17 +25,17 @@
|
|||
* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl]
|
||||
* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* GLFW3 (www.glfw.org) for window/context management and input [core]
|
||||
* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl]
|
||||
* OpenAL Soft for audio device/context management [audio]
|
||||
* DEPENDENCIES (included):
|
||||
* rglfw (github.com/glfw/glfw) for window/context management and input (only PLATFORM_DESKTOP) [core]
|
||||
* glad (github.com/Dav1dde/glad) for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl]
|
||||
* mini_al (github.com/dr-soft/mini_al) for audio device/context management [audio]
|
||||
*
|
||||
* OPTIONAL DEPENDENCIES:
|
||||
* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures]
|
||||
* OPTIONAL DEPENDENCIES (included):
|
||||
* stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...) [textures]
|
||||
* stb_image_resize (Sean Barret) for image resizing algorythms [textures]
|
||||
* stb_image_write (Sean Barret) for image writting (PNG) [utils]
|
||||
* stb_truetype (Sean Barret) for ttf fonts loading [text]
|
||||
* stb_vorbis (Sean Barret) for ogg audio loading [audio]
|
||||
* stb_vorbis (Sean Barret) for OGG audio loading [audio]
|
||||
* stb_perlin (Sean Barret) for Perlin noise image generation [textures]
|
||||
* par_shapes (Philip Rideout) for parametric 3d shapes generation [models]
|
||||
* jar_xm (Joshua Reisenauer) for XM audio module loading [audio]
|
||||
|
@ -50,7 +50,7 @@
|
|||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software:
|
||||
*
|
||||
* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2018 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -72,20 +72,6 @@
|
|||
#ifndef RAYLIB_H
|
||||
#define RAYLIB_H
|
||||
|
||||
// Choose your platform here or just define it at compile time: -DPLATFORM_DESKTOP
|
||||
//#define PLATFORM_DESKTOP // Windows, Linux or OSX
|
||||
//#define PLATFORM_ANDROID // Android device
|
||||
//#define PLATFORM_RPI // Raspberry Pi
|
||||
//#define PLATFORM_WEB // HTML5 (emscripten, asm.js)
|
||||
|
||||
// Security check in case no PLATFORM_* defined
|
||||
#if !defined(PLATFORM_DESKTOP) && \
|
||||
!defined(PLATFORM_ANDROID) && \
|
||||
!defined(PLATFORM_RPI) && \
|
||||
!defined(PLATFORM_WEB)
|
||||
#define PLATFORM_DESKTOP
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(BUILD_LIBTYPE_SHARED)
|
||||
#define RLAPI __declspec(dllexport) // We are building raylib as a Win32 shared library (.dll)
|
||||
#elif defined(_WIN32) && defined(USE_LIBTYPE_SHARED)
|
||||
|
@ -179,13 +165,11 @@
|
|||
#define KEY_Y 89
|
||||
#define KEY_Z 90
|
||||
|
||||
#if defined(PLATFORM_ANDROID)
|
||||
// Android Physical Buttons
|
||||
#define KEY_BACK 4
|
||||
#define KEY_MENU 82
|
||||
#define KEY_VOLUME_UP 24
|
||||
#define KEY_VOLUME_DOWN 25
|
||||
#endif
|
||||
// Android Physical Buttons
|
||||
#define KEY_BACK 4
|
||||
#define KEY_MENU 82
|
||||
#define KEY_VOLUME_UP 24
|
||||
#define KEY_VOLUME_DOWN 25
|
||||
|
||||
// Mouse Buttons
|
||||
#define MOUSE_LEFT_BUTTON 0
|
||||
|
@ -357,7 +341,7 @@ typedef struct Image {
|
|||
int width; // Image base width
|
||||
int height; // Image base height
|
||||
int mipmaps; // Mipmap levels, 1 by default
|
||||
int format; // Data format (TextureFormat type)
|
||||
int format; // Data format (PixelFormat type)
|
||||
} Image;
|
||||
|
||||
// Texture2D type
|
||||
|
@ -367,7 +351,7 @@ typedef struct Texture2D {
|
|||
int width; // Texture base width
|
||||
int height; // Texture base height
|
||||
int mipmaps; // Mipmap levels, 1 by default
|
||||
int format; // Data format (TextureFormat type)
|
||||
int format; // Data format (PixelFormat type)
|
||||
} Texture2D;
|
||||
|
||||
// RenderTexture2D type, for texture rendering
|
||||
|
@ -486,9 +470,11 @@ typedef struct Wave {
|
|||
|
||||
// Sound source type
|
||||
typedef struct Sound {
|
||||
unsigned int source; // OpenAL audio source id
|
||||
unsigned int buffer; // OpenAL audio buffer id
|
||||
int format; // OpenAL audio format specifier
|
||||
void *audioBuffer; // Pointer to internal data used by the audio system
|
||||
|
||||
unsigned int source; // Audio source id
|
||||
unsigned int buffer; // Audio buffer id
|
||||
int format; // Audio format specifier
|
||||
} Sound;
|
||||
|
||||
// Music type (file streaming from memory)
|
||||
|
@ -502,27 +488,13 @@ typedef struct AudioStream {
|
|||
unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
|
||||
unsigned int channels; // Number of channels (1-mono, 2-stereo)
|
||||
|
||||
int format; // OpenAL audio format specifier
|
||||
unsigned int source; // OpenAL audio source id
|
||||
unsigned int buffers[2]; // OpenAL audio buffers (double buffering)
|
||||
void *audioBuffer; // Pointer to internal data used by the audio system.
|
||||
|
||||
int format; // Audio format specifier
|
||||
unsigned int source; // Audio source id
|
||||
unsigned int buffers[2]; // Audio buffers (double buffering)
|
||||
} AudioStream;
|
||||
|
||||
// rRES data returned when reading a resource,
|
||||
// it contains all required data for user (24 byte)
|
||||
typedef struct RRESData {
|
||||
unsigned int type; // Resource type (4 byte)
|
||||
|
||||
unsigned int param1; // Resouce parameter 1 (4 byte)
|
||||
unsigned int param2; // Resouce parameter 2 (4 byte)
|
||||
unsigned int param3; // Resouce parameter 3 (4 byte)
|
||||
unsigned int param4; // Resouce parameter 4 (4 byte)
|
||||
|
||||
void *data; // Resource data pointer (4 byte)
|
||||
} RRESData;
|
||||
|
||||
// RRES type (pointer to RRESData array)
|
||||
typedef struct RRESData *RRES;
|
||||
|
||||
// Head-Mounted-Display device parameters
|
||||
typedef struct VrDeviceInfo {
|
||||
int hResolution; // HMD horizontal resolution in pixels
|
||||
|
@ -542,11 +514,11 @@ typedef struct VrDeviceInfo {
|
|||
//----------------------------------------------------------------------------------
|
||||
// Trace log type
|
||||
typedef enum {
|
||||
LOG_INFO = 0,
|
||||
LOG_WARNING,
|
||||
LOG_ERROR,
|
||||
LOG_DEBUG,
|
||||
LOG_OTHER
|
||||
LOG_INFO = 1,
|
||||
LOG_WARNING = 2,
|
||||
LOG_ERROR = 4,
|
||||
LOG_DEBUG = 8,
|
||||
LOG_OTHER = 16
|
||||
} LogType;
|
||||
|
||||
// Shader location point type
|
||||
|
@ -599,17 +571,19 @@ typedef enum {
|
|||
#define MAP_DIFFUSE MAP_ALBEDO
|
||||
#define MAP_SPECULAR MAP_METALNESS
|
||||
|
||||
// Texture formats
|
||||
// Pixel formats
|
||||
// NOTE: Support depends on OpenGL version and platform
|
||||
typedef enum {
|
||||
UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
|
||||
UNCOMPRESSED_GRAY_ALPHA, // 16 bpp (2 channels)
|
||||
UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
|
||||
UNCOMPRESSED_R5G6B5, // 16 bpp
|
||||
UNCOMPRESSED_R8G8B8, // 24 bpp
|
||||
UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha)
|
||||
UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha)
|
||||
UNCOMPRESSED_R8G8B8A8, // 32 bpp
|
||||
UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR
|
||||
UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
|
||||
UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
|
||||
UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
|
||||
COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
|
||||
COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
|
||||
COMPRESSED_DXT3_RGBA, // 8 bpp
|
||||
|
@ -621,7 +595,7 @@ typedef enum {
|
|||
COMPRESSED_PVRT_RGBA, // 4 bpp
|
||||
COMPRESSED_ASTC_4x4_RGBA, // 8 bpp
|
||||
COMPRESSED_ASTC_8x8_RGBA // 2 bpp
|
||||
} TextureFormat;
|
||||
} PixelFormat;
|
||||
|
||||
// Texture parameters: filter mode
|
||||
// NOTE 1: Filtering considers mipmaps if available in the texture
|
||||
|
@ -684,18 +658,6 @@ typedef enum {
|
|||
HMD_SONY_PSVR
|
||||
} VrDeviceType;
|
||||
|
||||
// RRESData type
|
||||
typedef enum {
|
||||
RRES_TYPE_RAW = 0,
|
||||
RRES_TYPE_IMAGE,
|
||||
RRES_TYPE_WAVE,
|
||||
RRES_TYPE_VERTEX,
|
||||
RRES_TYPE_TEXT,
|
||||
RRES_TYPE_FONT_IMAGE,
|
||||
RRES_TYPE_FONT_CHARDATA, // CharInfo data array
|
||||
RRES_TYPE_DIRECTORY
|
||||
} RRESDataType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" { // Prevents name mangling of functions
|
||||
#endif
|
||||
|
@ -710,11 +672,7 @@ extern "C" { // Prevents name mangling of functions
|
|||
//------------------------------------------------------------------------------------
|
||||
|
||||
// Window-related functions
|
||||
#if defined(PLATFORM_ANDROID)
|
||||
RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity
|
||||
#elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
|
||||
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
||||
#endif
|
||||
RLAPI void InitWindow(int width, int height, void *data); // Initialize window and OpenGL context
|
||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||
RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
||||
|
@ -727,14 +685,12 @@ RLAPI void SetWindowMinSize(int width, int height); // Set window
|
|||
RLAPI int GetScreenWidth(void); // Get current screen width
|
||||
RLAPI int GetScreenHeight(void); // Get current screen height
|
||||
|
||||
#if !defined(PLATFORM_ANDROID)
|
||||
// Cursor-related functions
|
||||
RLAPI void ShowCursor(void); // Shows cursor
|
||||
RLAPI void HideCursor(void); // Hides cursor
|
||||
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
||||
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
||||
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
|
||||
#endif
|
||||
|
||||
// Drawing-related functions
|
||||
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
||||
|
@ -756,6 +712,7 @@ RLAPI Matrix GetCameraMatrix(Camera camera); // Returns cam
|
|||
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
|
||||
RLAPI int GetFPS(void); // Returns current FPS
|
||||
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
|
||||
RLAPI double GetTime(void); // Returns elapsed time in seconds since InitWindow()
|
||||
|
||||
// Color-related functions
|
||||
RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color
|
||||
|
@ -764,7 +721,7 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
|
|||
RLAPI float *ColorToFloat(Color color); // Converts Color to float array and normalizes
|
||||
|
||||
// Math useful functions (available from raymath.h)
|
||||
RLAPI float *VectorToFloat(Vector3 vec); // Returns Vector3 as float array
|
||||
RLAPI float *Vector3ToFloat(Vector3 vec); // Returns Vector3 as float array
|
||||
RLAPI float *MatrixToFloat(Matrix mat); // Returns Matrix as float array
|
||||
RLAPI Vector3 Vector3Zero(void); // Vector with components value 0.0f
|
||||
RLAPI Vector3 Vector3One(void); // Vector with components value 1.0f
|
||||
|
@ -772,16 +729,18 @@ RLAPI Matrix MatrixIdentity(void); // Returns ide
|
|||
|
||||
// Misc. functions
|
||||
RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags)
|
||||
RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS)
|
||||
RLAPI void SetConfigFlags(unsigned char flags); // Setup window configuration flags (view FLAGS)
|
||||
RLAPI void SetTraceLog(unsigned char types); // Enable trace log message types (bit flags based)
|
||||
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
|
||||
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
|
||||
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
|
||||
|
||||
// Files management functions
|
||||
RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension
|
||||
RLAPI const char *GetExtension(const char *fileName); // Get file extension
|
||||
RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path)
|
||||
RLAPI const char *GetWorkingDirectory(void); // Get current working directory
|
||||
RLAPI const char *GetExtension(const char *fileName); // Get pointer to extension for a filename string
|
||||
RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
|
||||
RLAPI const char *GetDirectoryPath(const char *fileName); // Get full path for a given fileName (uses static string)
|
||||
RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
||||
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success
|
||||
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
||||
RLAPI char **GetDroppedFiles(int *count); // Get dropped files names
|
||||
|
@ -873,14 +832,13 @@ RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color colo
|
|||
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
RLAPI void DrawRectangleT(int posX, int posY, int width, int height, Color color); // Draw rectangle using text character
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline
|
||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||
|
@ -912,19 +870,23 @@ RLAPI void UnloadImage(Image image);
|
|||
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array
|
||||
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
|
||||
RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image
|
||||
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||
RLAPI void SaveImageAs(const char *fileName, Image image); // Save image to a PNG file
|
||||
|
||||
// Image manipulation functions
|
||||
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two)
|
||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
||||
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize and image (bilinear filtering)
|
||||
RLAPI void ImageResizeNN(Image *image,int newWidth,int newHeight); // Resize and image (Nearest-Neighbor scaling algorithm)
|
||||
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||
RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font)
|
||||
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image
|
||||
|
@ -940,6 +902,7 @@ RLAPI void ImageColorContrast(Image *image, float contrast);
|
|||
RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255)
|
||||
|
||||
// Image generation functions
|
||||
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||
RLAPI Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient
|
||||
RLAPI Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient
|
||||
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||
|
@ -1074,11 +1037,12 @@ RLAPI Texture2D GetTextureDefault(void); // Get
|
|||
|
||||
// Shader configuration functions
|
||||
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||
RLAPI void SetShaderValue(Shader shader, int uniformLoc, float *value, int size); // Set shader uniform value (float)
|
||||
RLAPI void SetShaderValuei(Shader shader, int uniformLoc, int *value, int size); // Set shader uniform value (int)
|
||||
RLAPI void SetShaderValue(Shader shader, int uniformLoc, const float *value, int size); // Set shader uniform value (float)
|
||||
RLAPI void SetShaderValuei(Shader shader, int uniformLoc, const int *value, int size); // Set shader uniform value (int)
|
||||
RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4)
|
||||
RLAPI void SetMatrixProjection(Matrix proj); // Set a custom projection matrix (replaces internal projection matrix)
|
||||
RLAPI void SetMatrixModelview(Matrix view); // Set a custom modelview matrix (replaces internal modelview matrix)
|
||||
RLAPI Matrix GetMatrixModelview(); // Get internal modelview matrix
|
||||
|
||||
// Texture maps generation (PBR)
|
||||
// NOTE: Required shaders should be provided
|
||||
|
@ -1094,14 +1058,15 @@ RLAPI void BeginBlendMode(int mode); // Beg
|
|||
RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending)
|
||||
|
||||
// VR control functions
|
||||
VrDeviceInfo GetVrDeviceInfo(int vrDeviceType); // Get VR device information for some standard devices
|
||||
void InitVrSimulator(VrDeviceInfo info); // Init VR simulator for selected device parameters
|
||||
RLAPI void CloseVrSimulator(void); // Close VR simulator for current device
|
||||
RLAPI bool IsVrSimulatorReady(void); // Detect if VR simulator is ready
|
||||
RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera
|
||||
RLAPI void ToggleVrMode(void); // Enable/Disable VR experience
|
||||
RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering
|
||||
RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering
|
||||
RLAPI VrDeviceInfo GetVrDeviceInfo(int vrDeviceType); // Get VR device information for some standard devices
|
||||
RLAPI void InitVrSimulator(VrDeviceInfo info); // Init VR simulator for selected device parameters
|
||||
RLAPI void CloseVrSimulator(void); // Close VR simulator for current device
|
||||
RLAPI bool IsVrSimulatorReady(void); // Detect if VR simulator is ready
|
||||
RLAPI void SetVrDistortionShader(Shader shader); // Set VR distortion shader for stereoscopic rendering
|
||||
RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera
|
||||
RLAPI void ToggleVrMode(void); // Enable/Disable VR experience
|
||||
RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering
|
||||
RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Audio Loading and Playing Functions (Module: audio)
|
||||
|
@ -1146,7 +1111,7 @@ RLAPI void ResumeMusicStream(Music music); // Resume
|
|||
RLAPI bool IsMusicPlaying(Music music); // Check if music is playing
|
||||
RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
|
||||
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
|
||||
RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats)
|
||||
RLAPI void SetMusicLoopCount(Music music, int count); // Set music loop count (loop repeats)
|
||||
RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
|
||||
RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
||||
|
||||
|
@ -1159,7 +1124,10 @@ RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check i
|
|||
RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream
|
||||
RLAPI void PauseAudioStream(AudioStream stream); // Pause audio stream
|
||||
RLAPI void ResumeAudioStream(AudioStream stream); // Resume audio stream
|
||||
RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check if audio stream is playing
|
||||
RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
|
||||
RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
|
||||
RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue