Relative Content

Tag Archive for c++openglbox2d

Line rendering in OpenGL not drawing interior vertices

I’m trying to make a function for displaying the vertices of a custom b2Body shape (I am using Box2D and am trying to display the Box2D colliders) and this is the function I’m using. It renders lines and points to denote where the vertices in the b2Body shape are. But it doesn’t render vertices in the “interior” of the shape, meaning that if a vertex is closer to the center than two other vertices then it only renders a line between those two vertices and not the vertex which is “inside”. So, how do I render the interior of the shape? If you’re wondering, my line vertex shader is just three mat4s, and fragment shader is just one color, very simple.