LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenGLProgram Class Reference

#include <program.hxx>

Public Member Functions

 OpenGLProgram ()
 ~OpenGLProgram ()
GLuint Id ()
bool Load (const OUString &rVertexShader, const OUString &rFragmentShader, const OString &preamble, const OString &rDigest)
void Use ()
void Reuse ()
void Clean ()
void SetVertices (const GLvoid *pData)
void SetTextureCoord (const GLvoid *pData)
void SetAlphaCoord (const GLvoid *pData)
void SetMaskCoord (const GLvoid *pData)
void SetExtrusionVectors (const GLvoid *pData)
void SetVertexColors (std::vector< GLubyte > &rColorVector)
void SetUniform1f (const OString &rName, GLfloat v1)
void SetUniform2f (const OString &rName, GLfloat v1, GLfloat v2)
void SetUniform1fv (const OString &rName, GLsizei nCount, GLfloat const *aValues)
void SetUniform2fv (const OString &rName, GLsizei nCount, GLfloat const *aValues)
void SetUniform1i (const OString &rName, GLint v1)
void SetColor (const OString &rName, const Color &rColor)
void SetColor (const OString &rName, Color nColor, sal_uInt8 nTransparency)
void SetColorf (const OString &rName, Color nColor, double fTransparency)
void SetColorWithIntensity (const OString &rName, const Color &rColor, long nFactor)
void SetTexture (const OString &rName, OpenGLTexture &rTexture)
void SetTransform (const OString &rName, const OpenGLTexture &rTexture, const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY)
void SetIdentityTransform (const OString &rName)
void SetShaderType (TextureShaderType eTextureShaderType)
void SetShaderType (DrawShaderType eDrawShaderType)
void SetBlendMode (GLenum nSFactor, GLenum nDFactor)
void ApplyMatrix (float fWidth, float fHeight, float fPixelOffset=0.0f)
void DrawTexture (const OpenGLTexture &rTexture)
void DrawArrays (GLenum aMode, std::vector< GLfloat > &aVertices)
void DrawElements (GLenum aMode, GLuint nNumberOfVertices)
bool EnableVertexAttrib (GLuint &rAttrib, const OString &rName)
void SetVertexAttrib (GLuint &rAttrib, const OString &rName, GLint nSize, GLenum eType, GLboolean bNormalized, GLsizei aStride, const GLvoid *pPointer)

Private Member Functions

 OpenGLProgram (const OpenGLProgram &)=delete
GLuint GetUniformLocation (const OString &rName)

Private Attributes

GLuint mnId
std::unordered_map< OString, GLuint > maUniformLocations
sal_uInt32 mnEnabledAttribs
GLuint mnPositionAttrib
GLuint mnTexCoordAttrib
GLuint mnAlphaCoordAttrib
GLuint mnMaskCoordAttrib
GLuint mnExtrusionVectorsAttrib
GLuint mnVertexColorsAttrib
std::vector< OpenGLTexturemaTextures
bool mbBlending
float mfLastWidth
float mfLastHeight
float mfLastPixelOffset

Detailed Description

Definition at line 42 of file program.hxx.

Constructor & Destructor Documentation

OpenGLProgram::OpenGLProgram ( const OpenGLProgram )
OpenGLProgram::OpenGLProgram ( )
OpenGLProgram::~OpenGLProgram ( )

Member Function Documentation

void OpenGLProgram::ApplyMatrix ( float  fWidth,
float  fHeight,
float  fPixelOffset = 0.0f 
void OpenGLProgram::Clean ( )
void OpenGLProgram::DrawArrays ( GLenum  aMode,
std::vector< GLfloat > &  aVertices 
void OpenGLProgram::DrawElements ( GLenum  aMode,
GLuint  nNumberOfVertices 
void OpenGLProgram::DrawTexture ( const OpenGLTexture rTexture)
bool OpenGLProgram::EnableVertexAttrib ( GLuint &  rAttrib,
const OString &  rName 
GLuint OpenGLProgram::GetUniformLocation ( const OString &  rName)
GLuint OpenGLProgram::Id ( )

Definition at line 69 of file program.hxx.

References mnId.

Referenced by OpenGLContext::UseProgram().

bool OpenGLProgram::Load ( const OUString &  rVertexShader,
const OUString &  rFragmentShader,
const OString &  preamble,
const OString &  rDigest 
void OpenGLProgram::Reuse ( )
void OpenGLProgram::SetAlphaCoord ( const GLvoid *  pData)
void OpenGLProgram::SetBlendMode ( GLenum  nSFactor,
GLenum  nDFactor 
void OpenGLProgram::SetColor ( const OString &  rName,
const Color rColor 
void OpenGLProgram::SetColor ( const OString &  rName,
Color  nColor,
sal_uInt8  nTransparency 
void OpenGLProgram::SetColorf ( const OString &  rName,
Color  nColor,
double  fTransparency 
void OpenGLProgram::SetColorWithIntensity ( const OString &  rName,
const Color rColor,
long  nFactor 
void OpenGLProgram::SetExtrusionVectors ( const GLvoid *  pData)
void OpenGLProgram::SetIdentityTransform ( const OString &  rName)
void OpenGLProgram::SetMaskCoord ( const GLvoid *  pData)
void OpenGLProgram::SetShaderType ( TextureShaderType  eTextureShaderType)
void OpenGLProgram::SetShaderType ( DrawShaderType  eDrawShaderType)
void OpenGLProgram::SetTexture ( const OString &  rName,
OpenGLTexture rTexture 
void OpenGLProgram::SetTextureCoord ( const GLvoid *  pData)
void OpenGLProgram::SetTransform ( const OString &  rName,
const OpenGLTexture rTexture,
const basegfx::B2DPoint rNull,
const basegfx::B2DPoint rX,
const basegfx::B2DPoint rY 
void OpenGLProgram::SetUniform1f ( const OString &  rName,
GLfloat  v1 
void OpenGLProgram::SetUniform1fv ( const OString &  rName,
GLsizei  nCount,
GLfloat const *  aValues 
void OpenGLProgram::SetUniform1i ( const OString &  rName,
GLint  v1 
void OpenGLProgram::SetUniform2f ( const OString &  rName,
GLfloat  v1,
GLfloat  v2 
void OpenGLProgram::SetUniform2fv ( const OString &  rName,
GLsizei  nCount,
GLfloat const *  aValues 
void OpenGLProgram::SetVertexAttrib ( GLuint &  rAttrib,
const OString &  rName,
GLint  nSize,
GLenum  eType,
GLboolean  bNormalized,
GLsizei  aStride,
const GLvoid *  pPointer 
void OpenGLProgram::SetVertexColors ( std::vector< GLubyte > &  rColorVector)
void OpenGLProgram::SetVertices ( const GLvoid *  pData)
void OpenGLProgram::Use ( )

Member Data Documentation

std::vector< OpenGLTexture > OpenGLProgram::maTextures

Definition at line 56 of file program.hxx.

std::unordered_map< OString, GLuint > OpenGLProgram::maUniformLocations

Definition at line 47 of file program.hxx.

bool OpenGLProgram::mbBlending

Definition at line 57 of file program.hxx.

float OpenGLProgram::mfLastHeight

Definition at line 60 of file program.hxx.

float OpenGLProgram::mfLastPixelOffset

Definition at line 61 of file program.hxx.

float OpenGLProgram::mfLastWidth

Definition at line 59 of file program.hxx.

GLuint OpenGLProgram::mnAlphaCoordAttrib

Definition at line 51 of file program.hxx.

sal_uInt32 OpenGLProgram::mnEnabledAttribs

Definition at line 48 of file program.hxx.

GLuint OpenGLProgram::mnExtrusionVectorsAttrib

Definition at line 53 of file program.hxx.

GLuint OpenGLProgram::mnId

Definition at line 45 of file program.hxx.

Referenced by Id().

GLuint OpenGLProgram::mnMaskCoordAttrib

Definition at line 52 of file program.hxx.

GLuint OpenGLProgram::mnPositionAttrib

Definition at line 49 of file program.hxx.

GLuint OpenGLProgram::mnTexCoordAttrib

Definition at line 50 of file program.hxx.

GLuint OpenGLProgram::mnVertexColorsAttrib

Definition at line 54 of file program.hxx.

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