Skip to content

Commit

Permalink
fix(shader): Fix compilation error on non x86_64 platforms
Browse files Browse the repository at this point in the history
VERTEX_SHADER_SOURCE and FRAGMENT_SHADER_SOURCE are `CStr`, which is based
on the arch dependant `char *`. This causes a compilation error on non
x86_64 platforms. This commit fixes the issue by using `c_char` instead.

Rework of #87.
  • Loading branch information
danyspin97 committed Nov 22, 2024
1 parent 0980129 commit 725ef7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.1
## Bug fixes
- Fix build on non x86_64 architectures

# 1.1.0

## Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/render/shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use super::gl;
pub unsafe fn create_shader(
gl: &gl::Gl,
shader: gl::types::GLenum,
sources: &[*const i8],
sources: &[*const std::ffi::c_char],
) -> Result<gl::types::GLuint> {
let shader = gl.CreateShader(shader);
gl_check!(gl, "calling CreateShader");
Expand Down

0 comments on commit 725ef7d

Please sign in to comment.