Graphics (Chili Framework)
This class takes care of all the Direct3D setup bullshit and provides an interface to the graphical output of the application. Use
Graphics to draw on the screen, anything you like, even dicks (especially dicks).
PutPixel() is generally how this is gone about, although later on more sophisticated dick-drawing routines are created based on
PutPixel(). You can also use
Graphics::ScreenWidth etc. to make sure you keep your dicks inside the screen boundaries.
void Graphics::PutPixel(int x,int y,int r,int g,int b)
void Graphics::PutPixel(int x,int y,Color c)
This little function lets you set the color any pixel on the screen (actually streamer, it sets the pixels in a buffer residing in system memory, which then is copied to a texture in graphics memory and drawn to the backbuffer, which is subsequently presented to a region of the screen corresponding to the client area of the application window YEAH OKAY FUCK OFF NOW), which means you can pretty much create any image you want with this function, even Teletubbie porn.
As you might expect,
y specify the coordinates on the screen ((0,0) being the top left, (width-1,height-1) being the bottom right), and
b specify the color (0 being lowest and 255 being highest). If you try and draw outside of the screen space, you might get F'ed in the A. So don't do that.
static constexpr unsigned int Graphics::ScreenWidth = 1280u
static constexpr unsigned int Graphics::ScreenHeight = 720u
These values tell you the maximum size dick you can draw on the screen. Since they are
static members, you can access them with, for example,
Graphics::ScreenWidth (you can do
gfx.ScreenWidth too if you really wanna). Changing the default values from 1280 and 720 to something different will make the window larger or smaller depending on the values. Neato!
- The Chili Framework