CSD462::Viewport Class Reference

Draws buffered image data as texture. More...

`#include <viewport.h>`

## Public Member Functions

| Viewport (void)
| Constructor.
| ~Viewport (void)
| Destructor.
int | bind (char *buffer, size_t w, size_t h)
| Bind the viewport to a bitmap buffer. More...
void | update (void)
| Update the viewport.

## Detailed Description

Draws buffered image data as texture.

(Requires OpenGL core profile) The viewport currently draws a textured quad that fills up the context, with no respect to aspect ratio, etc. Need to make it respect certain constrains.

## Member Function Documentation

int CSD462::Viewport::bind | ( | char * | buffer,
|  | size_t | w,
|  | size_t | h
| ) |  |

Bind the viewport to a bitmap buffer.

Parameters

  buffer | buffer that holds the bitmap pixels
  w | width of the bitmap
  h | height of the bitmap

Returns
  0 if successful -1 if failed

The documentation for this class was generated from the following files:

- lib/viewport.h
- lib/viewport.cpp