mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 10:59:20 +02:00
A template defined in a module interface is instantiated in the importing unit, where its body's types must be complete. A declaration reaching the importer only through the interface's global module fragment is not enough for MSVC: cParser::operator>> uses std::stringstream, and every unit that parsed a float got an incomplete type. 526 headers across 161 units, derived from what each interface's template bodies actually name.
36 lines
660 B
C++
36 lines
660 B
C++
module;
|
|
#include <cstddef>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
export module eu07.gl.postfx;
|
|
import eu07.gl.shader;
|
|
import eu07.gl.vao;
|
|
import eu07.gl.framebuffer;
|
|
import eu07.model.texture;
|
|
|
|
export {
|
|
|
|
|
|
namespace gl
|
|
{
|
|
class postfx
|
|
{
|
|
private:
|
|
gl::program program;
|
|
static std::shared_ptr<gl::shader> vertex;
|
|
static std::shared_ptr<gl::vao> vao;
|
|
|
|
public:
|
|
postfx(const std::string &s);
|
|
postfx(const shader &s);
|
|
|
|
void attach();
|
|
void apply(opengl_texture &src, framebuffer *dst);
|
|
void apply(std::vector<opengl_texture*> src, framebuffer *dst);
|
|
};
|
|
}
|
|
|
|
} // export
|