Vladimír Vondruš
39a313a357
Brought debug facilities from Corrade::Utility to Magnum namespace.
...
These classes are used so frequently that it is counterproductive to not
have them here.
14 years ago
Vladimír Vondruš
54a2c47408
Create and delete shaders and programs only on construction/destruction.
...
Also inlined some simple functions, updated documentation.
14 years ago
Vladimír Vondruš
43c0016ed3
Move semantic for Shader class.
...
The class is now created always on the stack, so the user doesn't have
to delete it explicitly. It's now possible to write less verbose
shader code, instead of three lines before:
Shader* s = Shader::fromFile(Shader::Fragment, "Shader.frag");
attachShader(s);
// ...
delete s;
It's now only one:
attachShader(Shader::fromFile(Shader::Fragment, "Shader.frag"));
14 years ago
Vladimír Vondruš
2b7aa09520
Added some TODOs.
14 years ago
Vladimír Vondruš
64665872cc
Use CORRADE_ASSERT() instead of cassert and direct error output.
...
Unlike previous solution this can be compiled without any impact on
performance at all.
14 years ago
Vladimír Vondruš
49c809915f
Added function to bind fragment data locations.
14 years ago
Vladimír Vondruš
57ae567a36
Simplified attribute binding in AbstractShaderProgram.
...
Removed another old overdone code, the attributes are now bound
directly, without saving the data to some temporary location and then
binding everything at once in link().
14 years ago
Vladimír Vondruš
45200899ed
Assertion fail when user is doing something wrong with shaders.
...
Non-assertion-failing error switched to warning, as it is not fatal.
14 years ago
Vladimír Vondruš
d8943b898c
Use nullptr instead of 0 for pointers.
14 years ago
Vladimír Vondruš
8cc445d164
Using own Corrade::Debug class instead of cerr in Shaders.
...
Also improved and unified the messages and added messages when
uniformLocation() fails or attribute is bound after linking.
14 years ago
Vladimír Vondruš
b945f5f68b
Happy New Year.
15 years ago
Vladimír Vondruš
c7b331d100
(Ahem...) Happy New Year!
15 years ago
Vladimír Vondruš
1d5d4ddcb4
Renamed AbstractShaderProgram::{load -> attach}Shader().
16 years ago
Vladimír Vondruš
3444f62638
Classes for compiling and using shaders.
16 years ago