26 lines
460 B
C++
26 lines
460 B
C++
#include <raylib.h>
|
|
|
|
class Sun
|
|
{
|
|
public:
|
|
Sun() = default;
|
|
~Sun() = default;
|
|
void init();
|
|
void deinit();
|
|
void draw(float x, float y, float size);
|
|
private:
|
|
const int sizeTexute = 250;
|
|
RenderTexture2D target = { 0 };
|
|
Shader shader = { 0 };
|
|
|
|
float sun_radius = 0.60f;
|
|
float start_transperency = 0.40f;
|
|
float c[3] = { 240.0f / 255.0f, 240.0f / 255.0f, 190.0f / 255.0f };
|
|
|
|
int sun_radius_loc = 0;
|
|
int start_transperency_loc = 0;
|
|
int colorLoc = 0;
|
|
};
|
|
|
|
|