generated from sigonasr2/CProjectTemplate
Include alpha blending mode
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
42659cda91
commit
c049e41a5e
BIN
CProjectTemplate
BIN
CProjectTemplate
Binary file not shown.
7
main.cpp
7
main.cpp
@ -12,16 +12,17 @@ public:
|
|||||||
public:
|
public:
|
||||||
bool OnUserCreate() override
|
bool OnUserCreate() override
|
||||||
{
|
{
|
||||||
|
SetPixelMode(olc::Pixel::ALPHA);
|
||||||
// Called once at the start, so create things here
|
// Called once at the start, so create things here
|
||||||
|
for (int x = 0; x < ScreenWidth(); x++)
|
||||||
|
for (int y = 0; y < ScreenHeight(); y++)
|
||||||
|
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OnUserUpdate(float fElapsedTime) override
|
bool OnUserUpdate(float fElapsedTime) override
|
||||||
{
|
{
|
||||||
// called once per frame
|
// called once per frame
|
||||||
for (int x = 0; x < ScreenWidth(); x++)
|
|
||||||
for (int y = 0; y < ScreenHeight(); y++)
|
|
||||||
Draw(x, y, olc::Pixel(rand() % 255, rand() % 255, rand()% 255));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user