This repository has been archived on 2019-09-17. You can view files and clone it, but cannot push or open issues or pull requests.
Files
research-project/src/fmri/Drawable.cpp
Bert Peters 265bc61b98 Large refactor of texture loading.
In this new implementation, everything is loaded on a separate thread,
but the textures are initialized on the main OpenGL thread.

This is all to work around the fact that you cannot create a separate
GL context in GLUT.
2018-04-12 16:52:09 +02:00

22 lines
412 B
C++

#include "Drawable.hpp"
void fmri::Drawable::patchTransparancy()
{
if constexpr (std::tuple_size<Color>::value < 4) {
// Not compiling with alpha support
return;
}
const auto alpha = getAlpha();
const auto end = colorBuffer.end();
for (auto it = colorBuffer.begin(); it != end; ++it) {
(*it)[3] = alpha;
}
}
void fmri::Drawable::glLoad()
{
// Do nothing
}