Change from DrawCircleV to Circle::draw
This commit is contained in:
parent
6661a71271
commit
8d4562edf6
@ -22,6 +22,7 @@ void BackGround::deinit()
|
||||
|
||||
void BackGround::draw(Dna *dna)
|
||||
{
|
||||
Circle::setSoftEdge(true);
|
||||
m_dna = dna;
|
||||
mountenSeed = dna->mountenSeed;
|
||||
starSeed = dna->starSeed;
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include <cmath>
|
||||
|
||||
#include "canvas/Tree.hpp"
|
||||
#include "canvas/Circle.hpp"
|
||||
#include "Math.hpp"
|
||||
|
||||
#include <raylib.h>
|
||||
#include <raymath.h>
|
||||
#include "canvas/Tree.hpp"
|
||||
#include "Math.hpp"
|
||||
|
||||
// Public
|
||||
void Tree::init(int size)
|
||||
@ -14,6 +17,8 @@ void Tree::init(int size)
|
||||
|
||||
void Tree::draw(Dna *dna)
|
||||
{
|
||||
Circle::setSoftEdge(false);
|
||||
|
||||
m_dna = dna;
|
||||
draw_calls.push_back({start, 0, (float)size / 4, 1});
|
||||
|
||||
@ -43,7 +48,8 @@ Vector2 Tree::drawLine()
|
||||
{
|
||||
Vector2 point = Vector2Lerp(arg.start, end, i);
|
||||
Color color = ColorLerp(m_dna->branches[arg.dep - 1].color, m_dna->branches[arg.dep].color, i);
|
||||
DrawCircleV(point, thick, color); // TODO Change to use shader
|
||||
Circle::setColor(color);
|
||||
Circle::draw(point.x, point.y, thick); // TODO Change to BeginShaderMode and EndShaderMode only onece
|
||||
}
|
||||
return end;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user