msqrt / shader-printf Goto Github PK
View Code? Open in Web Editor NEWSimple printf functionality for GLSL.
License: MIT License
Simple printf functionality for GLSL.
License: MIT License
On line 52:
glGetProgramResourceiv(program, GL_SHADER_STORAGE_BLOCK, glGetProgramResourceIndex(program, GL_SHADER_STORAGE_BLOCK, "printfBuffer"), 1, &prop, sizeof(binding), nullptr, &binding);
sizeof(binding)
is wrong, it should just be 1
.
See https://www.khronos.org/opengl/wiki/Example_Code#Program_introspection for proper example usage. See KhronosGroup/OpenGL-API#52 about this confusing naming.
shader-printf/shader-printf/shaderprintf.h
Line 201 in e74046e
shader-printf/shader-printf/shaderprintf.h:219:48: error: ‘max’ was not declared in this scope
219 | if (extension != std::string::npos) version = max(extension, version);
A simple fix would be to use std::max()
instead.
shader-printf/shader-printf/shaderprintf.h
Line 212 in e74046e
bufferInsertOffset
should be after the '\n'
. Then compiler errors work in my environment.shader-printf/shader-printf/shaderprintf.h
Line 225 in e74046e
shader-printf/shader-printf/shaderprintf.h
Line 185 in e74046e
And thus issues a warning when the gcc compiler option -Wshadow
is enabled:
shader-printf/shader-printf/shaderprintf.h:246:8: warning: declaration of ‘inString’ shadows a previous local [-Wshadow]
A simple fix would be to insert curly braces {}
around line 183 to 196.
This project is awesome, but I'm unsure if I'm allowed to use its code or not in my own projects because there's no apparent license on it.
If you'd like others to use this library, could you clarify its license? A LICENSE or COPYING file in the repository and/or a copyright + license inline in the shaderprintf.h header would do :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.