Fixes for android

This commit is contained in:
2024-12-24 23:10:32 +01:00
parent 9985871748
commit e106741bd5
4 changed files with 35 additions and 70 deletions

View File

@@ -113,8 +113,8 @@ void BackGround::drawSun()
void BackGround::drawMounten(size_t mountenSegments, int min, int max, Color color, float scale)
{
int x = 0;
int diff = canvasSize / (mountenSegments - 1);
float x = 0;
float diff = (float)canvasSize / (mountenSegments - 1);
float ny = mrand::getFloat(&mountenSeed);
float nz = mrand::getFloat(&mountenSeed);

View File

@@ -18,7 +18,7 @@ int Circle::colorLoc;
void Circle::init()
{
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
shader = LoadShaderFromMemory(0, (const char *)shaders_sun_100_fs);
shader = LoadShaderFromMemory(0, sun_shader_100);
#else
shader = LoadShaderFromMemory(0, (const char *)shaders_sun_330_fs);
#endif

View File

@@ -48,8 +48,9 @@ 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);
Circle::setColor(color);
Circle::draw(point.x, point.y, thick); // TODO Change to BeginShaderMode and EndShaderMode only onece
DrawCircleV(point, thick, color); // Fester on the phone to call DrawCircle insted of the Circle shader
// Circle::setColor(color);
// Circle::draw(point.x, point.y, thick); // TODO Change to BeginShaderMode and EndShaderMode only onece
}
return end;
}