Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1323 move glad into another repository #1336

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@
[submodule "core/lib/json"]
path = core/lib/json
url = https://github.com/nlohmann/json.git
[submodule "core/lib/glad"]
path = core/lib/glad
url = https://github.com/Dav1dde/glad.git
[submodule "engine/lib/implot"]
path = engine/lib/implot
url = https://github.com/epezent/implot.git
[submodule "core/lib/cpptrace"]
path = core/lib/cpptrace
url = https://github.com/jeremy-rifkin/cpptrace.git
[submodule "core/lib/glad"]
path = core/lib/glad
url = https://github.com/GameDevTecnico/cubos-glad.git
[submodule "engine/lib/stb_image"]
path = engine/lib/stb_image
url = https://github.com/GameDevTecnico/cubos-stb.git
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Handle body rotation on physics integration (#1242, **&fallenatlas**).
- Binary Serializer and Deserializer (#1306, **@RiscadoA**).
- Type Client and Type Server (#1302, **@RiscadoA**).
- Deadzone for input axis (#844, **@kuukitenshi**)
- Generic Camera component to hold projection matrix (#1331, **@mkuritsu**)
- Deadzone for input axis (#844, **@kuukitenshi**).
- Generic Camera component to hold projection matrix (#1331, **@mkuritsu**).
- Initial application debugging through Tesseratos (#1303, **@RiscadoA**).
- Print stacktrace with *cpptrace* on calls to CUBOS_FAIL (#1172, **@RiscadoA**).

### Changed

- Moved Glad and stb-image libs to another repositories, cubos-glad and cubos-stb, respectively (#1323, **@kuukitenshi**).

### Fixed

- Spot light angle mismatch between light and shadows (#1310, **@tomas7770**).
- Spot shadows cause light range cutoff (#1312, **@tomas7770**).


## [v0.3.0] - 2024-08-02

### Added
Expand Down
4 changes: 1 addition & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ cubos_common_target_options(cubos-core)

# Link dependencies
if(WITH_OPENGL)
set(GLAD_SOUURCES_DIR "lib/glad")
add_subdirectory("${GLAD_SOUURCES_DIR}/cmake" glad_cmake SYSTEM)
glad_add_library(glad REPRODUCIBLE API gl:core=3.3)
add_subdirectory("lib/glad")
if(BUILD_CORE_SHARED)
set_property(TARGET glad PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
Expand Down
2 changes: 1 addition & 1 deletion core/lib/glad
Submodule glad updated from 73eaae to 436e91
18 changes: 9 additions & 9 deletions core/src/gl/ogl_render_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <utility>
#include <vector>

#include <glad/gl.h>
#include <glad/glad.h>

#include <cubos/core/log.hpp>
#include <cubos/core/reflection/external/cstring.hpp>
Expand Down Expand Up @@ -1882,7 +1882,7 @@
glSamplerParameteri(id, GL_TEXTURE_MAG_FILTER, static_cast<GLint>(magFilter));
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glSamplerParameteri(id, GL_TEXTURE_MAX_ANISOTROPY_EXT, static_cast<GLint>(desc.maxAnisotropy));
glSamplerParameteri(id, GL_TEXTURE_MAX_ANISOTROPY, static_cast<GLint>(desc.maxAnisotropy));

Check warning on line 1885 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L1885

Added line #L1885 was not covered by tests
}
glSamplerParameteri(id, GL_TEXTURE_WRAP_S, static_cast<GLint>(addressU));
glSamplerParameteri(id, GL_TEXTURE_WRAP_T, static_cast<GLint>(addressV));
Expand Down Expand Up @@ -1934,7 +1934,7 @@
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MAX_ANISOTROPY, 1.0F);

Check warning on line 1937 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L1937

Added line #L1937 was not covered by tests
}

// Check errors
Expand Down Expand Up @@ -1978,7 +1978,7 @@
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY, 1.0F);

Check warning on line 1981 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L1981

Added line #L1981 was not covered by tests
}

// Check errors
Expand Down Expand Up @@ -2030,7 +2030,7 @@
glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
glTexParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_ANISOTROPY, 1.0F);

Check warning on line 2033 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L2033

Added line #L2033 was not covered by tests
}

// Check errors
Expand Down Expand Up @@ -2081,7 +2081,7 @@
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAX_ANISOTROPY, 1.0F);

Check warning on line 2084 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L2084

Added line #L2084 was not covered by tests
}

// Check errors
Expand Down Expand Up @@ -2139,7 +2139,7 @@
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_ANISOTROPY, 1.0F);

Check warning on line 2142 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L2142

Added line #L2142 was not covered by tests
}

// Check errors
Expand Down Expand Up @@ -2194,7 +2194,7 @@
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (GLAD_GL_ARB_texture_filter_anisotropic != 0)
{
glTexParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0F);
glTexParameterf(GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_MAX_ANISOTROPY, 1.0F);

Check warning on line 2197 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L2197

Added line #L2197 was not covered by tests
}

// Check errors
Expand Down Expand Up @@ -2800,7 +2800,7 @@
else
{
GLfloat val;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &val);
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &val);

Check warning on line 2803 in core/src/gl/ogl_render_device.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/gl/ogl_render_device.cpp#L2803

Added line #L2803 was not covered by tests
return static_cast<int>(val);
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/io/glfw_window.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "glfw_window.hpp"

#include <glad/gl.h>
#include <glad/glad.h>

#include <cubos/core/log.hpp>
#include <cubos/core/reflection/external/cstring.hpp>
Expand Down Expand Up @@ -72,7 +72,7 @@

// Create OpenGL render device
glfwMakeContextCurrent(mHandle);
if (gladLoadGL(glfwGetProcAddress) == 0)
if (gladLoadGLLoader((GLADloadproc)glfwGetProcAddress) == 0)

Check warning on line 75 in core/src/io/glfw_window.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/io/glfw_window.cpp#L75

Added line #L75 was not covered by tests
{
CUBOS_CRITICAL("OpenGL loader failed");
abort();
Expand Down
1 change: 1 addition & 0 deletions engine/lib/stb_image
Submodule stb_image added at 5c340b
Loading
Loading