Skip to content

Commit

Permalink
rlgl.h: glint64 did not exist before OpenGL 3.2 (#4284)
Browse files Browse the repository at this point in the history
Compilation breaks on rlgl.h for early OpenGL versions.
Glint64 did not exist on those versions (< OpenGL 3.2)
  • Loading branch information
Tchan0 authored Aug 24, 2024
1 parent 0c06a08 commit d314afc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rlgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4414,14 +4414,14 @@ void rlUpdateShaderBuffer(unsigned int id, const void *data, unsigned int dataSi
// Get SSBO buffer size
unsigned int rlGetShaderBufferSize(unsigned int id)
{
GLint64 size = 0;

#if defined(GRAPHICS_API_OPENGL_43)
GLint64 size = 0;
glBindBuffer(GL_SHADER_STORAGE_BUFFER, id);
glGetBufferParameteri64v(GL_SHADER_STORAGE_BUFFER, GL_BUFFER_SIZE, &size);
#endif

return (size > 0)? (unsigned int)size : 0;
#else
return 0;
#endif
}

// Read SSBO buffer data (GPU->CPU)
Expand Down

0 comments on commit d314afc

Please sign in to comment.