GLVis  v4.2
Accurate and flexible finite element visualization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
gl3::GLDevice Class Referenceabstract

#include <renderer.hpp>

Inheritance diagram for gl3::GLDevice:
[legend]
Collaboration diagram for gl3::GLDevice:
[legend]

Public Types

enum  DeviceType { NO_DEVICE, FF_DEVICE, CORE_DEVICE }
 

Public Member Functions

virtual ~GLDevice ()=default
 
void detachTexture (int tex_unit)
 
void attachTexture (int tex_unit, int tex_id)
 
void enableBlend ()
 
void disableBlend ()
 
void enableDepthWrite ()
 
void disableDepthWrite ()
 
void setLineWidth (float w)
 
virtual void init ()
 
virtual DeviceType getType ()=0
 
void setViewport (GLsizei w, GLsizei h)
 
void getViewport (GLint(&vp)[4])
 
void setStaticColor (const std::array< float, 4 > &rgba)
 
virtual void setTransformMatrices (glm::mat4 model_view, glm::mat4 projection)
 
virtual void setNumLights (int i)=0
 
virtual void setMaterial (Material mat)=0
 
virtual void setPointLight (int i, Light lt)=0
 
virtual void setAmbientLight (const std::array< float, 4 > &amb)=0
 
virtual void setClipPlaneUse (bool enable)=0
 
virtual void setClipPlaneEqn (const std::array< double, 4 > &eqn)=0
 
virtual void bufferToDevice (array_layout layout, IVertexBuffer &buf)=0
 
virtual void bufferToDevice (array_layout layout, IIndexedBuffer &buf)=0
 
virtual void bufferToDevice (TextBuffer &t_buf)=0
 
virtual void drawDeviceBuffer (int hnd)=0
 
virtual void drawDeviceBuffer (const TextBuffer &t_buf)=0
 
virtual void initXfbMode ()
 
virtual void exitXfbMode ()
 
virtual void captureXfbBuffer (PaletteState &pal, CaptureBuffer &capture, int hnd)=0
 
void captureXfbBuffer (CaptureBuffer &capture, const TextBuffer &t_buf)
 

Static Public Member Functions

static bool useLegacyTextureFmts ()
 

Static Public Attributes

static const int SAMPLER_COLOR = 0
 
static const int SAMPLER_ALPHA = 1
 

Protected Attributes

int vp_width
 
int vp_height
 
glm::mat4 model_view_mtx
 
glm::mat4 proj_mtx
 
std::array< float, 4 > static_color
 
TextureHandle passthrough_texture
 

Detailed Description

Definition at line 97 of file renderer.hpp.

Member Enumeration Documentation

Enumerator
NO_DEVICE 
FF_DEVICE 
CORE_DEVICE 

Definition at line 112 of file renderer.hpp.

Constructor & Destructor Documentation

virtual gl3::GLDevice::~GLDevice ( )
virtualdefault

Member Function Documentation

void gl3::GLDevice::attachTexture ( int  tex_unit,
int  tex_id 
)
inline

Definition at line 128 of file renderer.hpp.

virtual void gl3::GLDevice::bufferToDevice ( array_layout  layout,
IVertexBuffer buf 
)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::bufferToDevice ( array_layout  layout,
IIndexedBuffer buf 
)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::bufferToDevice ( TextBuffer t_buf)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::captureXfbBuffer ( PaletteState pal,
CaptureBuffer capture,
int  hnd 
)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

void gl3::GLDevice::captureXfbBuffer ( CaptureBuffer capture,
const TextBuffer t_buf 
)

Definition at line 444 of file renderer.cpp.

void gl3::GLDevice::detachTexture ( int  tex_unit)
inline

Definition at line 123 of file renderer.hpp.

void gl3::GLDevice::disableBlend ( )
inline

Definition at line 139 of file renderer.hpp.

void gl3::GLDevice::disableDepthWrite ( )
inline

Definition at line 141 of file renderer.hpp.

virtual void gl3::GLDevice::drawDeviceBuffer ( int  hnd)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::drawDeviceBuffer ( const TextBuffer t_buf)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

void gl3::GLDevice::enableBlend ( )
inline

Definition at line 138 of file renderer.hpp.

void gl3::GLDevice::enableDepthWrite ( )
inline

Definition at line 140 of file renderer.hpp.

virtual void gl3::GLDevice::exitXfbMode ( )
inlinevirtual

Reimplemented in gl3::CoreGLDevice.

Definition at line 186 of file renderer.hpp.

virtual DeviceType gl3::GLDevice::getType ( )
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

void gl3::GLDevice::getViewport ( GLint(&)  vp[4])

Definition at line 431 of file renderer.cpp.

void gl3::GLDevice::init ( )
virtual

Reimplemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

Definition at line 397 of file renderer.cpp.

virtual void gl3::GLDevice::initXfbMode ( )
inlinevirtual

Reimplemented in gl3::CoreGLDevice.

Definition at line 184 of file renderer.hpp.

virtual void gl3::GLDevice::setAmbientLight ( const std::array< float, 4 > &  amb)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::setClipPlaneEqn ( const std::array< double, 4 > &  eqn)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::setClipPlaneUse ( bool  enable)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

void gl3::GLDevice::setLineWidth ( float  w)
inline

Definition at line 142 of file renderer.hpp.

virtual void gl3::GLDevice::setMaterial ( Material  mat)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::setNumLights ( int  i)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

virtual void gl3::GLDevice::setPointLight ( int  i,
Light  lt 
)
pure virtual

Implemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

void gl3::GLDevice::setStaticColor ( const std::array< float, 4 > &  rgba)
inline

Definition at line 151 of file renderer.hpp.

void gl3::GLDevice::setTransformMatrices ( glm::mat4  model_view,
glm::mat4  projection 
)
virtual

Reimplemented in gl3::CoreGLDevice, and gl3::FFGLDevice.

Definition at line 438 of file renderer.cpp.

void gl3::GLDevice::setViewport ( GLsizei  w,
GLsizei  h 
)

Definition at line 424 of file renderer.cpp.

bool gl3::GLDevice::useLegacyTextureFmts ( )
static

Definition at line 27 of file renderer.cpp.

Member Data Documentation

glm::mat4 gl3::GLDevice::model_view_mtx
protected

Definition at line 102 of file renderer.hpp.

TextureHandle gl3::GLDevice::passthrough_texture
protected

Definition at line 108 of file renderer.hpp.

glm::mat4 gl3::GLDevice::proj_mtx
protected

Definition at line 103 of file renderer.hpp.

const int gl3::GLDevice::SAMPLER_ALPHA = 1
static

Definition at line 121 of file renderer.hpp.

const int gl3::GLDevice::SAMPLER_COLOR = 0
static

Definition at line 120 of file renderer.hpp.

std::array<float, 4> gl3::GLDevice::static_color
protected

Definition at line 105 of file renderer.hpp.

int gl3::GLDevice::vp_height
protected

Definition at line 101 of file renderer.hpp.

int gl3::GLDevice::vp_width
protected

Definition at line 100 of file renderer.hpp.


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