Blame c++/contourgl/clrender.h

572d9c
/*
572d9c
    ......... 2015 Ivan Mahonin
572d9c
572d9c
    This program is free software: you can redistribute it and/or modify
572d9c
    it under the terms of the GNU General Public License as published by
572d9c
    the Free Software Foundation, either version 3 of the License, or
572d9c
    (at your option) any later version.
572d9c
572d9c
    This program is distributed in the hope that it will be useful,
572d9c
    but WITHOUT ANY WARRANTY; without even the implied warranty of
572d9c
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
572d9c
    GNU General Public License for more details.
572d9c
572d9c
    You should have received a copy of the GNU General Public License
572d9c
    along with this program.  If not, see <http: licenses="" www.gnu.org="">.</http:>
572d9c
*/
572d9c
572d9c
#ifndef _RASTERIZER_H_
572d9c
#define _RASTERIZER_H_
572d9c
572d9c
#include <vector></vector>
572d9c
572d9c
#include "clcontext.h"
572d9c
#include "geometry.h"
572d9c
#include "contour.h"
572d9c
#include "swrender.h"
572d9c
572d9c
572d9c
class ClRender {
f83e6b
private:
572d9c
	ClContext &cl;
f83e6b
	cl_program contour_program;
013f0c
	cl_kernel contour_draw_kernel;
2517eb
	size_t contour_draw_workgroup_size;
f83e6b
f83e6b
	Surface *surface;
013f0c
	cl_mem paths_buffer;
f83e6b
	cl_mem mark_buffer;
67876c
	cl_mem surface_image;
028154
	cl_event prev_event;
572d9c
f83e6b
public:
572d9c
	ClRender(ClContext &cl);
572d9c
	~ClRender();
572d9c
f83e6b
	void send_surface(Surface *surface);
f83e6b
	Surface* receive_surface();
013f0c
	void send_paths(const void *paths, int size);
2517eb
	void remove_paths();
013f0c
	void draw();
c7fa36
	void wait();
572d9c
};
572d9c
572d9c
572d9c
#endif