Game_Re_creation_Project
Member
Is it possible to draw a shape built from vertices, say, a circle, as an outline similar to
The following code works to draw an outline but it uses
Might there be a way to use pr_linestrip to render a line between only two vertices in a vertex buffer?
draw_circle(x,y,outline)
where outline = true
without using a shader? I can't seem to locate a solution. If I render the vertices using pr_linestrip
the lines connecting to the radial vertex are also drawn (as they should be).The following code works to draw an outline but it uses
draw_primitive_begin()
and its related functions, an approach which is undesirable in this case.
GML:
var _steps = 20;
var _xx = 50;
var _yy = 50;
var _radius = 30;
draw_primitive_begin(pr_linestrip);
//draw_vertex_color(_xx, _yy,c_white,1.0);
for(var i = 0; i <= _steps; ++i;)
{
draw_vertex_color(_xx + lengthdir_x(_radius, 360 * i / _steps), _yy + lengthdir_y(_radius, 360 * i / _steps), c_white,1.0);
//For a psychedelic experience, comment out the above draw_vertex call and uncomment the below draw_vertex call. Also, change the draw_primitive_begin() render method to pr_trianglefan
//To make it look like a crazy, magic vortex, uncomment the initial draw_vertex_color(_xx, _yy,c_white,1.0) call.
//Do this at your own risk. lol
//draw_vertex_color(_xx + lengthdir_x(_radius, 360 * i / _steps), _yy + lengthdir_y(_radius, 360 * i / _steps), make_color_rgb(random(255),random(255),random(255)),1.0);
}
draw_primitive_end();