Exemplo n.º 1
0
void xcursor_render(xcursor_t *data) {
	gs_effect_t *effect  = gs_get_effect();
	gs_eparam_t *image = gs_effect_get_param_by_name(effect, "image");
	gs_effect_set_texture(image, data->tex);

	gs_matrix_push();
	gs_matrix_translate3f(data->render_x, data->render_y, 0.0f);

	gs_enable_blending(True);
	gs_blend_function(GS_BLEND_ONE, GS_BLEND_INVSRCALPHA);
	gs_draw_sprite(data->tex, 0, 0, 0);

	gs_matrix_pop();
}
Exemplo n.º 2
0
void xcursor_render(xcursor_t *data) {
	/* TODO: why do i need effects ? */
	gs_effect_t effect  = gs_get_effect();
	gs_eparam_t image = gs_effect_get_param_by_name(effect, "image");

	gs_effect_set_texture(image, data->tex);

	gs_matrix_push();

	gs_matrix_translate3f(-data->pos_x, -data->pos_y, 0);

	gs_enable_blending(True);
	gs_blend_function(GS_BLEND_ONE, GS_BLEND_INVSRCALPHA);
	gs_draw_sprite(data->tex, 0, 0, 0);

	gs_matrix_pop();
}