My Project: Shader Class Reference

My Project

Public Member Functions | Static Public Member Functions | List of all members
Shader Class Reference

`#include <shadermat.h>`

## Public Member Functions

void | TurnOn (Matrix &mat, Surface *surf, vector< float > *vertices=0)
void | TurnOff ()
void | AddShader (string _vert, string _frag)
void | AddShaderFromString (string _vert, string _frag)
Texture * | AddSampler2D (string Name, int Slot, Texture *Tex)
void | AddSampler3D (string Name, int Slot, Texture *Tex)
void | ProgramAttriBegin ()
void | ProgramAttriEnd ()
void | FreeShader ()
void | SetFloat (string name, float v1)
void | SetFloat2 (string name, float v1, float v2)
void | SetFloat3 (string name, float v1, float v2, float v3)
void | SetFloat4 (string name, float v1, float v2, float v3, float v4)
void | UseFloat (string name, float *v1)
void | UseFloat2 (string name, float *v1, float *v2)
void | UseFloat3 (string name, float *v1, float *v2, float *v3)
void | UseFloat4 (string name, float *v1, float *v2, float *v3, float *v4)
void | SetInteger (string name, int v1)
void | SetInteger2 (string name, int v1, int v2)
void | SetInteger3 (string name, int v1, int v2, int v3)
void | SetInteger4 (string name, int v1, int v2, int v3, int v4)
void | UseInteger (string name, int *v1)
void | UseInteger2 (string name, int *v1, int *v2)
void | UseInteger3 (string name, int *v1, int *v2, int *v3)
void | UseInteger4 (string name, int *v1, int *v2, int *v3, int *v4)
void | UseSurface (string name, Surface *surf, int vbo)
void | UseMatrix (string name, int mode)

## Static Public Member Functions

static Shader * | CreateShaderMaterial (string Name="")

## Member Function Documentation

## § AddSampler2D()

Texture * Shader::AddSampler2D | ( | string | Name,
|  | int | Slot,
|  | Texture * | Tex
| ) |  |

## § AddSampler3D()

void Shader::AddSampler3D | ( | string | Name,
|  | int | Slot,
|  | Texture * | Tex
| ) |  |

## § AddShader()

void Shader::AddShader | ( | string | _vert,
|  | string | _frag
| ) |  |

## § AddShaderFromString()

void Shader::AddShaderFromString | ( | string | _vert,
|  | string | _frag
| ) |  |

## § CreateShaderMaterial()

Shader * Shader::CreateShaderMaterial | ( | string | Name = `""` | ) |

static

## § FreeShader()

void Shader::FreeShader | ( |  | ) |

## § ProgramAttriBegin()

void Shader::ProgramAttriBegin | ( |  | ) |

## § ProgramAttriEnd()

void Shader::ProgramAttriEnd | ( |  | ) |

## § SetFloat()

void Shader::SetFloat | ( | string | name,
|  | float | v1
| ) |  |

## § SetFloat2()

void Shader::SetFloat2 | ( | string | name,
|  | float | v1,
|  | float | v2
| ) |  |

## § SetFloat3()

void Shader::SetFloat3 | ( | string | name,
|  | float | v1,
|  | float | v2,
|  | float | v3
| ) |  |

## § SetFloat4()

void Shader::SetFloat4 | ( | string | name,
|  | float | v1,
|  | float | v2,
|  | float | v3,
|  | float | v4
| ) |  |

## § SetInteger()

void Shader::SetInteger | ( | string | name,
|  | int | v1
| ) |  |

## § SetInteger2()

void Shader::SetInteger2 | ( | string | name,
|  | int | v1,
|  | int | v2
| ) |  |

## § SetInteger3()

void Shader::SetInteger3 | ( | string | name,
|  | int | v1,
|  | int | v2,
|  | int | v3
| ) |  |

## § SetInteger4()

void Shader::SetInteger4 | ( | string | name,
|  | int | v1,
|  | int | v2,
|  | int | v3,
|  | int | v4
| ) |  |

## § TurnOff()

void Shader::TurnOff | ( |  | ) |

## § TurnOn()

void Shader::TurnOn | ( | Matrix & | mat,
|  | Surface * | surf,
|  | vector< float > * | vertices = `0`
| ) |  |

- ***!ES***

## § UseFloat()

void Shader::UseFloat | ( | string | name,
|  | float * | v1
| ) |  |

## § UseFloat2()

void Shader::UseFloat2 | ( | string | name,
|  | float * | v1,
|  | float * | v2
| ) |  |

## § UseFloat3()

void Shader::UseFloat3 | ( | string | name,
|  | float * | v1,
|  | float * | v2,
|  | float * | v3
| ) |  |

## § UseFloat4()

void Shader::UseFloat4 | ( | string | name,
|  | float * | v1,
|  | float * | v2,
|  | float * | v3,
|  | float * | v4
| ) |  |

## § UseInteger()

void Shader::UseInteger | ( | string | name,
|  | int * | v1
| ) |  |

## § UseInteger2()

void Shader::UseInteger2 | ( | string | name,
|  | int * | v1,
|  | int * | v2
| ) |  |

## § UseInteger3()

void Shader::UseInteger3 | ( | string | name,
|  | int * | v1,
|  | int * | v2,
|  | int * | v3
| ) |  |

## § UseInteger4()

void Shader::UseInteger4 | ( | string | name,
|  | int * | v1,
|  | int * | v2,
|  | int * | v3,
|  | int * | v4
| ) |  |

## § UseMatrix()

void Shader::UseMatrix | ( | string | name,
|  | int | mode
| ) |  |

## § UseSurface()

void Shader::UseSurface | ( | string | name,
|  | Surface * | surf,
|  | int | vbo
| ) |  |

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

- openb3dlib.mod/openb3d/src/shadermat.h
- openb3dlib.mod/openb3d/src/material.cpp