mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-24 07:43:57 -04:00
Code gardening
REVIEWED: Some early returns, avoid if possible REVIEWED: Some return variable names, for consistency, rename `success` to `result`
This commit is contained in:
@ -4647,14 +4647,14 @@ void rlUpdateShaderBuffer(unsigned int id, const void *data, unsigned int dataSi
|
||||
// Get SSBO buffer size
|
||||
unsigned int rlGetShaderBufferSize(unsigned int id)
|
||||
{
|
||||
unsigned int result = 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);
|
||||
return (size > 0)? (unsigned int)size : 0;
|
||||
#else
|
||||
return 0;
|
||||
if (size > 0) result = (unsigned int)size;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
// Read SSBO buffer data (GPU->CPU)
|
||||
|
||||
Reference in New Issue
Block a user