some clean up

This commit is contained in:
Hartmut Seichter 2023-07-01 23:00:22 +02:00
parent c33211182a
commit 923de89964
2 changed files with 19 additions and 4 deletions

View file

@ -1,6 +1,6 @@
# ParadisSO - a minimal 2D graphics engine
**ParadiSO** was conceived as a heavily stripped down version of my pixwerx engine. It is a minimalistic 2D graphics engine for educational purposes. It uses modern C++ and a datadriven design, but no ECS.
**ParadiSO** was conceived as a heavily stripped down 2D version of my `pixwerx` engine. *ParadiSO* mimics a minimalistic approach to 2D graphics for educational purposes. It uses modern C++ and a data-driven design, but no ECS.
## Educational
@ -10,4 +10,16 @@ Some arguments for its educational side:
* heavily inspired by Rust code
* math code is eager evaluation but `constexpr` to compensate overheads
* hides old-style `C` APIs behind a renovated facade
* it leans heavily on the STL and its algorithms
* it leans heavily on the STL and its algorithms
## Minimal
Because this engine should show some patterns and design concepts it tries to avoid adding unnecessary bloat.
## Dependencies
ParadiSO comes with batteries included. However, it should be mentioned here:
* [GLFW 3.3.8](https://github.com/glfw/glfw)
* [GLAD](https://github.com/Dav1dde/glad)

View file

@ -148,14 +148,17 @@ struct Shader::impl {
// potentially the GL driver hasn't been loaded
if (is_valid()) {
// deleting and detaching should happen much earlier
// detach first
for (auto s : _shader_stages) {
glDetachShader(_shader_program, s);
}
// deleting
for (auto s : _shader_stages) {
glDeleteShader(s);
}
// only program needs to be deleted
glDeleteProgram(_shader_program);
}
}