mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Added OpenGL ES support for the 'none' line join mode.
--HG-- branch : minor
This commit is contained in:
@@ -43,12 +43,13 @@ namespace opengl
|
||||
class Polyline
|
||||
{
|
||||
public:
|
||||
Polyline(GLenum mode = GL_TRIANGLE_STRIP)
|
||||
Polyline(GLenum mode = GL_TRIANGLE_STRIP, bool quadindices = false)
|
||||
: vertices(NULL)
|
||||
, overdraw(NULL)
|
||||
, vertex_count(0)
|
||||
, overdraw_vertex_count(0)
|
||||
, draw_mode(mode)
|
||||
, use_quad_indices(quadindices)
|
||||
{}
|
||||
virtual ~Polyline();
|
||||
|
||||
@@ -90,6 +91,7 @@ protected:
|
||||
size_t vertex_count;
|
||||
size_t overdraw_vertex_count;
|
||||
GLenum draw_mode;
|
||||
bool use_quad_indices;
|
||||
|
||||
}; // Polyline
|
||||
|
||||
@@ -102,7 +104,7 @@ class NoneJoinPolyline : public Polyline
|
||||
{
|
||||
public:
|
||||
NoneJoinPolyline()
|
||||
: Polyline(GL_QUADS)
|
||||
: Polyline(GL_TRIANGLES, true)
|
||||
{}
|
||||
|
||||
void render(const float *vertices, size_t count, float halfwidth, float pixel_size, bool draw_overdraw)
|
||||
|
||||
Reference in New Issue
Block a user