From 7367140fb4dfddfc7e77993a725dc3252bded920 Mon Sep 17 00:00:00 2001 From: PompPenguin Date: Tue, 4 Jun 2019 18:06:10 -0400 Subject: Update camera.h Removed unused code for CAMERA_THIRD_PERSON. --- src/camera.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/camera.h b/src/camera.h index 18e1e4b7..1d580a20 100644 --- a/src/camera.h +++ b/src/camera.h @@ -469,9 +469,6 @@ void UpdateCamera(Camera *camera) sinf(cameraAngle.x)*direction[MOVE_LEFT] - sinf(cameraAngle.x)*direction[MOVE_RIGHT])/PLAYER_MOVEMENT_SENSITIVITY; - bool isMoving = false; // Required for swinging - - for (int i = 0; i < 6; i++) if (direction[i]) { isMoving = true; break; } // Camera orientation calculation cameraAngle.x += (mousePositionDelta.x*-CAMERA_MOUSE_MOVE_SENSITIVITY); -- cgit v1.2.3 From e103320ad8fdee61273b7da1162c120625de398d Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 4 Jun 2019 16:25:13 +0200 Subject: build: increment API_VERSION after release With v2.5.0 out, increment API_VERSION, so binaries dynamically linked against the released raylib aren't accidentally paired with a development or later released raylib that may be incompatible. --- src/CMakeLists.txt | 2 +- src/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 879ac220..9e381493 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ include(GNUInstallDirs) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") set(PROJECT_VERSION 2.5.0) -set(API_VERSION 2) +set(API_VERSION 251) include("CMakeOptions.txt") include(BuildType) diff --git a/src/Makefile b/src/Makefile index 9411b0e2..0f57f232 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,7 +43,7 @@ # Define required raylib variables RAYLIB_VERSION = 2.5.0 -RAYLIB_API_VERSION = 2 +RAYLIB_API_VERSION = 251 # See below for alternatives. RAYLIB_PATH = .. -- cgit v1.2.3 From e3ef73826448496383440cfc449ca6d00c722637 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 5 Jun 2019 13:01:58 +0200 Subject: Replace TABS by spaces --- src/camera.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/camera.h b/src/camera.h index 1d580a20..a933447d 100644 --- a/src/camera.h +++ b/src/camera.h @@ -317,7 +317,7 @@ void UpdateCamera(Camera *camera) if (cameraTargetDistance > CAMERA_FREE_DISTANCE_MAX_CLAMP) cameraTargetDistance = CAMERA_FREE_DISTANCE_MAX_CLAMP; } // Camera looking down - // TODO: Review, weird comparisson of cameraTargetDistance == 120.0f? + // TODO: Review, weird comparisson of cameraTargetDistance == 120.0f? else if ((camera->position.y > camera->target.y) && (cameraTargetDistance == CAMERA_FREE_DISTANCE_MAX_CLAMP) && (mouseWheelMove < 0)) { camera->target.x += mouseWheelMove*(camera->target.x - camera->position.x)*CAMERA_MOUSE_SCROLL_SENSITIVITY/cameraTargetDistance; @@ -338,7 +338,7 @@ void UpdateCamera(Camera *camera) if (cameraTargetDistance < CAMERA_FREE_DISTANCE_MIN_CLAMP) cameraTargetDistance = CAMERA_FREE_DISTANCE_MIN_CLAMP; } // Camera looking up - // TODO: Review, weird comparisson of cameraTargetDistance == 120.0f? + // TODO: Review, weird comparisson of cameraTargetDistance == 120.0f? else if ((camera->position.y < camera->target.y) && (cameraTargetDistance == CAMERA_FREE_DISTANCE_MAX_CLAMP) && (mouseWheelMove < 0)) { camera->target.x += mouseWheelMove*(camera->target.x - camera->position.x)*CAMERA_MOUSE_SCROLL_SENSITIVITY/cameraTargetDistance; @@ -410,7 +410,7 @@ void UpdateCamera(Camera *camera) } break; case CAMERA_FIRST_PERSON: - { + { camera->position.x += (sinf(cameraAngle.x)*direction[MOVE_BACK] - sinf(cameraAngle.x)*direction[MOVE_FRONT] - cosf(cameraAngle.x)*direction[MOVE_LEFT] + @@ -432,7 +432,7 @@ void UpdateCamera(Camera *camera) // Camera orientation calculation cameraAngle.x += (mousePositionDelta.x*-CAMERA_MOUSE_MOVE_SENSITIVITY); cameraAngle.y += (mousePositionDelta.y*-CAMERA_MOUSE_MOVE_SENSITIVITY); - + // Angle clamp if (cameraAngle.y > CAMERA_FIRST_PERSON_MIN_CLAMP*DEG2RAD) cameraAngle.y = CAMERA_FIRST_PERSON_MIN_CLAMP*DEG2RAD; else if (cameraAngle.y < CAMERA_FIRST_PERSON_MAX_CLAMP*DEG2RAD) cameraAngle.y = CAMERA_FIRST_PERSON_MAX_CLAMP*DEG2RAD; @@ -441,7 +441,7 @@ void UpdateCamera(Camera *camera) camera->target.x = camera->position.x - sinf(cameraAngle.x)*CAMERA_FIRST_PERSON_FOCUS_DISTANCE; camera->target.y = camera->position.y + sinf(cameraAngle.y)*CAMERA_FIRST_PERSON_FOCUS_DISTANCE; camera->target.z = camera->position.z - cosf(cameraAngle.x)*CAMERA_FIRST_PERSON_FOCUS_DISTANCE; - + if (isMoving) swingCounter++; // Camera position update @@ -469,12 +469,11 @@ void UpdateCamera(Camera *camera) sinf(cameraAngle.x)*direction[MOVE_LEFT] - sinf(cameraAngle.x)*direction[MOVE_RIGHT])/PLAYER_MOVEMENT_SENSITIVITY; - // Camera orientation calculation cameraAngle.x += (mousePositionDelta.x*-CAMERA_MOUSE_MOVE_SENSITIVITY); cameraAngle.y += (mousePositionDelta.y*-CAMERA_MOUSE_MOVE_SENSITIVITY); - // Angle clamp + // Angle clamp if (cameraAngle.y > CAMERA_THIRD_PERSON_MIN_CLAMP*DEG2RAD) cameraAngle.y = CAMERA_THIRD_PERSON_MIN_CLAMP*DEG2RAD; else if (cameraAngle.y < CAMERA_THIRD_PERSON_MAX_CLAMP*DEG2RAD) cameraAngle.y = CAMERA_THIRD_PERSON_MAX_CLAMP*DEG2RAD; @@ -484,14 +483,15 @@ void UpdateCamera(Camera *camera) // Camera distance clamp if (cameraTargetDistance < CAMERA_THIRD_PERSON_DISTANCE_CLAMP) cameraTargetDistance = CAMERA_THIRD_PERSON_DISTANCE_CLAMP; - // TODO: It seems camera->position is not correctly updated or some rounding issue makes the camera move straight to camera->target... - camera->position.x = sinf(cameraAngle.x)*cameraTargetDistance*cosf(cameraAngle.y) + camera->target.x; - if (cameraAngle.y <= 0.0f) camera->position.y = sinf(cameraAngle.y)*cameraTargetDistance*sinf(cameraAngle.y) + camera->target.y; - else camera->position.y = -sinf(cameraAngle.y)*cameraTargetDistance*sinf(cameraAngle.y) + camera->target.y; - camera->position.z = cosf(cameraAngle.x)*cameraTargetDistance*cosf(cameraAngle.y) + camera->target.z; + // TODO: It seems camera->position is not correctly updated or some rounding issue makes the camera move straight to camera->target... + camera->position.x = sinf(cameraAngle.x)*cameraTargetDistance*cosf(cameraAngle.y) + camera->target.x; + if (cameraAngle.y <= 0.0f) camera->position.y = sinf(cameraAngle.y)*cameraTargetDistance*sinf(cameraAngle.y) + camera->target.y; + else camera->position.y = -sinf(cameraAngle.y)*cameraTargetDistance*sinf(cameraAngle.y) + camera->target.y; + camera->position.z = cosf(cameraAngle.x)*cameraTargetDistance*cosf(cameraAngle.y) + camera->target.z; + } break; default: break; - } + } } // Set camera pan key to combine with mouse movement (free camera) -- cgit v1.2.3 From 272d9d58e39f442b282dd27f2811269991f89592 Mon Sep 17 00:00:00 2001 From: Mohamed Shazan Date: Thu, 6 Jun 2019 15:03:03 +0530 Subject: Add VS2017.ANGLE Project --- src/core.c | 6 +++++- src/external/ANGLE/lib/x64/d3dcompiler_47.dll | Bin 0 -> 4493352 bytes src/external/ANGLE/lib/x64/libEGL.dll | Bin 0 -> 62976 bytes src/external/ANGLE/lib/x64/libEGL.lib | Bin 0 -> 14164 bytes src/external/ANGLE/lib/x64/libGLESv2.dll | Bin 0 -> 18712576 bytes src/external/ANGLE/lib/x64/libGLESv2.lib | Bin 0 -> 548600 bytes src/external/ANGLE/lib/x86/d3dcompiler_47.dll | Bin 0 -> 3705472 bytes src/external/ANGLE/lib/x86/libEGL.dll | Bin 0 -> 51712 bytes src/external/ANGLE/lib/x86/libEGL.lib | Bin 0 -> 14992 bytes src/external/ANGLE/lib/x86/libGLESv2.dll | Bin 0 -> 16666624 bytes src/external/ANGLE/lib/x86/libGLESv2.lib | Bin 0 -> 575538 bytes 11 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 src/external/ANGLE/lib/x64/d3dcompiler_47.dll create mode 100644 src/external/ANGLE/lib/x64/libEGL.dll create mode 100644 src/external/ANGLE/lib/x64/libEGL.lib create mode 100644 src/external/ANGLE/lib/x64/libGLESv2.dll create mode 100644 src/external/ANGLE/lib/x64/libGLESv2.lib create mode 100644 src/external/ANGLE/lib/x86/d3dcompiler_47.dll create mode 100644 src/external/ANGLE/lib/x86/libEGL.dll create mode 100644 src/external/ANGLE/lib/x86/libEGL.lib create mode 100644 src/external/ANGLE/lib/x86/libGLESv2.dll create mode 100644 src/external/ANGLE/lib/x86/libGLESv2.lib (limited to 'src') diff --git a/src/core.c b/src/core.c index 26a8b2a4..45539d24 100644 --- a/src/core.c +++ b/src/core.c @@ -2470,7 +2470,11 @@ static bool InitGraphicsDevice(int width, int height) glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); - glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_NATIVE_CONTEXT_API); // Alternative: GLFW_EGL_CONTEXT_API (ANGLE) +#if defined(PLATFORM_DESKTOP) + glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); +#else + glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_NATIVE_CONTEXT_API); +#endif } if (fullscreen) diff --git a/src/external/ANGLE/lib/x64/d3dcompiler_47.dll b/src/external/ANGLE/lib/x64/d3dcompiler_47.dll new file mode 100644 index 00000000..47040da0 Binary files /dev/null and b/src/external/ANGLE/lib/x64/d3dcompiler_47.dll differ diff --git a/src/external/ANGLE/lib/x64/libEGL.dll b/src/external/ANGLE/lib/x64/libEGL.dll new file mode 100644 index 00000000..71c20a7a Binary files /dev/null and b/src/external/ANGLE/lib/x64/libEGL.dll differ diff --git a/src/external/ANGLE/lib/x64/libEGL.lib b/src/external/ANGLE/lib/x64/libEGL.lib new file mode 100644 index 00000000..b440f78c Binary files /dev/null and b/src/external/ANGLE/lib/x64/libEGL.lib differ diff --git a/src/external/ANGLE/lib/x64/libGLESv2.dll b/src/external/ANGLE/lib/x64/libGLESv2.dll new file mode 100644 index 00000000..66fcba06 Binary files /dev/null and b/src/external/ANGLE/lib/x64/libGLESv2.dll differ diff --git a/src/external/ANGLE/lib/x64/libGLESv2.lib b/src/external/ANGLE/lib/x64/libGLESv2.lib new file mode 100644 index 00000000..af5ba5ad Binary files /dev/null and b/src/external/ANGLE/lib/x64/libGLESv2.lib differ diff --git a/src/external/ANGLE/lib/x86/d3dcompiler_47.dll b/src/external/ANGLE/lib/x86/d3dcompiler_47.dll new file mode 100644 index 00000000..4ffad2d7 Binary files /dev/null and b/src/external/ANGLE/lib/x86/d3dcompiler_47.dll differ diff --git a/src/external/ANGLE/lib/x86/libEGL.dll b/src/external/ANGLE/lib/x86/libEGL.dll new file mode 100644 index 00000000..a9cb4a9a Binary files /dev/null and b/src/external/ANGLE/lib/x86/libEGL.dll differ diff --git a/src/external/ANGLE/lib/x86/libEGL.lib b/src/external/ANGLE/lib/x86/libEGL.lib new file mode 100644 index 00000000..1954ceb3 Binary files /dev/null and b/src/external/ANGLE/lib/x86/libEGL.lib differ diff --git a/src/external/ANGLE/lib/x86/libGLESv2.dll b/src/external/ANGLE/lib/x86/libGLESv2.dll new file mode 100644 index 00000000..47a71ff7 Binary files /dev/null and b/src/external/ANGLE/lib/x86/libGLESv2.dll differ diff --git a/src/external/ANGLE/lib/x86/libGLESv2.lib b/src/external/ANGLE/lib/x86/libGLESv2.lib new file mode 100644 index 00000000..562310cc Binary files /dev/null and b/src/external/ANGLE/lib/x86/libGLESv2.lib differ -- cgit v1.2.3 From 498c172d8e8f35def505045970a6adf50730c392 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 6 Jun 2019 11:38:45 +0200 Subject: Review function prototype --- src/raylib.h | 2 +- src/rlgl.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/raylib.h b/src/raylib.h index 21202f18..9ce2e079 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1304,7 +1304,7 @@ RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); RLAPI void SetShaderValueTexture(Shader shader, int uniformLoc, Texture2D texture); // Set shader uniform value for texture 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 +RLAPI Matrix GetMatrixModelview(void); // Get internal modelview matrix // Texture maps generation (PBR) // NOTE: Required shaders should be provided diff --git a/src/rlgl.h b/src/rlgl.h index 639a107e..10d21fcc 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -525,7 +525,7 @@ RLAPI void SetShaderValueV(Shader shader, int uniformLoc, const void *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 +RLAPI Matrix GetMatrixModelview(void); // Get internal modelview matrix // Texture maps generation (PBR) // NOTE: Required shaders should be provided @@ -3137,7 +3137,7 @@ void SetMatrixModelview(Matrix view) } // Return internal modelview matrix -Matrix GetMatrixModelview() +Matrix GetMatrixModelview(void) { Matrix matrix = MatrixIdentity(); #if defined(GRAPHICS_API_OPENGL_11) -- cgit v1.2.3 From eb1b2535f6ef5f5adb609f5e8741b20c633e15de Mon Sep 17 00:00:00 2001 From: Mohamed Shazan Date: Thu, 6 Jun 2019 16:44:37 +0530 Subject: Change ANGLE binaries location --- src/external/ANGLE/lib/x64/d3dcompiler_47.dll | Bin 4493352 -> 0 bytes src/external/ANGLE/lib/x64/libEGL.dll | Bin 62976 -> 0 bytes src/external/ANGLE/lib/x64/libEGL.lib | Bin 14164 -> 0 bytes src/external/ANGLE/lib/x64/libGLESv2.dll | Bin 18712576 -> 0 bytes src/external/ANGLE/lib/x64/libGLESv2.lib | Bin 548600 -> 0 bytes src/external/ANGLE/lib/x86/d3dcompiler_47.dll | Bin 3705472 -> 0 bytes src/external/ANGLE/lib/x86/libEGL.dll | Bin 51712 -> 0 bytes src/external/ANGLE/lib/x86/libEGL.lib | Bin 14992 -> 0 bytes src/external/ANGLE/lib/x86/libGLESv2.dll | Bin 16666624 -> 0 bytes src/external/ANGLE/lib/x86/libGLESv2.lib | Bin 575538 -> 0 bytes 10 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/external/ANGLE/lib/x64/d3dcompiler_47.dll delete mode 100644 src/external/ANGLE/lib/x64/libEGL.dll delete mode 100644 src/external/ANGLE/lib/x64/libEGL.lib delete mode 100644 src/external/ANGLE/lib/x64/libGLESv2.dll delete mode 100644 src/external/ANGLE/lib/x64/libGLESv2.lib delete mode 100644 src/external/ANGLE/lib/x86/d3dcompiler_47.dll delete mode 100644 src/external/ANGLE/lib/x86/libEGL.dll delete mode 100644 src/external/ANGLE/lib/x86/libEGL.lib delete mode 100644 src/external/ANGLE/lib/x86/libGLESv2.dll delete mode 100644 src/external/ANGLE/lib/x86/libGLESv2.lib (limited to 'src') diff --git a/src/external/ANGLE/lib/x64/d3dcompiler_47.dll b/src/external/ANGLE/lib/x64/d3dcompiler_47.dll deleted file mode 100644 index 47040da0..00000000 Binary files a/src/external/ANGLE/lib/x64/d3dcompiler_47.dll and /dev/null differ diff --git a/src/external/ANGLE/lib/x64/libEGL.dll b/src/external/ANGLE/lib/x64/libEGL.dll deleted file mode 100644 index 71c20a7a..00000000 Binary files a/src/external/ANGLE/lib/x64/libEGL.dll and /dev/null differ diff --git a/src/external/ANGLE/lib/x64/libEGL.lib b/src/external/ANGLE/lib/x64/libEGL.lib deleted file mode 100644 index b440f78c..00000000 Binary files a/src/external/ANGLE/lib/x64/libEGL.lib and /dev/null differ diff --git a/src/external/ANGLE/lib/x64/libGLESv2.dll b/src/external/ANGLE/lib/x64/libGLESv2.dll deleted file mode 100644 index 66fcba06..00000000 Binary files a/src/external/ANGLE/lib/x64/libGLESv2.dll and /dev/null differ diff --git a/src/external/ANGLE/lib/x64/libGLESv2.lib b/src/external/ANGLE/lib/x64/libGLESv2.lib deleted file mode 100644 index af5ba5ad..00000000 Binary files a/src/external/ANGLE/lib/x64/libGLESv2.lib and /dev/null differ diff --git a/src/external/ANGLE/lib/x86/d3dcompiler_47.dll b/src/external/ANGLE/lib/x86/d3dcompiler_47.dll deleted file mode 100644 index 4ffad2d7..00000000 Binary files a/src/external/ANGLE/lib/x86/d3dcompiler_47.dll and /dev/null differ diff --git a/src/external/ANGLE/lib/x86/libEGL.dll b/src/external/ANGLE/lib/x86/libEGL.dll deleted file mode 100644 index a9cb4a9a..00000000 Binary files a/src/external/ANGLE/lib/x86/libEGL.dll and /dev/null differ diff --git a/src/external/ANGLE/lib/x86/libEGL.lib b/src/external/ANGLE/lib/x86/libEGL.lib deleted file mode 100644 index 1954ceb3..00000000 Binary files a/src/external/ANGLE/lib/x86/libEGL.lib and /dev/null differ diff --git a/src/external/ANGLE/lib/x86/libGLESv2.dll b/src/external/ANGLE/lib/x86/libGLESv2.dll deleted file mode 100644 index 47a71ff7..00000000 Binary files a/src/external/ANGLE/lib/x86/libGLESv2.dll and /dev/null differ diff --git a/src/external/ANGLE/lib/x86/libGLESv2.lib b/src/external/ANGLE/lib/x86/libGLESv2.lib deleted file mode 100644 index 562310cc..00000000 Binary files a/src/external/ANGLE/lib/x86/libGLESv2.lib and /dev/null differ -- cgit v1.2.3