Exemplo n.º 1
0
void Canvas::fill_triangles(const std::vector<Vec2f> &positions, const std::vector<Vec2f> &texture_positions, const Texture2D &texture, const std::vector<Colorf> &colors)
{
	if (!positions.empty())
	{
		RenderBatchTriangle *batcher = impl->batcher.get_triangle_batcher();
		batcher->fill_triangles(*this, &positions[0], &texture_positions[0], positions.size(), texture, &colors[0]);
	}
}
Exemplo n.º 2
0
void Canvas::fill_triangles(const Vec2f *triangle_positions, int num_vertices, const Texture2D &texture, const Rect &texture_rect, const Colorf &color)
{
	if (num_vertices)
	{
		std::vector<Vec2f> texture_positions;
		Canvas_Impl::get_texture_coords(triangle_positions, num_vertices, texture, texture_rect, texture_positions);

		RenderBatchTriangle *batcher = impl->batcher.get_triangle_batcher();
		batcher->fill_triangles(*this, triangle_positions, &texture_positions[0], num_vertices, texture, color);
	}
}
Exemplo n.º 3
0
void Canvas::fill_triangles(const std::vector<Vec2f> &positions, const Texture2D &texture, const Rect &texture_rect, const Colorf &color)
{
	if (!positions.empty())
	{
		std::vector<Vec2f> texture_positions;
		Canvas_Impl::get_texture_coords(&positions[0], positions.size(), texture, texture_rect, texture_positions);

		RenderBatchTriangle *batcher = impl->batcher.get_triangle_batcher();
		batcher->fill_triangles(*this, &positions[0], &texture_positions[0], positions.size(), texture, color);
	}
}
Exemplo n.º 4
0
void Canvas::fill_triangles(const Vec2f *positions, const Vec2f *texture_positions, int num_vertices, const Texture2D &texture, const Colorf *colors)
{
	RenderBatchTriangle *batcher = impl->batcher.get_triangle_batcher();
	batcher->fill_triangles(*this, positions, texture_positions, num_vertices, texture, colors);
}