#include "color.h"
#include "colorcurve.h"
#include "mesh.h"
+#include "renderer.h"
#include "shader.h"
#include "texture2d.h"
curve.storage(LUMINANCE, 256);
curve.set_min_filter(LINEAR);
curve.set_wrap(CLAMP_TO_EDGE);
+ texturing.attach(1, curve);
set_peak(0.2);
set_brightness(1.5);
curve.image(0, LUMINANCE, UNSIGNED_BYTE, curve_data);
}
-void ColorCurve::render(const Texture2D &color_buf, const Texture2D &)
+void ColorCurve::render(Renderer &renderer, const Texture2D &color_buf, const Texture2D &)
{
- Bind _bind_shader(shprog);
- shdata.apply();
- Bind _bind_mesh(quad);
- Bind _bind_tex(color_buf);
- Bind _bind_curve(curve, 1);
- quad.draw();
+ texturing.attach(0, color_buf);
+
+ Renderer::Push push(renderer);
+ renderer.set_shader_program(&shprog, &shdata);
+ renderer.set_texturing(&texturing);
+ quad.draw(renderer);
}
} // namespace GL