Framebuffer Class Referenceabstract

#include <Framebuffer.h>

Description

Contains a visual state.

The primary use of this is efficient communication between the Renderer and the Display. The Renderer needs something to write to when rendering and the Display needs something to read from when updating. Instead of having them coupled with each other, the Framebuffer allows for more flexibility of when each backend commits its action. It also allows for storing and maintaining multiple targets for rendering.

Public Types

enum  Type {
  RGBA_PixelArray,
  GLFBPacket,
  Unknown
}
 

Functions

bool Resize (int newW, int newH)
 
void * GetHandle ()
 
int Width ()
 
int Height ()
 
Type GetHandleType ()
 
virtual bool GetRawData (uint8_t *)=0
 
void SetFilteredHint (bool filter)
 
bool GetFilteredHint ()
 

Member Enumeration Documentation

enum Type
strong

Types refer to the internal class by which visual information is passed to the Display.

Enumerator
RGBA_PixelArray 

(uint8_t *) RGBA-ordered pixel array with no padding, matched to the dimensions given

GLFBPacket 

(GLRenderTarget **) A pointer to a pointer to a GLRenderTarget instance.

Unknown 

The framebuffer's data contents are unknown and should not be relied on.

Member Function Documentation

bool Resize ( int  newW,
int  newH 
)
inline

Resizes the framebuffer. Success is returned.

void* GetHandle ( )
inline

Returns the source data that reflects the framebuffer's data in the context of the implemented child. For example, on an OpenGL-variant backend, the handle is likely an OpenGL texture object id.

int Width ( )
inline

Returns the width of the framebuffer.

int Height ( )
inline

Returns the height of the framebuffer.

Type GetHandleType ( )
inline

Returns what type the handle refers to.

virtual bool GetRawData ( uint8_t *  )
pure virtual

returns a RGBF pixel reduction by setting the buffer given. if this isnt possible, false is returned. the buffer should be of size Width*Height*4. Note that on hardware-accelerated implementations, calling this could be very costly. Alpha color information is always 1.f

void SetFilteredHint ( bool  filter)
inline

Sets whether to interpret the Framebuffer's data in a filtered way.

It is not defined by Dynacoe as to exactly what this means, other than some sort of pixel interpolation to make the visual data smoother than otherwise. This is most applicable when using the Framebuffer where its natural size cannot be expressed (i.e. displaying the framebuffer visual on a system window of a different size). It should also be mentioned, that any module that utilizes the Framebuffer may choose to ignore the the filtered hint. As such, you should expect the filtered setting to be a purely cosmetic effect. The default is true.

bool GetFilteredHint ( )
inline

Returns whether to interpret the Framebuffer's data in a filtered way.

See SetFilteredHint().


The documentation for this class was generated from the following file:
  • /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Backends/Framebuffer/Framebuffer.h