# GpuQuadraticCurveRender::OpenglGpuShader Class Reference

Compiles a glsl shader. More...

`#include <OpenglGpuShader.h>`

List of all members.

## Public Member Functions
| OpenglGpuShader (const std::wstring &shaderFile, GpuShaderStage stage)
| ~OpenglGpuShader (void)
| Destructor.
GLint | GetGlShaderId (void) const
| Gets gl shader id.
## Protected Member Functions
GLint | LoadShaderFromFile (const std::wstring &shaderFile, GpuShaderStage stage)
| Compiles a shader file.
void | ReadSourceFile (const std::wstring &shaderFile, std::string &source)
| Reads source shader file.
| OpenglGpuShader (const OpenglGpuShader &shader)
OpenglGpuShader & | operator= (const OpenglGpuShader &shader)
## Protected Attributes
GLint | m_glShader
| Opengl shader id.

## Detailed Description

Compiles a glsl shader.

## Constructor & Destructor Documentation

OpenglGpuShader::OpenglGpuShader | ( | const std::wstring & | shaderFile,
|  | GpuShaderStage | stage |
| ) |  |  |

Constructor

Parameters:

  | shaderFile | shader path file
  | stage | Vertex or pixel stage

GpuQuadraticCurveRender::OpenglGpuShader::OpenglGpuShader | ( | const OpenglGpuShader & | shader | ) | `[protected]`

Note:
  hide copy constructor from interface user

## Member Function Documentation

GLint OpenglGpuShader::GetGlShaderId | ( | void |  | ) | const

Gets gl shader id.

Returns:
  gl shader id

GLint OpenglGpuShader::LoadShaderFromFile | ( | const std::wstring & | shaderFile,
|  | GpuShaderStage | stage |
| ) |  |  | `[protected]`

Compiles a shader file.

Parameters:

  | shaderFile | shader path file
  | stage | Vertex or pixel stage

OpenglGpuShader& GpuQuadraticCurveRender::OpenglGpuShader::operator= | ( | const OpenglGpuShader & | shader | ) | `[protected]`

Note:
  hide assignment operator from interface user

void OpenglGpuShader::ReadSourceFile | ( | const std::wstring & | shaderFile,
|  | std::string & | source |
| ) |  |  | `[protected]`

Reads source shader file.

Parameters:

  | shaderFile | shader path file
  | source | shader source

Load the file

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

- src/GpuQuadraticCurveRender/OpenglGpuShader.h
- src/GpuQuadraticCurveRender/OpenglGpuShader.cpp