{
occlude_shader.attach_shader(get_fullscreen_vertex_shader());
occlude_shader.attach_shader_owned(new FragmentShader(occlude_fs));
+ occlude_shader.bind_attribute(get_component_type(VERTEX2), "vertex");
occlude_shader.link();
combine_shader.attach_shader(get_fullscreen_vertex_shader());
combine_shader.attach_shader_owned(new FragmentShader(combine_fs));
+ combine_shader.bind_attribute(get_component_type(VERTEX2), "vertex");
combine_shader.link();
occlusion.storage(RGB, w, h);
BindRestore unbind_dtest(static_cast<DepthTest *>(0));
BindRestore unbind_blend(static_cast<Blend *>(0));
+ Bind bind_mesh(quad);
{
BindRestore bind_fbo(fbo);
{
blur_shader.attach_shader(get_fullscreen_vertex_shader());
blur_shader.attach_shader_owned(new FragmentShader(blur_fs));
+ blur_shader.bind_attribute(get_component_type(VERTEX2), "vertex");
blur_shader.link();
combine_shader.attach_shader(get_fullscreen_vertex_shader());
combine_shader.attach_shader_owned(new FragmentShader(combine_fs));
+ combine_shader.bind_attribute(get_component_type(VERTEX2), "vertex");
combine_shader.link();
blur_shdata[0].uniform("delta", 1.0f/w, 0.0f);
{
BindRestore unbind_dtest(static_cast<DepthTest *>(0));
BindRestore unbind_blend(static_cast<Blend *>(0));
+ Bind bind_mesh(quad);
{
Bind bind_shader(blur_shader);
{
shprog.attach_shader(get_fullscreen_vertex_shader());
shprog.attach_shader_owned(new FragmentShader(fragment_src));
+ shprog.bind_attribute(get_component_type(VERTEX2), "vertex");
shprog.link();
shdata.uniform("texture", 0);
{
Bind _bind_shader(shprog);
shdata.apply();
+ Bind _bind_mesh(quad);
Bind _bind_tex(color_buf);
Bind _bind_curve(curve, 1);
quad.draw();
namespace {
const char fullscreen_vs_source[] =
+ "attribute vec4 vertex;\n"
"varying vec2 texcoord;\n"
"void main()\n"
"{\n"
- " gl_Position = gl_Vertex;\n"
- " texcoord = gl_Vertex.xy*0.5+0.5;\n"
+ " gl_Position = vertex;\n"
+ " texcoord = vertex.xy*0.5+0.5;\n"
"}\n";
}