Esempio n. 1
0
File: ctx.c Progetto: cloudhead/px
void ctx_present(struct context *ctx)
{
	glBindFramebuffer(GL_FRAMEBUFFER, 0);

	gl_viewport(ctx->winw, ctx->winh);
	gl_clear(0.f, 0.f, 0.f, 1.f);

	if (ctx->hidpi)
		ctx_scale(ctx, 2, 2);

	framebuffer_draw(ctx->screen, ctx);
	glfwSwapBuffers(ctx->win);
}
Esempio n. 2
0
 void render_technique_ss::bind(void)
 {
     gl_bind_frame_buffer(GL_FRAMEBUFFER, m_frame_buffer);
     gl_viewport(0, 0, m_frame_width, m_frame_height);
     
     gl_disable(GL_DEPTH_TEST);
     material::get_cached_parameters()->m_is_depth_test = false;
     gl_depth_mask(GL_FALSE);
     material::get_cached_parameters()->m_is_depth_mask = false;
     gl_disable(GL_STENCIL_TEST);
     material::get_cached_parameters()->m_is_stencil_test = false;
     
     gl_clear_color(m_clear_color.r, m_clear_color.g, m_clear_color.b, m_clear_color.a);
     gl_clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     
     if(m_material->get_shader()->is_loaded() &&
        m_material->get_shader()->is_commited())
     {
         m_material->bind();
         m_quad->bind(m_material->get_shader()->get_guid(), m_material->get_shader()->get_attributes());
     }
 }
Esempio n. 3
0
void opengl_impl::draw() {
	gl_clear(GL_COLOR_BUFFER_BIT);
	gl_color_3f(1.0, 0.0, 0.0);
	draw_behavior(center_x, center_y, R, 1000);
	gl_flush();
}
Esempio n. 4
0
 void render_target::clear()
 {
     gl_clear_color(0.f, 0.f, 0.f, 1.f);
     gl_clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 }