|
Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
|
Graphical window. More...
#include <screen.hpp>
Public Member Functions | |
| screen (int width, int height) | |
| virtual | ~screen () |
| virtual void | update () |
| bool | wait_quit_event () |
| wait indefinitely for the next quit event More... | |
Public Member Functions inherited from rt::image | |
| image (int width, int height) | |
| image (const image &img) | |
| virtual | ~image () |
| virtual int | width () const |
| virtual int | height () const |
| virtual image | copy () const |
| virtual color | get_pixel (int x, int y) const |
| virtual void | set_pixel (int x, int y, const color &c) |
| virtual void | blit (image &dst, const rect &srcrect, int dstx, int dsty) const |
| virtual void | blit (image &dst, int dstx, int dsty) const |
| virtual void | draw_line (int x1, int y1, int x2, int y2, const color &c) |
| virtual void | draw_rect (int x1, int y1, int x2, int y2, const color &c) |
| virtual void | fill_rect (int x1, int y1, int x2, int y2, const color &c) |
Additional Inherited Members | |
Protected Member Functions inherited from rt::image | |
| image () | |
Protected Attributes inherited from rt::image | |
| SDL_Surface * | data |
Graphical window.
The screen class inherites from the image class in order to draw something on the screen. It also wraps the SDL initialization calls. Only one screen should be created. If a second screen instance is created, it gets attached to the first one and the width and height are ignored.
| rt::screen::screen | ( | int | width, |
| int | height | ||
| ) |
Main constructor, uses width and height.
|
virtual |
Destructor. Decrements the initialized counter and closes the screen only if it goes to 0.
|
virtual |
Flushes the buffer to the screen
| bool rt::screen::wait_quit_event | ( | ) |
wait indefinitely for the next quit event
1.8.15