Replace GLRenderer * in GLBloomFilter with GLRenderer &

This commit is contained in:
yvt 2019-07-26 22:47:01 +09:00
parent 5c8ea3a861
commit 8e23ef08d0
No known key found for this signature in database
GPG Key ID: 48F2768FA8D07C92
2 changed files with 6 additions and 6 deletions

View File

@ -32,8 +32,8 @@
namespace spades {
namespace draw {
GLBloomFilter::GLBloomFilter(GLRenderer *renderer) : renderer(renderer) {
thru = renderer->RegisterProgram("Shaders/PostFilters/PassThrough.program");
GLBloomFilter::GLBloomFilter(GLRenderer &renderer) : renderer(renderer) {
thru = renderer.RegisterProgram("Shaders/PostFilters/PassThrough.program");
}
#define Level BloomLevel
@ -48,7 +48,7 @@ namespace spades {
std::vector<Level> levels;
IGLDevice &dev = renderer->GetGLDevice();
IGLDevice &dev = renderer.GetGLDevice();
GLQuadRenderer qr(dev);
static GLProgramAttribute thruPosition("positionAttribute");
@ -61,7 +61,7 @@ namespace spades {
thruTexture(thru);
thruTexCoordRange(thru);
GLProgram *gammaMix = renderer->RegisterProgram("Shaders/PostFilters/GammaMix.program");
GLProgram *gammaMix = renderer.RegisterProgram("Shaders/PostFilters/GammaMix.program");
static GLProgramAttribute gammaMixPosition("positionAttribute");
static GLProgramUniform gammaMixTexture1("texture1");
static GLProgramUniform gammaMixTexture2("texture2");

View File

@ -29,10 +29,10 @@ namespace spades {
class GLBloomFilter {
GLProgram *thru;
GLRenderer *renderer;
GLRenderer &renderer;
public:
GLBloomFilter(GLRenderer *);
GLBloomFilter(GLRenderer &);
GLColorBuffer Filter(GLColorBuffer);
};
}