Marbellous
Marbellous, a WebApp to generate paper marbling patterns.
Public Member Functions | Static Public Member Functions | Friends | List of all members
WGLContext Class Reference

Singleton representing the visible WebGL Context. More...

#include <WGLContext.hpp>

Collaboration diagram for WGLContext:
Collaboration graph

Public Member Functions

 WGLContext ()=delete
 
 WGLContext (WGLContext const &)=delete
 
void operator= (WGLContext const &)=delete
 
WGLContextoperator= (WGLContext &&)=delete
 
 WGLContext (WGLContext &&)=delete
 
void setDropRes (size_t x)
 Set the resolution for drop state. More...
 
size_t getDropRes ()
 Get the drop state resolution. More...
 
void setRakeRes (size_t x)
 Set the resolution for drop state. More...
 
size_t getRakeRes ()
 Get the drop state resolution. More...
 
void updateBGColor ()
 Update the BG color using Options singleton. More...
 

Static Public Member Functions

static WGLContext *const getContext ()
 get the current context. More...
 

Friends

void _initWGLContext (const char *canvasID, size_t x)
 < Friend function to use for initialization. More...
 

Detailed Description

Singleton representing the visible WebGL Context.

Needs to be initialized on start up by initBackend() function. Directly refers to the html5 canvas in the front end. Usage of a html5 canvas is the only assumption on the frontend.

Attention
Currently dropRes and rakeRes need to be the same.

Constructor & Destructor Documentation

◆ WGLContext() [1/3]

WGLContext::WGLContext ( )
delete

◆ WGLContext() [2/3]

WGLContext::WGLContext ( WGLContext const &  )
delete

◆ WGLContext() [3/3]

WGLContext::WGLContext ( WGLContext &&  )
delete

Member Function Documentation

◆ getContext()

WGLContext *const WGLContext::getContext ( )
static

get the current context.

Returns
Context pointer or NULL if not initialized.
Here is the caller graph for this function:

◆ getDropRes()

size_t WGLContext::getDropRes ( )

Get the drop state resolution.

Returns
Side lenth in pixels.
Here is the caller graph for this function:

◆ getRakeRes()

size_t WGLContext::getRakeRes ( )

Get the drop state resolution.

Returns
Side lenth in pixels.
Here is the caller graph for this function:

◆ operator=() [1/2]

WGLContext& WGLContext::operator= ( WGLContext &&  )
delete

◆ operator=() [2/2]

void WGLContext::operator= ( WGLContext const &  )
delete

◆ setDropRes()

void WGLContext::setDropRes ( size_t  x)

Set the resolution for drop state.

Parameters
xSide lenth in pixels.

◆ setRakeRes()

void WGLContext::setRakeRes ( size_t  x)

Set the resolution for drop state.

Parameters
xSide lenth in pixels.

◆ updateBGColor()

void WGLContext::updateBGColor ( )

Update the BG color using Options singleton.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ _initWGLContext

void _initWGLContext ( const char *  canvasID,
size_t  x 
)
friend

< Friend function to use for initialization.

Friend function of WGLContext

Parameters
canvasIDCSS identifier of the HTML5 canvas to use.
xResolution of the canvas will be set to x times x.

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