Initial raylib v3.7 version.
This commit is contained in:
parent
5a8a6feee6
commit
004ac65b28
44
examples/gui_portable_window.lua
Normal file
44
examples/gui_portable_window.lua
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
local width, height = 1280, 720
|
||||||
|
|
||||||
|
rl.SetConfigFlags(rl.FLAG_WINDOW_UNDECORATED)
|
||||||
|
rl.InitWindow(width, height, "raygui - portable window")
|
||||||
|
rl.SetTargetFPS(75)
|
||||||
|
|
||||||
|
local mouse_pos = rl.new("Vector2", 0, 0)
|
||||||
|
local window_pos = rl.GetWindowPosition()
|
||||||
|
local pan_offset = rl.new("Vector2", mouse_pos)
|
||||||
|
|
||||||
|
local drag_window = false
|
||||||
|
local exit_window = false
|
||||||
|
|
||||||
|
while not exit_window and not rl.WindowShouldClose() do
|
||||||
|
mouse_pos = rl.GetMousePosition()
|
||||||
|
|
||||||
|
if rl.IsMouseButtonPressed(rl.MOUSE_LEFT_BUTTON) then
|
||||||
|
if rl.CheckCollisionPointRec(mouse_pos, rl.new("Rectangle", 0, 0, width, 20)) then
|
||||||
|
drag_window = true
|
||||||
|
pan_offset = rl.new("Vector2", mouse_pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if drag_window then
|
||||||
|
window_pos = window_pos + mouse_pos - pan_offset
|
||||||
|
|
||||||
|
if rl.IsMouseButtonReleased(rl.MOUSE_LEFT_BUTTON) then
|
||||||
|
drag_window = false
|
||||||
|
end
|
||||||
|
|
||||||
|
rl.SetWindowPosition(window_pos.x, window_pos.y)
|
||||||
|
end
|
||||||
|
|
||||||
|
rl.BeginDrawing()
|
||||||
|
|
||||||
|
rl.ClearBackground(rl.RAYWHITE)
|
||||||
|
exit_window = rl.GuiWindowBox(rl.new("Rectangle", 0, 0, width, height), "PORTABLE WINDOW")
|
||||||
|
rl.DrawText(string.format("Mouse Position: [ %.0f, %.0f ]", mouse_pos.x, mouse_pos.y),
|
||||||
|
10, 40, 10, rl.DARKGRAY)
|
||||||
|
|
||||||
|
rl.EndDrawing()
|
||||||
|
end
|
||||||
|
|
||||||
|
rl.CloseWindow()
|
@ -46,7 +46,7 @@ rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
|
|||||||
rl.InitWindow(windowWidth, windowHeight, "my 32x32 game/demo")
|
rl.InitWindow(windowWidth, windowHeight, "my 32x32 game/demo")
|
||||||
|
|
||||||
local target = rl.LoadRenderTexture(gameScreenWidth, gameScreenHeight)
|
local target = rl.LoadRenderTexture(gameScreenWidth, gameScreenHeight)
|
||||||
rl.SetTextureFilter(target.texture, rl.FILTER_POINT)
|
rl.SetTextureFilter(target.texture, rl.TEXTURE_FILTER_POINT)
|
||||||
|
|
||||||
rl.SetTargetFPS(60)
|
rl.SetTargetFPS(60)
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@ local camera = rl.new("Camera3D", {
|
|||||||
local num_blocks = 15
|
local num_blocks = 15
|
||||||
|
|
||||||
while not rl.WindowShouldClose() do
|
while not rl.WindowShouldClose() do
|
||||||
local time = rl.GetTime()
|
local t = rl.GetTime()
|
||||||
|
|
||||||
local scale = (2.0 + math.sin(time)) * 0.7
|
local scale = (2.0 + math.sin(t)) * 0.7
|
||||||
local camera_time = time * 0.3
|
local camera_time = t * 0.3
|
||||||
|
|
||||||
camera.position.x = math.cos(camera_time) * 40.0
|
camera.position.x = math.cos(camera_time) * 40.0
|
||||||
camera.position.z = math.sin(camera_time) * 40.0
|
camera.position.z = math.sin(camera_time) * 40.0
|
||||||
@ -40,7 +40,7 @@ while not rl.WindowShouldClose() do
|
|||||||
for y=0,num_blocks-1 do
|
for y=0,num_blocks-1 do
|
||||||
for z=0,num_blocks-1 do
|
for z=0,num_blocks-1 do
|
||||||
local block_scale = (x + y + z) / 30
|
local block_scale = (x + y + z) / 30
|
||||||
local scatter = math.sin(block_scale * 20.0 + time * 4.0)
|
local scatter = math.sin(block_scale * 20.0 + t * 4.0)
|
||||||
|
|
||||||
local cube_pos = rl.new("Vector3",
|
local cube_pos = rl.new("Vector3",
|
||||||
(x - num_blocks / 2) * (scale * 3.0) + scatter,
|
(x - num_blocks / 2) * (scale * 3.0) + scatter,
|
||||||
|
@ -11,7 +11,7 @@ local fb_data = rl.new("Color[?]", width * height)
|
|||||||
|
|
||||||
framebuffer.width = width
|
framebuffer.width = width
|
||||||
framebuffer.height = height
|
framebuffer.height = height
|
||||||
framebuffer.format = rl.UNCOMPRESSED_R8G8B8A8
|
framebuffer.format = rl.PIXELFORMAT_UNCOMPRESSED_R8G8B8A8
|
||||||
framebuffer.mipmaps = 1
|
framebuffer.mipmaps = 1
|
||||||
framebuffer.data = fb_data
|
framebuffer.data = fb_data
|
||||||
|
|
||||||
|
2
luajit
2
luajit
@ -1 +1 @@
|
|||||||
Subproject commit c0c2e62a5404b51ba740ed28762e65b2ef56bcf9
|
Subproject commit 75ee3a6159f1831fa57992df3caf5a2c303c281a
|
2
raygui
2
raygui
@ -1 +1 @@
|
|||||||
Subproject commit 3627bb960a4df7e13dbf82fc8ace0e27ed2b072c
|
Subproject commit d77bd5f3ef3c973811c5ef3f387e983628611e99
|
2
raylib
2
raylib
@ -1 +1 @@
|
|||||||
Subproject commit 9569d6a802a2230c92503456d544a5470a59d5cf
|
Subproject commit 4c1af4cc90913559e629c85470308b9e1a68f9a3
|
@ -93,11 +93,8 @@ ffi.cdef [[
|
|||||||
Texture texture;
|
Texture texture;
|
||||||
Texture depth;
|
Texture depth;
|
||||||
} RenderTexture;
|
} RenderTexture;
|
||||||
|
|
||||||
typedef RenderTexture RenderTexture2D;
|
typedef RenderTexture RenderTexture2D;
|
||||||
|
|
||||||
typedef enum { OPENGL_11 = 1, OPENGL_21, OPENGL_33, OPENGL_ES_20 } GlVersion;
|
|
||||||
|
|
||||||
typedef struct NPatchInfo {
|
typedef struct NPatchInfo {
|
||||||
Rectangle sourceRec;
|
Rectangle sourceRec;
|
||||||
int left;
|
int left;
|
||||||
@ -203,7 +200,6 @@ ffi.cdef [[
|
|||||||
|
|
||||||
typedef struct ModelAnimation {
|
typedef struct ModelAnimation {
|
||||||
int boneCount;
|
int boneCount;
|
||||||
|
|
||||||
int frameCount;
|
int frameCount;
|
||||||
BoneInfo *bones;
|
BoneInfo *bones;
|
||||||
Transform **framePoses;
|
Transform **framePoses;
|
||||||
@ -271,6 +267,8 @@ ffi.cdef [[
|
|||||||
} VrDeviceInfo;
|
} VrDeviceInfo;
|
||||||
|
|
||||||
typedef struct VrStereoConfig {
|
typedef struct VrStereoConfig {
|
||||||
|
Matrix projection[2];
|
||||||
|
Matrix viewOffset[2];
|
||||||
float leftLensCenter[2];
|
float leftLensCenter[2];
|
||||||
float rightLensCenter[2];
|
float rightLensCenter[2];
|
||||||
float leftScreenCenter[2];
|
float leftScreenCenter[2];
|
||||||
@ -472,6 +470,20 @@ ffi.cdef [[
|
|||||||
GAMEPAD_AXIS_RIGHT_TRIGGER
|
GAMEPAD_AXIS_RIGHT_TRIGGER
|
||||||
} GamepadAxis;
|
} GamepadAxis;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
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 {
|
typedef enum {
|
||||||
SHADER_LOC_VERTEX_POSITION = 0,
|
SHADER_LOC_VERTEX_POSITION = 0,
|
||||||
SHADER_LOC_VERTEX_TEXCOORD01,
|
SHADER_LOC_VERTEX_TEXCOORD01,
|
||||||
@ -481,6 +493,7 @@ ffi.cdef [[
|
|||||||
SHADER_LOC_VERTEX_COLOR,
|
SHADER_LOC_VERTEX_COLOR,
|
||||||
SHADER_LOC_MATRIX_MVP,
|
SHADER_LOC_MATRIX_MVP,
|
||||||
SHADER_LOC_MATRIX_MODEL,
|
SHADER_LOC_MATRIX_MODEL,
|
||||||
|
SHADER_LOC_MATRIX_NORMAL,
|
||||||
SHADER_LOC_MATRIX_VIEW,
|
SHADER_LOC_MATRIX_VIEW,
|
||||||
SHADER_LOC_MATRIX_PROJECTION,
|
SHADER_LOC_MATRIX_PROJECTION,
|
||||||
SHADER_LOC_VECTOR_VIEW,
|
SHADER_LOC_VECTOR_VIEW,
|
||||||
@ -512,20 +525,6 @@ ffi.cdef [[
|
|||||||
SHADER_UNIFORM_SAMPLER2D
|
SHADER_UNIFORM_SAMPLER2D
|
||||||
} ShaderUniformDataType;
|
} ShaderUniformDataType;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
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 {
|
typedef enum {
|
||||||
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
|
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1,
|
||||||
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
|
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
|
||||||
@ -624,11 +623,6 @@ ffi.cdef [[
|
|||||||
} NPatchLayout;
|
} NPatchLayout;
|
||||||
|
|
||||||
typedef void (*TraceLogCallback)(int logLevel, 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);
|
|
||||||
typedef unsigned char* (*LoadFileDataCallback)(const char* fileName, unsigned int* bytesRead);
|
|
||||||
typedef char* (*LoadFileTextCallback)(const char* fileName);
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- raymath cdef
|
-- raymath cdef
|
||||||
@ -708,44 +702,6 @@ ffi.cdef [[
|
|||||||
SHADER_ATTRIB_VEC3,
|
SHADER_ATTRIB_VEC3,
|
||||||
SHADER_ATTRIB_VEC4
|
SHADER_ATTRIB_VEC4
|
||||||
} ShaderAttributeDataType;
|
} 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
|
-- Physac cdef
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
local load = loadstring
|
local load = loadstring
|
||||||
|
|
||||||
raylua.version = "v3.5b"
|
raylua.version = "v3.7-pre1"
|
||||||
|
|
||||||
function raylua.repl()
|
function raylua.repl()
|
||||||
print("> raylua " .. raylua.version .. " <")
|
print("> raylua " .. raylua.version .. " <")
|
||||||
|
65
tools/api.h
65
tools/api.h
@ -52,8 +52,25 @@ void BeginMode3D(Camera3D camera)
|
|||||||
void EndMode3D(void)
|
void EndMode3D(void)
|
||||||
void BeginTextureMode(RenderTexture2D target)
|
void BeginTextureMode(RenderTexture2D target)
|
||||||
void EndTextureMode(void)
|
void EndTextureMode(void)
|
||||||
|
void BeginShaderMode(Shader shader)
|
||||||
|
void EndShaderMode(void)
|
||||||
|
void BeginBlendMode(int mode)
|
||||||
|
void EndBlendMode(void)
|
||||||
void BeginScissorMode(int x, int y, int width, int height)
|
void BeginScissorMode(int x, int y, int width, int height)
|
||||||
void EndScissorMode(void)
|
void EndScissorMode(void)
|
||||||
|
void BeginVrStereoMode(VrStereoConfig config)
|
||||||
|
void EndVrStereoMode(void)
|
||||||
|
VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
|
||||||
|
void UnloadVrStereoConfig(VrStereoConfig config)
|
||||||
|
Shader LoadShader(const char *vsFileName, const char *fsFileName)
|
||||||
|
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode)
|
||||||
|
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 UnloadShader(Shader shader)
|
||||||
Ray GetMouseRay(Vector2 mousePosition, Camera camera)
|
Ray GetMouseRay(Vector2 mousePosition, Camera camera)
|
||||||
Matrix GetCameraMatrix(Camera camera)
|
Matrix GetCameraMatrix(Camera camera)
|
||||||
Matrix GetCameraMatrix2D(Camera2D camera)
|
Matrix GetCameraMatrix2D(Camera2D camera)
|
||||||
@ -71,14 +88,10 @@ void SetConfigFlags(unsigned int flags)
|
|||||||
void TraceLog(int logLevel, const char *text, ...)
|
void TraceLog(int logLevel, const char *text, ...)
|
||||||
void SetTraceLogLevel(int logLevel)
|
void SetTraceLogLevel(int logLevel)
|
||||||
void *MemAlloc(int size)
|
void *MemAlloc(int size)
|
||||||
|
void *MemRealloc(void *ptr, int size)
|
||||||
void MemFree(void *ptr)
|
void MemFree(void *ptr)
|
||||||
void SetTraceLogCallback(TraceLogCallback callback)
|
void SetTraceLogCallback(TraceLogCallback callback)
|
||||||
//void SetMemAllocCallback(MemAllocCallback callback)
|
unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead)
|
||||||
//void SetMemReallocCallback(MemReallocCallback callback)
|
|
||||||
//void SetMemFreeCallback(MemFreeCallback callback)
|
|
||||||
//void SetLoadFileDataCallback(LoadFileDataCallback callback)
|
|
||||||
//void SetLoadFileTextCallback(LoadFileDataCallback callback)
|
|
||||||
uint8_t *LoadFileData(const char *fileName, unsigned int *bytesRead)
|
|
||||||
void UnloadFileData(unsigned char *data)
|
void UnloadFileData(unsigned char *data)
|
||||||
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
|
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
|
||||||
char *LoadFileText(const char *fileName)
|
char *LoadFileText(const char *fileName)
|
||||||
@ -100,8 +113,8 @@ bool IsFileDropped(void)
|
|||||||
char **GetDroppedFiles(int *count)
|
char **GetDroppedFiles(int *count)
|
||||||
void ClearDroppedFiles(void)
|
void ClearDroppedFiles(void)
|
||||||
long GetFileModTime(const char *fileName)
|
long GetFileModTime(const char *fileName)
|
||||||
uint8_t *CompressData(uint8_t *data, int dataLength, int *compDataLength)
|
unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength)
|
||||||
uint8_t *DecompressData(uint8_t *compData, int compDataLength, int *dataLength)
|
unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength)
|
||||||
bool SaveStorageValue(unsigned int position, int value)
|
bool SaveStorageValue(unsigned int position, int value)
|
||||||
int LoadStorageValue(unsigned int position)
|
int LoadStorageValue(unsigned int position)
|
||||||
void OpenURL(const char *url)
|
void OpenURL(const char *url)
|
||||||
@ -153,6 +166,7 @@ void SetCameraPanControl(int keyPan)
|
|||||||
void SetCameraAltControl(int keyAlt)
|
void SetCameraAltControl(int keyAlt)
|
||||||
void SetCameraSmoothZoomControl(int keySmoothZoom)
|
void SetCameraSmoothZoomControl(int keySmoothZoom)
|
||||||
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown)
|
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown)
|
||||||
|
void SetShapesTexture(Texture2D texture, Rectangle source)
|
||||||
void DrawPixel(int posX, int posY, Color color)
|
void DrawPixel(int posX, int posY, Color color)
|
||||||
void DrawPixelV(Vector2 position, Color color)
|
void DrawPixelV(Vector2 position, Color color)
|
||||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
||||||
@ -199,7 +213,7 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
|
|||||||
Image LoadImage(const char *fileName)
|
Image LoadImage(const char *fileName)
|
||||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
|
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
|
||||||
Image LoadImageAnim(const char *fileName, int *frames)
|
Image LoadImageAnim(const char *fileName, int *frames)
|
||||||
Image LoadImageFromMemory(const char *fileType, const uint8_t *fileData, int dataSize)
|
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize)
|
||||||
void UnloadImage(Image image)
|
void UnloadImage(Image image)
|
||||||
bool ExportImage(Image image, const char *fileName)
|
bool ExportImage(Image image, const char *fileName)
|
||||||
bool ExportImageAsCode(Image image, const char *fileName)
|
bool ExportImageAsCode(Image image, const char *fileName)
|
||||||
@ -276,7 +290,8 @@ void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color
|
|||||||
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint)
|
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 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 DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||||
void DrawTexturePoly(Texture t, float x, float y, Vector2 *points, Vector2 *tPnts, int numPoints, Color colour)
|
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||||
|
void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointsCount, Color tint)
|
||||||
Color Fade(Color color, float alpha)
|
Color Fade(Color color, float alpha)
|
||||||
int ColorToInt(Color color)
|
int ColorToInt(Color color)
|
||||||
Vector4 ColorNormalize(Color color)
|
Vector4 ColorNormalize(Color color)
|
||||||
@ -293,8 +308,8 @@ Font GetFontDefault(void)
|
|||||||
Font LoadFont(const char *fileName)
|
Font LoadFont(const char *fileName)
|
||||||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount)
|
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount)
|
||||||
Font LoadFontFromImage(Image image, Color key, int firstChar)
|
Font LoadFontFromImage(Image image, Color key, int firstChar)
|
||||||
Font LoadFontFromMemory(const char *fileType, const uint8_t *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
|
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
|
||||||
CharInfo *LoadFontData(const uint8_t *fileData, int dataSize, int fontSize, int *fontChars, int charsCount, int type)
|
CharInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int charsCount, int type)
|
||||||
Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod)
|
Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod)
|
||||||
void UnloadFontData(CharInfo *chars, int charsCount)
|
void UnloadFontData(CharInfo *chars, int charsCount)
|
||||||
void UnloadFont(Font font)
|
void UnloadFont(Font font)
|
||||||
@ -349,10 +364,12 @@ Model LoadModel(const char *fileName)
|
|||||||
Model LoadModelFromMesh(Mesh mesh)
|
Model LoadModelFromMesh(Mesh mesh)
|
||||||
void UnloadModel(Model model)
|
void UnloadModel(Model model)
|
||||||
void UnloadModelKeepMeshes(Model model)
|
void UnloadModelKeepMeshes(Model model)
|
||||||
Mesh *LoadMeshes(const char *fileName, int *meshCount)
|
void UploadMesh(Mesh *mesh, bool dynamic)
|
||||||
bool ExportMesh(Mesh mesh, const char *fileName)
|
void UpdateMeshBuffer(Mesh mesh, int index, void *data, int dataSize, int offset)
|
||||||
|
void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||||
|
void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int instances)
|
||||||
void UnloadMesh(Mesh mesh)
|
void UnloadMesh(Mesh mesh)
|
||||||
void UploadMesh(Mesh *mesh)
|
bool ExportMesh(Mesh mesh, const char *fileName)
|
||||||
Material *LoadMaterials(const char *fileName, int *materialCount)
|
Material *LoadMaterials(const char *fileName, int *materialCount)
|
||||||
Material LoadMaterialDefault(void)
|
Material LoadMaterialDefault(void)
|
||||||
void UnloadMaterial(Material material)
|
void UnloadMaterial(Material material)
|
||||||
@ -393,24 +410,12 @@ RayHitInfo GetCollisionRayMesh(Ray ray, Mesh mesh, Matrix transform)
|
|||||||
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
||||||
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
||||||
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
||||||
void BeginShaderMode(Shader shader)
|
|
||||||
void EndShaderMode(void)
|
|
||||||
void BeginBlendMode(int mode)
|
|
||||||
void EndBlendMode(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 InitAudioDevice(void)
|
||||||
void CloseAudioDevice(void)
|
void CloseAudioDevice(void)
|
||||||
bool IsAudioDeviceReady(void)
|
bool IsAudioDeviceReady(void)
|
||||||
void SetMasterVolume(float volume)
|
void SetMasterVolume(float volume)
|
||||||
Wave LoadWave(const char *fileName)
|
Wave LoadWave(const char *fileName)
|
||||||
Wave LoadWaveFromMemory(const char *fileType, const uint8_t *fileData, int dataSize)
|
Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize)
|
||||||
Sound LoadSound(const char *fileName)
|
Sound LoadSound(const char *fileName)
|
||||||
Sound LoadSoundFromWave(Wave wave)
|
Sound LoadSoundFromWave(Wave wave)
|
||||||
void UpdateSound(Sound sound, const void *data, int samplesCount)
|
void UpdateSound(Sound sound, const void *data, int samplesCount)
|
||||||
@ -437,13 +442,13 @@ Music LoadMusicStream(const char *fileName)
|
|||||||
Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize)
|
Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize)
|
||||||
void UnloadMusicStream(Music music)
|
void UnloadMusicStream(Music music)
|
||||||
void PlayMusicStream(Music music)
|
void PlayMusicStream(Music music)
|
||||||
|
bool IsMusicPlaying(Music music)
|
||||||
void UpdateMusicStream(Music music)
|
void UpdateMusicStream(Music music)
|
||||||
void StopMusicStream(Music music)
|
void StopMusicStream(Music music)
|
||||||
void PauseMusicStream(Music music)
|
void PauseMusicStream(Music music)
|
||||||
void ResumeMusicStream(Music music)
|
void ResumeMusicStream(Music music)
|
||||||
void SetMusicVolume(Music music, float volume)
|
void SetMusicVolume(Music music, float volume)
|
||||||
void SetMusicPitch(Music music, float pitch)
|
void SetMusicPitch(Music music, float pitch)
|
||||||
void SetMusicLooping(Music *music, bool loop)
|
|
||||||
float GetMusicTimeLength(Music music)
|
float GetMusicTimeLength(Music music)
|
||||||
float GetMusicTimePlayed(Music music)
|
float GetMusicTimePlayed(Music music)
|
||||||
AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels)
|
AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels)
|
||||||
@ -457,4 +462,4 @@ bool IsAudioStreamPlaying(AudioStream stream)
|
|||||||
void StopAudioStream(AudioStream stream)
|
void StopAudioStream(AudioStream stream)
|
||||||
void SetAudioStreamVolume(AudioStream stream, float volume)
|
void SetAudioStreamVolume(AudioStream stream, float volume)
|
||||||
void SetAudioStreamPitch(AudioStream stream, float pitch)
|
void SetAudioStreamPitch(AudioStream stream, float pitch)
|
||||||
void SetAudioStreamBufferSizeDefault(int size)
|
void SetAudioStreamBufferSizeDefault(int size)
|
@ -15,8 +15,8 @@ local structs = {
|
|||||||
"AudioStream", "VrDeviceInfo", "Camera3D", "RenderTexture2D",
|
"AudioStream", "VrDeviceInfo", "Camera3D", "RenderTexture2D",
|
||||||
"TextureCubemap", "TraceLogCallback", "PhysicsBody",
|
"TextureCubemap", "TraceLogCallback", "PhysicsBody",
|
||||||
"GestureEvent", "GuiStyle", "GuiTextBoxState",
|
"GestureEvent", "GuiStyle", "GuiTextBoxState",
|
||||||
"TraceLogCallback", "MemAllocCallback", "MemReallocCallback",
|
"TraceLogCallback", "VertexBuffer", "DrawCall", "RenderBatch",
|
||||||
"MemFreeCallback", "LoadFileDataCallback"
|
"ShaderAttributeDataType", "MaterialMapIndex", "VrStereoConfig"
|
||||||
}
|
}
|
||||||
|
|
||||||
local functions = {}
|
local functions = {}
|
||||||
|
@ -16,4 +16,4 @@ PhysicsBody GetPhysicsBody(int index)
|
|||||||
int GetPhysicsBodiesCount(void)
|
int GetPhysicsBodiesCount(void)
|
||||||
int GetPhysicsShapeType(int index)
|
int GetPhysicsShapeType(int index)
|
||||||
int GetPhysicsShapeVerticesCount(int index)
|
int GetPhysicsShapeVerticesCount(int index)
|
||||||
Vector2 GetPhysicsShapeVertex(PhysicsBody body, int vertex)
|
Vector2 GetPhysicsShapeVertex(PhysicsBody body, int vertex)
|
@ -9,10 +9,6 @@ void GuiSetFont(Font font)
|
|||||||
Font GuiGetFont(void)
|
Font GuiGetFont(void)
|
||||||
void GuiSetStyle(int control, int property, int value)
|
void GuiSetStyle(int control, int property, int value)
|
||||||
int GuiGetStyle(int control, int property)
|
int GuiGetStyle(int control, int property)
|
||||||
void GuiEnableTooltip(void)
|
|
||||||
void GuiDisableTooltip(void)
|
|
||||||
void GuiSetTooltip(const char *tooltip)
|
|
||||||
void GuiClearTooltip(void)
|
|
||||||
bool GuiWindowBox(Rectangle bounds, const char *title)
|
bool GuiWindowBox(Rectangle bounds, const char *title)
|
||||||
void GuiGroupBox(Rectangle bounds, const char *text)
|
void GuiGroupBox(Rectangle bounds, const char *text)
|
||||||
void GuiLine(Rectangle bounds, const char *text)
|
void GuiLine(Rectangle bounds, const char *text)
|
||||||
@ -56,4 +52,4 @@ unsigned int *GuiGetIconData(int iconId)
|
|||||||
void GuiSetIconData(int iconId, unsigned int *data)
|
void GuiSetIconData(int iconId, unsigned int *data)
|
||||||
void GuiSetIconPixel(int iconId, int x, int y)
|
void GuiSetIconPixel(int iconId, int x, int y)
|
||||||
void GuiClearIconPixel(int iconId, int x, int y)
|
void GuiClearIconPixel(int iconId, int x, int y)
|
||||||
bool GuiCheckIconPixel(int iconId, int x, int y)
|
bool GuiCheckIconPixel(int iconId, int x, int y)
|
@ -92,4 +92,4 @@ void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle)
|
|||||||
Quaternion QuaternionFromEuler(float pitch, float yaw, float roll)
|
Quaternion QuaternionFromEuler(float pitch, float yaw, float roll)
|
||||||
Vector3 QuaternionToEuler(Quaternion q)
|
Vector3 QuaternionToEuler(Quaternion q)
|
||||||
Quaternion QuaternionTransform(Quaternion q, Matrix mat)
|
Quaternion QuaternionTransform(Quaternion q, Matrix mat)
|
||||||
Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view)
|
Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view)
|
58
tools/rlgl.h
58
tools/rlgl.h
@ -19,8 +19,19 @@ void rlNormal3f(float x, float y, float z)
|
|||||||
void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||||
void rlColor3f(float x, float y, float z)
|
void rlColor3f(float x, float y, float z)
|
||||||
void rlColor4f(float x, float y, float z, float w)
|
void rlColor4f(float x, float y, float z, float w)
|
||||||
|
bool rlEnableVertexArray(unsigned int vaoId)
|
||||||
|
void rlDisableVertexArray(void)
|
||||||
|
void rlEnableVertexBuffer(unsigned int id)
|
||||||
|
void rlDisableVertexBuffer(void)
|
||||||
|
void rlEnableVertexBufferElement(unsigned int id)
|
||||||
|
void rlDisableVertexBufferElement(void)
|
||||||
|
void rlEnableVertexAttribute(unsigned int index)
|
||||||
|
void rlDisableVertexAttribute(unsigned int index)
|
||||||
|
void rlActiveTextureSlot(int slot)
|
||||||
void rlEnableTexture(unsigned int id)
|
void rlEnableTexture(unsigned int id)
|
||||||
void rlDisableTexture(void)
|
void rlDisableTexture(void)
|
||||||
|
void rlEnableTextureCubemap(unsigned int id)
|
||||||
|
void rlDisableTextureCubemap(void)
|
||||||
void rlTextureParameters(unsigned int id, int param, int value)
|
void rlTextureParameters(unsigned int id, int param, int value)
|
||||||
void rlEnableShader(unsigned int id)
|
void rlEnableShader(unsigned int id)
|
||||||
void rlDisableShader(void)
|
void rlDisableShader(void)
|
||||||
@ -43,27 +54,40 @@ void rlEnableSmoothLines(void)
|
|||||||
void rlDisableSmoothLines(void)
|
void rlDisableSmoothLines(void)
|
||||||
void rlEnableStereoRender(void)
|
void rlEnableStereoRender(void)
|
||||||
void rlDisableStereoRender(void)
|
void rlDisableStereoRender(void)
|
||||||
|
bool rlIsStereoRenderEnabled(void)
|
||||||
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||||
void rlClearScreenBuffers(void)
|
void rlClearScreenBuffers(void)
|
||||||
int rlGetVersion(void)
|
|
||||||
void rlCheckErrors(void)
|
void rlCheckErrors(void)
|
||||||
void rlSetBlendMode(int mode)
|
void rlSetBlendMode(int mode)
|
||||||
void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation)
|
void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation)
|
||||||
void rlglInit(int width, int height)
|
void rlglInit(int width, int height)
|
||||||
void rlglClose(void)
|
void rlglClose(void)
|
||||||
void rlLoadExtensions(void* loader)
|
void rlLoadExtensions(void *loader)
|
||||||
int rlGetVersion(void)
|
int rlGetVersion(void)
|
||||||
|
int rlGetFramebufferWidth(void)
|
||||||
|
int rlGetFramebufferHeight(void)
|
||||||
Shader rlGetShaderDefault(void)
|
Shader rlGetShaderDefault(void)
|
||||||
Texture2D rlGetTextureDefault(void)
|
Texture2D rlGetTextureDefault(void)
|
||||||
Texture2D rlGetShapesTexture(void)
|
|
||||||
Rectangle rlGetShapesTextureRec(void)
|
|
||||||
void rlSetShapesTexture(Texture2D texture, Rectangle source)
|
|
||||||
RenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements)
|
RenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements)
|
||||||
void rlUnloadRenderBatch(RenderBatch batch)
|
void rlUnloadRenderBatch(RenderBatch batch)
|
||||||
void rlDrawRenderBatch(RenderBatch *batch)
|
void rlDrawRenderBatch(RenderBatch *batch)
|
||||||
void rlSetRenderBatchActive(RenderBatch *batch)
|
void rlSetRenderBatchActive(RenderBatch *batch)
|
||||||
void rlDrawRenderBatchActive(void)
|
void rlDrawRenderBatchActive(void)
|
||||||
bool rlCheckRenderBatchLimit(int vCount)
|
bool rlCheckRenderBatchLimit(int vCount)
|
||||||
|
void rlSetTexture(unsigned int id)
|
||||||
|
unsigned int rlLoadVertexArray(void)
|
||||||
|
unsigned int rlLoadVertexBuffer(void *buffer, int size, bool dynamic)
|
||||||
|
unsigned int rlLoadVertexBufferElement(void *buffer, int size, bool dynamic)
|
||||||
|
void rlUpdateVertexBuffer(int bufferId, void *data, int dataSize, int offset)
|
||||||
|
void rlUnloadVertexArray(unsigned int vaoId)
|
||||||
|
void rlUnloadVertexBuffer(unsigned int vboId)
|
||||||
|
void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, void *pointer)
|
||||||
|
void rlSetVertexAttributeDivisor(unsigned int index, int divisor)
|
||||||
|
void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count)
|
||||||
|
void rlDrawVertexArray(int offset, int count)
|
||||||
|
void rlDrawVertexArrayElements(int offset, int count, void *buffer)
|
||||||
|
void rlDrawVertexArrayInstanced(int offset, int count, int instances)
|
||||||
|
void rlDrawVertexArrayElementsInstanced(int offset, int count, void *buffer, int instances)
|
||||||
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
|
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
|
||||||
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
|
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
|
||||||
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
||||||
@ -74,17 +98,9 @@ void rlGenerateMipmaps(Texture2D *texture)
|
|||||||
void *rlReadTexturePixels(Texture2D texture)
|
void *rlReadTexturePixels(Texture2D texture)
|
||||||
unsigned char *rlReadScreenPixels(int width, int height)
|
unsigned char *rlReadScreenPixels(int width, int height)
|
||||||
unsigned int rlLoadFramebuffer(int width, int height)
|
unsigned int rlLoadFramebuffer(int width, int height)
|
||||||
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType)
|
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType, int texType, int mipLevel)
|
||||||
bool rlFramebufferComplete(unsigned int id)
|
bool rlFramebufferComplete(unsigned int id)
|
||||||
void rlUnloadFramebuffer(unsigned int id)
|
void rlUnloadFramebuffer(unsigned int id)
|
||||||
void rlLoadMesh(Mesh *mesh, bool dynamic)
|
|
||||||
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 rlDrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int count)
|
|
||||||
void rlUnloadMesh(Mesh *mesh)
|
|
||||||
unsigned int rlLoadShaderCode(const char *vsCode, const char *fsCode)
|
unsigned int rlLoadShaderCode(const char *vsCode, const char *fsCode)
|
||||||
unsigned int rlCompileShader(const char *shaderCode, int type)
|
unsigned int rlCompileShader(const char *shaderCode, int type)
|
||||||
unsigned int rlLoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId)
|
unsigned int rlLoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId)
|
||||||
@ -93,16 +109,16 @@ int rlGetLocationUniform(unsigned int shaderId, const char *uniformName)
|
|||||||
int rlGetLocationAttrib(unsigned int shaderId, const char *attribName)
|
int rlGetLocationAttrib(unsigned int shaderId, const char *attribName)
|
||||||
void rlSetUniform(int locIndex, const void *value, int uniformType, int count)
|
void rlSetUniform(int locIndex, const void *value, int uniformType, int count)
|
||||||
void rlSetUniformMatrix(int locIndex, Matrix mat)
|
void rlSetUniformMatrix(int locIndex, Matrix mat)
|
||||||
void rlSetUniformSampler(int locIndex, Texture2D texture)
|
void rlSetUniformSampler(int locIndex, unsigned int textureId)
|
||||||
void rlSetShaderActive(Shader shader)
|
void rlSetShader(Shader shader)
|
||||||
Matrix rlGetMatrixModelview(void)
|
Matrix rlGetMatrixModelview(void)
|
||||||
Matrix rlGetMatrixProjection(void)
|
Matrix rlGetMatrixProjection(void)
|
||||||
|
Matrix rlGetMatrixTransform(void)
|
||||||
|
Matrix rlGetMatrixProjectionStereo(int eye)
|
||||||
|
Matrix rlGetMatrixViewOffsetStereo(int eye)
|
||||||
void rlSetMatrixProjection(Matrix proj)
|
void rlSetMatrixProjection(Matrix proj)
|
||||||
void rlSetMatrixModelview(Matrix view)
|
void rlSetMatrixModelview(Matrix view)
|
||||||
void rlSetMatrixProjectionStereo(Matrix right, Matrix left)
|
void rlSetMatrixProjectionStereo(Matrix right, Matrix left)
|
||||||
void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left)
|
void rlSetMatrixViewOffsetStereo(Matrix right, Matrix left)
|
||||||
TextureCubemap rlGenTextureCubemap(Shader shader, Texture2D panorama, int size, int format)
|
void rlLoadDrawCube(void)
|
||||||
TextureCubemap rlGenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size)
|
void rlLoadDrawQuad(void)
|
||||||
TextureCubemap rlGenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size)
|
|
||||||
Texture2D rlGenTextureBRDF(Shader shader, int size)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user