2017-04-05 10:30:14 +02:00
|
|
|
/*
|
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file GPU_immediate_util.h
|
|
|
|
* \ingroup gpu
|
|
|
|
*
|
|
|
|
* Utility drawing functions (rough equivalent to OpenGL's GLU)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GPU_IMMEDIATE_UTIL_H__
|
|
|
|
#define __GPU_IMMEDIATE_UTIL_H__
|
|
|
|
|
2017-09-13 16:39:28 +02:00
|
|
|
void imm_cpack(uint x);
|
2017-04-05 10:30:14 +02:00
|
|
|
|
2017-09-13 16:39:28 +02:00
|
|
|
void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float radius, int nsegments);
|
|
|
|
void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float radius, int nsegments);
|
2017-04-05 10:30:14 +02:00
|
|
|
|
2017-09-13 17:36:23 +02:00
|
|
|
void imm_draw_circle_wire_aspect_2d(uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments);
|
|
|
|
void imm_draw_circle_fill_aspect_2d(uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments);
|
|
|
|
|
2017-06-19 12:18:04 +02:00
|
|
|
/* use this version when Gwn_VertFormat has a vec3 position */
|
2017-09-13 16:39:28 +02:00
|
|
|
void imm_draw_circle_wire_3d(uint pos, float x, float y, float radius, int nsegments);
|
|
|
|
void imm_draw_circle_fill_3d(uint pos, float x, float y, float radius, int nsegments);
|
2017-04-05 10:30:14 +02:00
|
|
|
|
2017-09-13 16:39:28 +02:00
|
|
|
void imm_draw_disk_partial_fill_2d(
|
|
|
|
uint pos, float x, float y,
|
2017-04-05 10:30:14 +02:00
|
|
|
float radius_inner, float radius_outer, int nsegments, float start, float sweep);
|
|
|
|
|
2017-09-26 07:21:01 +02:00
|
|
|
void imm_draw_box_wire_2d(uint pos, float x1, float y1, float x2, float y2);
|
|
|
|
void imm_draw_box_wire_3d(uint pos, float x1, float y1, float x2, float y2);
|
2017-04-05 10:30:14 +02:00
|
|
|
|
2017-09-26 07:21:01 +02:00
|
|
|
void imm_draw_box_checker_2d(float x1, float y1, float x2, float y2);
|
2017-04-05 10:30:14 +02:00
|
|
|
|
2017-09-26 09:51:47 +02:00
|
|
|
void imm_draw_cube_fill_3d(uint pos, const float co[3], const float aspect[3]);
|
|
|
|
void imm_draw_cube_wire_3d(uint pos, const float co[3], const float aspect[3]);
|
|
|
|
|
2017-04-05 10:30:14 +02:00
|
|
|
void imm_draw_cylinder_fill_normal_3d(
|
2017-09-13 16:39:28 +02:00
|
|
|
uint pos, uint nor, float base, float top, float height,
|
2017-04-05 10:30:14 +02:00
|
|
|
int slices, int stacks);
|
|
|
|
void imm_draw_cylinder_wire_3d(
|
2017-09-13 16:39:28 +02:00
|
|
|
uint pos, float base, float top, float height,
|
2017-04-05 10:30:14 +02:00
|
|
|
int slices, int stacks);
|
|
|
|
void imm_draw_cylinder_fill_3d(
|
2017-09-13 16:39:28 +02:00
|
|
|
uint pos, float base, float top, float height,
|
2017-04-05 10:30:14 +02:00
|
|
|
int slices, int stacks);
|
|
|
|
|
|
|
|
#endif /* __GPU_IMMEDIATE_UTIL_H__ */
|