WIP raylib binding update
This commit is contained in:
parent
89e0058bb4
commit
5a8a6feee6
2
raylib
2
raylib
@ -1 +1 @@
|
||||
Subproject commit 0f5aab3a1ca2ffaae6c6e784d485007d7d6e7182
|
||||
Subproject commit 9569d6a802a2230c92503456d544a5470a59d5cf
|
311
src/raylib.lua
311
src/raylib.lua
@ -104,7 +104,7 @@ ffi.cdef [[
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
int type;
|
||||
int layout;
|
||||
} NPatchInfo;
|
||||
|
||||
typedef struct CharInfo {
|
||||
@ -130,7 +130,7 @@ ffi.cdef [[
|
||||
Vector3 target;
|
||||
Vector3 up;
|
||||
float fovy;
|
||||
int type;
|
||||
int projection;
|
||||
} Camera3D;
|
||||
|
||||
typedef Camera3D Camera;
|
||||
@ -173,7 +173,7 @@ ffi.cdef [[
|
||||
typedef struct Material {
|
||||
Shader shader;
|
||||
MaterialMap *maps;
|
||||
float *params;
|
||||
float params[4];
|
||||
} Material;
|
||||
|
||||
typedef struct Transform {
|
||||
@ -270,6 +270,15 @@ ffi.cdef [[
|
||||
float chromaAbCorrection[4];
|
||||
} VrDeviceInfo;
|
||||
|
||||
typedef struct VrStereoConfig {
|
||||
float leftLensCenter[2];
|
||||
float rightLensCenter[2];
|
||||
float leftScreenCenter[2];
|
||||
float rightScreenCenter[2];
|
||||
float scale[2];
|
||||
float scaleIn[2];
|
||||
} VrStereoConfig;
|
||||
|
||||
typedef enum {
|
||||
FLAG_VSYNC_HINT = 0x00000040,
|
||||
FLAG_FULLSCREEN_MODE = 0x00000002,
|
||||
@ -285,7 +294,7 @@ ffi.cdef [[
|
||||
FLAG_WINDOW_HIGHDPI = 0x00002000,
|
||||
FLAG_MSAA_4X_HINT = 0x00000020,
|
||||
FLAG_INTERLACED_HINT = 0x00010000
|
||||
} ConfigFlag;
|
||||
} ConfigFlags;
|
||||
|
||||
typedef enum {
|
||||
LOG_ALL = 0,
|
||||
@ -296,9 +305,10 @@ ffi.cdef [[
|
||||
LOG_ERROR,
|
||||
LOG_FATAL,
|
||||
LOG_NONE
|
||||
} TraceLogType;
|
||||
} TraceLogLevel;
|
||||
|
||||
typedef enum {
|
||||
KEY_NULL = 0,
|
||||
KEY_APOSTROPHE = 39,
|
||||
KEY_COMMA = 44,
|
||||
KEY_MINUS = 45,
|
||||
@ -403,15 +413,13 @@ ffi.cdef [[
|
||||
KEY_KP_SUBTRACT = 333,
|
||||
KEY_KP_ADD = 334,
|
||||
KEY_KP_ENTER = 335,
|
||||
KEY_KP_EQUAL = 336
|
||||
} KeyboardKey;
|
||||
|
||||
typedef enum {
|
||||
KEY_KP_EQUAL = 336,
|
||||
/* Android key buttons */
|
||||
KEY_BACK = 4,
|
||||
KEY_MENU = 82,
|
||||
KEY_VOLUME_UP = 24,
|
||||
KEY_VOLUME_DOWN = 25
|
||||
} AndroidButton;
|
||||
} KeyboardKey;
|
||||
|
||||
typedef enum {
|
||||
MOUSE_LEFT_BUTTON = 0,
|
||||
@ -433,13 +441,6 @@ ffi.cdef [[
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10
|
||||
} MouseCursor;
|
||||
|
||||
typedef enum {
|
||||
GAMEPAD_PLAYER1 = 0,
|
||||
GAMEPAD_PLAYER2 = 1,
|
||||
GAMEPAD_PLAYER3 = 2,
|
||||
GAMEPAD_PLAYER4 = 3
|
||||
} GamepadNumber;
|
||||
|
||||
typedef enum {
|
||||
GAMEPAD_BUTTON_UNKNOWN = 0,
|
||||
GAMEPAD_BUTTON_LEFT_FACE_UP,
|
||||
@ -472,107 +473,107 @@ ffi.cdef [[
|
||||
} GamepadAxis;
|
||||
|
||||
typedef enum {
|
||||
LOC_VERTEX_POSITION = 0,
|
||||
LOC_VERTEX_TEXCOORD01,
|
||||
LOC_VERTEX_TEXCOORD02,
|
||||
LOC_VERTEX_NORMAL,
|
||||
LOC_VERTEX_TANGENT,
|
||||
LOC_VERTEX_COLOR,
|
||||
LOC_MATRIX_MVP,
|
||||
LOC_MATRIX_MODEL,
|
||||
LOC_MATRIX_VIEW,
|
||||
LOC_MATRIX_PROJECTION,
|
||||
LOC_VECTOR_VIEW,
|
||||
LOC_COLOR_DIFFUSE,
|
||||
LOC_COLOR_SPECULAR,
|
||||
LOC_COLOR_AMBIENT,
|
||||
LOC_MAP_ALBEDO,
|
||||
LOC_MAP_METALNESS,
|
||||
LOC_MAP_NORMAL,
|
||||
LOC_MAP_ROUGHNESS,
|
||||
LOC_MAP_OCCLUSION,
|
||||
LOC_MAP_EMISSION,
|
||||
LOC_MAP_HEIGHT,
|
||||
LOC_MAP_CUBEMAP,
|
||||
LOC_MAP_IRRADIANCE,
|
||||
LOC_MAP_PREFILTER,
|
||||
LOC_MAP_BRDF
|
||||
SHADER_LOC_VERTEX_POSITION = 0,
|
||||
SHADER_LOC_VERTEX_TEXCOORD01,
|
||||
SHADER_LOC_VERTEX_TEXCOORD02,
|
||||
SHADER_LOC_VERTEX_NORMAL,
|
||||
SHADER_LOC_VERTEX_TANGENT,
|
||||
SHADER_LOC_VERTEX_COLOR,
|
||||
SHADER_LOC_MATRIX_MVP,
|
||||
SHADER_LOC_MATRIX_MODEL,
|
||||
SHADER_LOC_MATRIX_VIEW,
|
||||
SHADER_LOC_MATRIX_PROJECTION,
|
||||
SHADER_LOC_VECTOR_VIEW,
|
||||
SHADER_LOC_COLOR_DIFFUSE,
|
||||
SHADER_LOC_COLOR_SPECULAR,
|
||||
SHADER_LOC_COLOR_AMBIENT,
|
||||
SHADER_LOC_MAP_ALBEDO,
|
||||
SHADER_LOC_MAP_METALNESS,
|
||||
SHADER_LOC_MAP_NORMAL,
|
||||
SHADER_LOC_MAP_ROUGHNESS,
|
||||
SHADER_LOC_MAP_OCCLUSION,
|
||||
SHADER_LOC_MAP_EMISSION,
|
||||
SHADER_LOC_MAP_HEIGHT,
|
||||
SHADER_LOC_MAP_CUBEMAP,
|
||||
SHADER_LOC_MAP_IRRADIANCE,
|
||||
SHADER_LOC_MAP_PREFILTER,
|
||||
SHADER_LOC_MAP_BRDF
|
||||
} ShaderLocationIndex;
|
||||
|
||||
typedef enum {
|
||||
UNIFORM_FLOAT = 0,
|
||||
UNIFORM_VEC2,
|
||||
UNIFORM_VEC3,
|
||||
UNIFORM_VEC4,
|
||||
UNIFORM_INT,
|
||||
UNIFORM_IVEC2,
|
||||
UNIFORM_IVEC3,
|
||||
UNIFORM_IVEC4,
|
||||
UNIFORM_SAMPLER2D
|
||||
SHADER_UNIFORM_FLOAT = 0,
|
||||
SHADER_UNIFORM_VEC2,
|
||||
SHADER_UNIFORM_VEC3,
|
||||
SHADER_UNIFORM_VEC4,
|
||||
SHADER_UNIFORM_INT,
|
||||
SHADER_UNIFORM_IVEC2,
|
||||
SHADER_UNIFORM_IVEC3,
|
||||
SHADER_UNIFORM_IVEC4,
|
||||
SHADER_UNIFORM_SAMPLER2D
|
||||
} ShaderUniformDataType;
|
||||
|
||||
typedef enum {
|
||||
MAP_ALBEDO = 0,
|
||||
MAP_METALNESS = 1,
|
||||
MAP_NORMAL = 2,
|
||||
MAP_ROUGHNESS = 3,
|
||||
MAP_OCCLUSION,
|
||||
MAP_EMISSION,
|
||||
MAP_HEIGHT,
|
||||
MAP_CUBEMAP,
|
||||
MAP_IRRADIANCE,
|
||||
MAP_PREFILTER,
|
||||
MAP_BRDF
|
||||
} MaterialMapType;
|
||||
MATERIAL_MAP_ALBEDO = 0,
|
||||
MATERIAL_MAP_METALNESS = 1,
|
||||
MATERIAL_MAP_NORMAL = 2,
|
||||
MATERIAL_MAP_ROUGHNESS = 3,
|
||||
MATERIAL_MAP_OCCLUSION,
|
||||
MATERIAL_MAP_EMISSION,
|
||||
MATERIAL_MAP_HEIGHT,
|
||||
MATERIAL_MAP_BRDG,
|
||||
MATERIAL_MAP_CUBEMAP,
|
||||
MATERIAL_MAP_IRRADIANCE,
|
||||
MATERIAL_MAP_PREFILTER
|
||||
} MaterialMapIndex;
|
||||
|
||||
typedef enum {
|
||||
UNCOMPRESSED_GRAYSCALE = 1,
|
||||
UNCOMPRESSED_GRAY_ALPHA,
|
||||
UNCOMPRESSED_R5G6B5,
|
||||
UNCOMPRESSED_R8G8B8,
|
||||
UNCOMPRESSED_R5G5B5A1,
|
||||
UNCOMPRESSED_R4G4B4A4,
|
||||
UNCOMPRESSED_R8G8B8A8,
|
||||
UNCOMPRESSED_R32,
|
||||
UNCOMPRESSED_R32G32B32,
|
||||
UNCOMPRESSED_R32G32B32A32,
|
||||
COMPRESSED_DXT1_RGB,
|
||||
COMPRESSED_DXT1_RGBA,
|
||||
COMPRESSED_DXT3_RGBA,
|
||||
COMPRESSED_DXT5_RGBA,
|
||||
COMPRESSED_ETC1_RGB,
|
||||
COMPRESSED_ETC2_RGB,
|
||||
COMPRESSED_ETC2_EAC_RGBA,
|
||||
COMPRESSED_PVRT_RGB,
|
||||
COMPRESSED_PVRT_RGBA,
|
||||
COMPRESSED_ASTC_4x4_RGBA,
|
||||
COMPRESSED_ASTC_8x8_RGBA
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G6B5,
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8,
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1,
|
||||
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4,
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8,
|
||||
PIXELFORMAT_UNCOMPRESSED_R32,
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32,
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32,
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGB,
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGBA,
|
||||
PIXELFORMAT_COMPRESSED_DXT3_RGBA,
|
||||
PIXELFORMAT_COMPRESSED_DXT5_RGBA,
|
||||
PIXELFORMAT_COMPRESSED_ETC1_RGB,
|
||||
PIXELFORMAT_COMPRESSED_ETC2_RGB,
|
||||
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA,
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGB,
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGBA,
|
||||
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA,
|
||||
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA
|
||||
} PixelFormat;
|
||||
|
||||
typedef enum {
|
||||
FILTER_POINT = 0,
|
||||
FILTER_BILINEAR,
|
||||
FILTER_TRILINEAR,
|
||||
FILTER_ANISOTROPIC_4X,
|
||||
FILTER_ANISOTROPIC_8X,
|
||||
FILTER_ANISOTROPIC_16X,
|
||||
} TextureFilterMode;
|
||||
TEXTURE_FILTER_POINT = 0,
|
||||
TEXTURE_FILTER_BILINEAR,
|
||||
TEXTURE_FILTER_TRILINEAR,
|
||||
TEXTURE_FILTER_ANISOTROPIC_4X,
|
||||
TEXTURE_FILTER_ANISOTROPIC_8X,
|
||||
TEXTURE_FILTER_ANISOTROPIC_16X,
|
||||
} TextureFilter;
|
||||
|
||||
typedef enum {
|
||||
WRAP_REPEAT = 0,
|
||||
WRAP_CLAMP,
|
||||
WRAP_MIRROR_REPEAT,
|
||||
WRAP_MIRROR_CLAMP
|
||||
TEXTURE_WRAP_REPEAT = 0,
|
||||
TEXTURE_WRAP_CLAMP,
|
||||
TEXTURE_WRAP_MIRROR_REPEAT,
|
||||
TEXTURE_WRAP_MIRROR_CLAMP
|
||||
} TextureWrapMode;
|
||||
|
||||
typedef enum {
|
||||
CUBEMAP_AUTO_DETECT = 0,
|
||||
CUBEMAP_LINE_VERTICAL,
|
||||
CUBEMAP_LINE_HORIZONTAL,
|
||||
CUBEMAP_CROSS_THREE_BY_FOUR,
|
||||
CUBEMAP_CROSS_FOUR_BY_THREE,
|
||||
CUBEMAP_PANORAMA
|
||||
} CubemapLayoutType;
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0,
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL,
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL,
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR,
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE,
|
||||
CUBEMAP_LAYOUT_PANORAMA
|
||||
} CubemapLayout;
|
||||
|
||||
typedef enum {
|
||||
FONT_DEFAULT = 0,
|
||||
@ -601,7 +602,7 @@ ffi.cdef [[
|
||||
GESTURE_SWIPE_DOWN = 128,
|
||||
GESTURE_PINCH_IN = 256,
|
||||
GESTURE_PINCH_OUT = 512
|
||||
} GestureType;
|
||||
} Gestures;
|
||||
|
||||
typedef enum {
|
||||
CAMERA_CUSTOM = 0,
|
||||
@ -614,15 +615,15 @@ ffi.cdef [[
|
||||
typedef enum {
|
||||
CAMERA_PERSPECTIVE = 0,
|
||||
CAMERA_ORTHOGRAPHIC
|
||||
} CameraType;
|
||||
} CameraProjection;
|
||||
|
||||
typedef enum {
|
||||
NPT_9PATCH = 0,
|
||||
NPT_3PATCH_VERTICAL,
|
||||
NPT_3PATCH_HORIZONTAL
|
||||
} NPatchType;
|
||||
NPATCH_NINE_PATCH = 0,
|
||||
NPATCH_THREE_PATCH_VERTICAL,
|
||||
NPATCH_THREE_PATCH_HORIZONTAL
|
||||
} NPatchLayout;
|
||||
|
||||
typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
|
||||
typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args);
|
||||
typedef void *(*MemAllocCallback)(int size);
|
||||
typedef void *(*MemReallocCallback)(int size);
|
||||
typedef void (*MemFreeCallback)(void *ptr);
|
||||
@ -661,6 +662,90 @@ ffi.cdef [[
|
||||
RL_ATTACHMENT_TEXTURE2D = 100,
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200,
|
||||
} FramebufferTexType;
|
||||
|
||||
/* NOTE: Assumes non-ES OpenGL. */
|
||||
typedef struct VertexBuffer {
|
||||
int elementsCount;
|
||||
|
||||
int vCounter;
|
||||
int tcCounter;
|
||||
int cCounter;
|
||||
|
||||
float *vertices;
|
||||
float *texcoords;
|
||||
unsigned char *colors;
|
||||
unsigned int *indices;
|
||||
|
||||
unsigned int vaoId;
|
||||
unsigned int vboId[4];
|
||||
} VertexBuffer;
|
||||
|
||||
typedef struct DrawCall {
|
||||
int mode;
|
||||
int vertexCount;
|
||||
int vertexAlignment;
|
||||
//unsigned int vaoId;
|
||||
//unsigned int shaderId;
|
||||
unsigned int textureId;
|
||||
|
||||
//Matrix projection;
|
||||
//Matrix modelview;
|
||||
} DrawCall;
|
||||
|
||||
typedef struct RenderBatch {
|
||||
int buffersCount;
|
||||
int currentBuffer;
|
||||
VertexBuffer *vertexBuffer;
|
||||
|
||||
DrawCall *draws;
|
||||
int drawsCounter;
|
||||
float currentDepth;
|
||||
} RenderBatch;
|
||||
|
||||
typedef enum {
|
||||
SHADER_ATTRIB_FLOAT = 0,
|
||||
SHADER_ATTRIB_VEC2,
|
||||
SHADER_ATTRIB_VEC3,
|
||||
SHADER_ATTRIB_VEC4
|
||||
} ShaderAttributeDataType;
|
||||
|
||||
typedef struct VertexBuffer {
|
||||
int elementsCount;
|
||||
|
||||
int vCounter;
|
||||
int tcCounter;
|
||||
int cCounter;
|
||||
|
||||
float *vertices;
|
||||
float *texcoords;
|
||||
unsigned char *colors;
|
||||
unsigned int *indices;
|
||||
|
||||
unsigned int vaoId;
|
||||
unsigned int vboId[4];
|
||||
} VertexBuffer;
|
||||
|
||||
typedef struct DrawCall {
|
||||
int mode;
|
||||
int vertexCount;
|
||||
int vertexAlignment;
|
||||
//unsigned int vaoId;
|
||||
//unsigned int shaderId;
|
||||
unsigned int textureId;
|
||||
|
||||
//Matrix projection;
|
||||
//Matrix modelview;
|
||||
} DrawCall;
|
||||
|
||||
typedef struct RenderBatch {
|
||||
int buffersCount;
|
||||
int currentBuffer;
|
||||
VertexBuffer *vertexBuffer;
|
||||
|
||||
DrawCall *draws;
|
||||
int drawsCounter;
|
||||
float currentDepth;
|
||||
} RenderBatch;
|
||||
]]
|
||||
|
||||
-- Physac cdef
|
||||
@ -941,10 +1026,10 @@ rl.BLANK = new_color(0, 0, 0, 0)
|
||||
rl.MAGENTA = new_color(255, 0, 255, 255)
|
||||
rl.RAYWHITE = new_color(245, 245, 245, 255)
|
||||
|
||||
rl.LOC_MAP_DIFFUSE = C.LOC_MAP_ALBEDO
|
||||
rl.LOC_MAP_SPECULAR = C.LOC_MAP_METALNESS
|
||||
rl.MAP_DIFFUSE = C.MAP_ALBEDO
|
||||
rl.MAP_SPECULAR = C.MAP_METALNESS
|
||||
rl.SHADER_LOC_MAP_DIFFUSE = C.SHADER_LOC_MAP_ALBEDO
|
||||
rl.SHADER_LOC_MAP_SPECULAR = C.SHADER_LOC_MAP_METALNESS
|
||||
rl.MATERIAL_MAP_DIFFUSE = C.MATERIAL_MAP_ALBEDO
|
||||
rl.MATERIAL_MAP_SPECULAR = C.MATERIAL_MAP_METALNESS
|
||||
|
||||
function rl.ref(obj)
|
||||
return ffi.cast(ffi.typeof("$ *", obj), obj)
|
||||
|
66
tools/api.h
66
tools/api.h
@ -68,8 +68,8 @@ double GetTime(void)
|
||||
int GetRandomValue(int min, int max)
|
||||
void TakeScreenshot(const char *fileName)
|
||||
void SetConfigFlags(unsigned int flags)
|
||||
void TraceLog(int logType, const char *text, ...)
|
||||
void SetTraceLogLevel(int logType)
|
||||
void TraceLog(int logLevel, const char *text, ...)
|
||||
void SetTraceLogLevel(int logLevel)
|
||||
void *MemAlloc(int size)
|
||||
void MemFree(void *ptr)
|
||||
void SetTraceLogCallback(TraceLogCallback callback)
|
||||
@ -134,12 +134,11 @@ void SetMousePosition(int x, int y)
|
||||
void SetMouseOffset(int offsetX, int offsetY)
|
||||
void SetMouseScale(float scaleX, float scaleY)
|
||||
float GetMouseWheelMove(void)
|
||||
int GetMouseCursor(void)
|
||||
void SetMouseCursor(int cursor)
|
||||
int GetTouchX(void)
|
||||
int GetTouchY(void)
|
||||
Vector2 GetTouchPosition(int index)
|
||||
void SetGesturesEnabled(unsigned int gestureFlags)
|
||||
void SetGesturesEnabled(unsigned int flags)
|
||||
bool IsGestureDetected(int gesture)
|
||||
int GetGestureDetected(void)
|
||||
int GetTouchPointsCount(void)
|
||||
@ -163,15 +162,15 @@ void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
||||
void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color)
|
||||
void DrawLineStrip(Vector2 *points, int pointsCount, Color color)
|
||||
void DrawCircle(int centerX, int centerY, float radius, Color color)
|
||||
void DrawCircleSector(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
|
||||
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
|
||||
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2)
|
||||
void DrawCircleV(Vector2 center, float radius, Color color)
|
||||
void DrawCircleLines(int centerX, int centerY, float radius, Color color)
|
||||
void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color)
|
||||
void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color)
|
||||
void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color)
|
||||
void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color)
|
||||
void DrawRectangle(int posX, int posY, int width, int height, Color color)
|
||||
void DrawRectangleV(Vector2 position, Vector2 size, Color color)
|
||||
void DrawRectangleRec(Rectangle rec, Color color)
|
||||
@ -259,7 +258,7 @@ void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSiz
|
||||
void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
||||
Texture2D LoadTexture(const char *fileName)
|
||||
Texture2D LoadTextureFromImage(Image image)
|
||||
TextureCubemap LoadTextureCubemap(Image image, int layoutType)
|
||||
TextureCubemap LoadTextureCubemap(Image image, int layout)
|
||||
RenderTexture2D LoadRenderTexture(int width, int height)
|
||||
void UnloadTexture(Texture2D texture)
|
||||
void UnloadRenderTexture(RenderTexture2D target)
|
||||
@ -268,8 +267,8 @@ void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels)
|
||||
Image GetTextureData(Texture2D texture)
|
||||
Image GetScreenData(void)
|
||||
void GenTextureMipmaps(Texture2D *texture)
|
||||
void SetTextureFilter(Texture2D texture, int filterMode)
|
||||
void SetTextureWrap(Texture2D texture, int wrapMode)
|
||||
void SetTextureFilter(Texture2D texture, int filter)
|
||||
void SetTextureWrap(Texture2D texture, int wrap)
|
||||
void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
|
||||
void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
|
||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
|
||||
@ -277,7 +276,7 @@ void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color
|
||||
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint)
|
||||
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint)
|
||||
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||
void DrawTexturePoly(Texture t, float x, float y, Vector2 *points, Vector2 *tPnts, int numPoints, Color colour)
|
||||
Color Fade(Color color, float alpha)
|
||||
int ColorToInt(Color color)
|
||||
Vector4 ColorNormalize(Color color)
|
||||
@ -346,7 +345,6 @@ void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, fl
|
||||
void DrawPlane(Vector3 centerPos, Vector2 size, Color color)
|
||||
void DrawRay(Ray ray, Color color)
|
||||
void DrawGrid(int slices, float spacing)
|
||||
void DrawGizmo(Vector3 position)
|
||||
Model LoadModel(const char *fileName)
|
||||
Model LoadModelFromMesh(Mesh mesh)
|
||||
void UnloadModel(Model model)
|
||||
@ -363,6 +361,7 @@ void SetModelMeshMaterial(Model *model, int meshId, int materialId)
|
||||
ModelAnimation *LoadModelAnimations(const char *fileName, int *animsCount)
|
||||
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
||||
void UnloadModelAnimation(ModelAnimation anim)
|
||||
void UnloadModelAnimations(ModelAnimation* animations, unsigned int count)
|
||||
bool IsModelAnimationValid(Model model, ModelAnimation anim)
|
||||
Mesh GenMeshPoly(int sides, float radius)
|
||||
Mesh GenMeshPlane(float width, float length, int resX, int resZ)
|
||||
@ -394,40 +393,18 @@ RayHitInfo GetCollisionRayMesh(Ray ray, Mesh mesh, Matrix transform)
|
||||
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
||||
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
||||
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
||||
Shader LoadShader(const char *vsFileName, const char *fsFileName)
|
||||
Shader LoadShaderCode(const char *vsCode, const char *fsCode)
|
||||
void UnloadShader(Shader shader)
|
||||
Shader GetShaderDefault(void)
|
||||
Texture2D GetTextureDefault(void)
|
||||
Texture2D GetShapesTexture(void)
|
||||
Rectangle GetShapesTextureRec(void)
|
||||
void SetShapesTexture(Texture2D texture, Rectangle source)
|
||||
int GetShaderLocation(Shader shader, const char *uniformName)
|
||||
int GetShaderLocationAttrib(Shader shader, const char *attribName)
|
||||
void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType)
|
||||
void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count)
|
||||
void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
|
||||
void SetShaderValueTexture(Shader shader, int uniformLoc, Texture2D texture)
|
||||
void SetMatrixProjection(Matrix proj)
|
||||
void SetMatrixModelview(Matrix view)
|
||||
Matrix GetMatrixModelview(void)
|
||||
Matrix GetMatrixProjection(void)
|
||||
TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size, int format)
|
||||
TextureCubemap GenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size)
|
||||
TextureCubemap GenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size)
|
||||
Texture2D GenTextureBRDF(Shader shader, int size)
|
||||
void BeginShaderMode(Shader shader)
|
||||
void EndShaderMode(void)
|
||||
void BeginBlendMode(int mode)
|
||||
void EndBlendMode(void)
|
||||
void InitVrSimulator(void)
|
||||
void CloseVrSimulator(void)
|
||||
void UpdateVrTracking(Camera *camera)
|
||||
void SetVrConfiguration(VrDeviceInfo info, Shader distortion)
|
||||
bool IsVrSimulatorReady(void)
|
||||
void ToggleVrMode(void)
|
||||
void BeginVrDrawing(void)
|
||||
void EndVrDrawing(void)
|
||||
Shader LoadShader(const char *vsFileName, const char *fsFileName)
|
||||
void UnloadShader(Shader shader)
|
||||
int GetShaderLocation(Shader shader, const char *uniformName)
|
||||
int GetShaderLocationAttrib(Shader shader, const char *attribName)
|
||||
void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType)
|
||||
void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count)
|
||||
void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat)
|
||||
void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
|
||||
void InitAudioDevice(void)
|
||||
void CloseAudioDevice(void)
|
||||
bool IsAudioDeviceReady(void)
|
||||
@ -457,15 +434,16 @@ void WaveCrop(Wave *wave, int initSample, int finalSample)
|
||||
float *LoadWaveSamples(Wave wave)
|
||||
void UnloadWaveSamples(float *samples)
|
||||
Music LoadMusicStream(const char *fileName)
|
||||
Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize)
|
||||
void UnloadMusicStream(Music music)
|
||||
void PlayMusicStream(Music music)
|
||||
void UpdateMusicStream(Music music)
|
||||
void StopMusicStream(Music music)
|
||||
void PauseMusicStream(Music music)
|
||||
void ResumeMusicStream(Music music)
|
||||
bool IsMusicPlaying(Music music)
|
||||
void SetMusicVolume(Music music, float volume)
|
||||
void SetMusicPitch(Music music, float pitch)
|
||||
void SetMusicLooping(Music *music, bool loop)
|
||||
float GetMusicTimeLength(Music music)
|
||||
float GetMusicTimePlayed(Music music)
|
||||
AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels)
|
||||
|
@ -89,7 +89,7 @@ Quaternion QuaternionFromMatrix(Matrix mat)
|
||||
Matrix QuaternionToMatrix(Quaternion q)
|
||||
Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
|
||||
void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle)
|
||||
Quaternion QuaternionFromEuler(float roll, float pitch, float yaw)
|
||||
Quaternion QuaternionFromEuler(float pitch, float yaw, float roll)
|
||||
Vector3 QuaternionToEuler(Quaternion q)
|
||||
Quaternion QuaternionTransform(Quaternion q, Matrix mat)
|
||||
Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view)
|
||||
|
59
tools/rlgl.h
59
tools/rlgl.h
@ -41,19 +41,29 @@ void rlSetLineWidth(float width)
|
||||
float rlGetLineWidth(void)
|
||||
void rlEnableSmoothLines(void)
|
||||
void rlDisableSmoothLines(void)
|
||||
void rlEnableStereoRender(void)
|
||||
void rlDisableStereoRender(void)
|
||||
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||
void rlClearScreenBuffers(void)
|
||||
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
|
||||
unsigned int rlLoadAttribBuffer(unsigned int vaoId, int shaderLoc, void *buffer, int size, bool dynamic)
|
||||
int rlGetVersion(void)
|
||||
void rlCheckErrors(void)
|
||||
void rlSetBlendMode(int mode)
|
||||
void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation)
|
||||
void rlglInit(int width, int height)
|
||||
void rlglClose(void)
|
||||
void rlglDraw(void)
|
||||
void rlCheckErrors(void)
|
||||
void rlLoadExtensions(void* loader)
|
||||
int rlGetVersion(void)
|
||||
bool rlCheckBufferLimit(int vCount)
|
||||
void rlSetDebugMarker(const char *text)
|
||||
void rlSetBlendMode(int glSrcFactor, int glDstFactor, int glEquation)
|
||||
void rlLoadExtensions(void *loader)
|
||||
Shader rlGetShaderDefault(void)
|
||||
Texture2D rlGetTextureDefault(void)
|
||||
Texture2D rlGetShapesTexture(void)
|
||||
Rectangle rlGetShapesTextureRec(void)
|
||||
void rlSetShapesTexture(Texture2D texture, Rectangle source)
|
||||
RenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements)
|
||||
void rlUnloadRenderBatch(RenderBatch batch)
|
||||
void rlDrawRenderBatch(RenderBatch *batch)
|
||||
void rlSetRenderBatchActive(RenderBatch *batch)
|
||||
void rlDrawRenderBatchActive(void)
|
||||
bool rlCheckRenderBatchLimit(int vCount)
|
||||
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
|
||||
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
|
||||
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
||||
@ -64,12 +74,35 @@ void rlGenerateMipmaps(Texture2D *texture)
|
||||
void *rlReadTexturePixels(Texture2D texture)
|
||||
unsigned char *rlReadScreenPixels(int width, int height)
|
||||
unsigned int rlLoadFramebuffer(int width, int height)
|
||||
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType)
|
||||
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType)
|
||||
bool rlFramebufferComplete(unsigned int id)
|
||||
void rlUnloadFramebuffer(unsigned int id)
|
||||
void rlLoadMesh(Mesh *mesh, bool dynamic)
|
||||
void rlUpdateMesh(Mesh mesh, int buffer, int num)
|
||||
void rlUpdateMeshAt(Mesh mesh, int buffer, int num, int index)
|
||||
void rlDrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int count)
|
||||
unsigned int rlLoadVertexBuffer(unsigned int vaoId, int index, void *buffer, int size, bool dynamic)
|
||||
void rlUpdateMesh(Mesh mesh, int buffer, int count)
|
||||
void rlUpdateMeshAt(Mesh mesh, int buffer, int count, int index)
|
||||
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
|
||||
void rlDrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||
void rlUnloadMesh(Mesh mesh)
|
||||
void rlDrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int count)
|
||||
void rlUnloadMesh(Mesh *mesh)
|
||||
unsigned int rlLoadShaderCode(const char *vsCode, const char *fsCode)
|
||||
unsigned int rlCompileShader(const char *shaderCode, int type)
|
||||
unsigned int rlLoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId)
|
||||
void rlUnloadShaderProgram(unsigned int id)
|
||||
int rlGetLocationUniform(unsigned int shaderId, const char *uniformName)
|
||||
int rlGetLocationAttrib(unsigned int shaderId, const char *attribName)
|
||||
void rlSetUniform(int locIndex, const void *value, int uniformType, int count)
|
||||
void rlSetUniformMatrix(int locIndex, Matrix mat)
|
||||
void rlSetUniformSampler(int locIndex, Texture2D texture)
|
||||
void rlSetShaderActive(Shader shader)
|
||||
Matrix rlGetMatrixModelview(void)
|
||||
Matrix rlGetMatrixProjection(void)
|
||||
void rlSetMatrixProjection(Matrix proj)
|
||||
void rlSetMatrixModelview(Matrix view)
|
||||
void rlSetMatrixProjectionStereo(Matrix right, Matrix left)
|
||||
void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left)
|
||||
TextureCubemap rlGenTextureCubemap(Shader shader, Texture2D panorama, int size, int format)
|
||||
TextureCubemap rlGenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size)
|
||||
TextureCubemap rlGenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size)
|
||||
Texture2D rlGenTextureBRDF(Shader shader, int size)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user