示例#1
0
void graphics_quit()
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_exec_op(KISS_CLOSE_WINDOW, 0, 0);
	kiss_unlock();
}
示例#2
0
int graphics_init(int width, int height)
{
	if(!kiss_init())
		return 0;

	kiss_lock();
	kiss_exec_op(KISS_OPEN_WINDOW, width, height);
	kiss_unlock();
	return 1;
}
示例#3
0
void graphics_update()
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	kiss_exec_op(KISS_COPY, 0, 0);
	kiss_graphics_unlock();
	kiss_unlock();
}
示例#4
0
void graphics_line(int x1, int y1, int x2, int y2, int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_line(x1, y1, x2, y2, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
示例#5
0
void graphics_pixel(int x, int y, int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_pixel(x, y, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
示例#6
0
void graphics_triangle_fill(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b)
{
	if(!kiss_init())
		return;
		
	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_triangle_fill(x1, y1, x2, y2, x3, y3, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
示例#7
0
void graphics_circle(int cx, int cy, int radius, int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_circle(cx, cy, radius, r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();
}
示例#8
0
void graphics_fill(int r, int g, int b)
{
	if(!kiss_init())
		return;

	kiss_lock();
	kiss_graphics_lock();
	if(kiss_g_graphics_enabled)
		kiss_graphics_fill(r, g, b);
	kiss_graphics_unlock();
	kiss_unlock();

}
示例#9
0
文件: kiss.c 项目: kipr/libkiss
void kiss_terminate()
{
	kiss_lock();
	kiss_g_glfw_quit = 1;
	while(kiss_g_glfw_quit);
}