sigonasr2 c049e41a5e Include alpha blending mode
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
2022-08-21 22:19:06 -05:00

38 lines
653 B
C++

#define OLC_PGE_APPLICATION
#include "pixelGameEngine.h"
class Example : public olc::PixelGameEngine
{
public:
Example()
{
sAppName = "Example";
}
public:
bool OnUserCreate() override
{
SetPixelMode(olc::Pixel::ALPHA);
// 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;
}
bool OnUserUpdate(float fElapsedTime) override
{
// called once per frame
return true;
}
};
int main()
{
Example demo;
if (demo.Construct(256, 240, 4, 4))
demo.Start();
return 0;
}