OpenGL: draw area resize handle with new immediate mode
The little grabby handle in the corner of an area. Now uses 1 draw call instead of 6. Also one version of the (+) icon to show a hidden region. Why do we have multiple versions of this? Fixed a harmless signed/unsigned error. Fixed a GL state error that prematurely disabled blending. Added imm_draw_filled_circle function, which can be used for drawing other widgets. Work toward T49042 and T49043
This commit is contained in:
@@ -81,10 +81,8 @@ void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments
|
||||
void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments);
|
||||
|
||||
/**
|
||||
* Draw a circle outline with the given \a radius,
|
||||
* starting at angle \a start and arcing through
|
||||
* \a angle. The circle is centered at \a x, \a y
|
||||
* and drawn in the XY plane.
|
||||
* Draw a circle outline with the given \a radius.
|
||||
* The circle is centered at \a x, \a y and drawn in the XY plane.
|
||||
*
|
||||
* \param pos The vertex attribute number for position.
|
||||
* \param x Horizontal center.
|
||||
@@ -94,6 +92,18 @@ void glutil_draw_filled_arc(float start, float angle, float radius, int nsegment
|
||||
*/
|
||||
void imm_draw_lined_circle(unsigned pos, float x, float y, float radius, int nsegments);
|
||||
|
||||
/**
|
||||
* Draw a filled circle with the given \a radius.
|
||||
* The circle is centered at \a x, \a y and drawn in the XY plane.
|
||||
*
|
||||
* \param pos The vertex attribute number for position.
|
||||
* \param x Horizontal center.
|
||||
* \param y Vertical center.
|
||||
* \param radius The circle's radius.
|
||||
* \param nsegments The number of segments to use in drawing (more = smoother).
|
||||
*/
|
||||
void imm_draw_filled_circle(unsigned pos, float x, float y, float radius, int nsegments);
|
||||
|
||||
/**
|
||||
* Returns a float value as obtained by glGetFloatv.
|
||||
* The param must cause only one value to be gotten from GL.
|
||||
|
||||
Reference in New Issue
Block a user