Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
rs2::shader_program Class Reference

#include <opengl3.h>

Public Member Functions

void attach (const shader &shader)
 
void begin () const
 
void bind_attribute (int attr, const std::string &name)
 
void end () const
 
unsigned int get_id () const
 
int get_uniform_location (const std::string &name)
 
void link ()
 
void load_uniform (int location, float value)
 
void load_uniform (int location, const float2 &vec)
 
void load_uniform (int location, const float3 &vec)
 
void load_uniform (int location, bool value)
 
void load_uniform (int location, int value)
 
void load_uniform (int location, const matrix4 &matrix)
 
 shader_program ()
 
 ~shader_program ()
 

Static Public Member Functions

static std::unique_ptr< shader_programload (const std::string &vertex_shader, const std::string &fragment_shader, const char *input0=nullptr, const char *input1=nullptr, const char *output0=nullptr, const char *output1=nullptr)
 

Private Attributes

unsigned int _id
 
std::vector< const shader * > _shaders
 

Detailed Description

Definition at line 61 of file opengl3.h.

Constructor & Destructor Documentation

shader_program::shader_program ( )

Definition at line 499 of file opengl3.cpp.

shader_program::~shader_program ( )

Definition at line 505 of file opengl3.cpp.

Member Function Documentation

void shader_program::attach ( const shader shader)

Definition at line 511 of file opengl3.cpp.

void shader_program::begin ( ) const

Definition at line 566 of file opengl3.cpp.

void shader_program::bind_attribute ( int  attr,
const std::string name 
)

Definition at line 448 of file opengl3.cpp.

void shader_program::end ( ) const

Definition at line 571 of file opengl3.cpp.

unsigned int rs2::shader_program::get_id ( ) const
inline

Definition at line 81 of file opengl3.h.

int shader_program::get_uniform_location ( const std::string name)

Definition at line 407 of file opengl3.cpp.

void shader_program::link ( )

Definition at line 515 of file opengl3.cpp.

std::unique_ptr< shader_program > shader_program::load ( const std::string vertex_shader,
const std::string fragment_shader,
const char *  input0 = nullptr,
const char *  input1 = nullptr,
const char *  output0 = nullptr,
const char *  output1 = nullptr 
)
static

Definition at line 576 of file opengl3.cpp.

void shader_program::load_uniform ( int  location,
float  value 
)

Definition at line 418 of file opengl3.cpp.

void shader_program::load_uniform ( int  location,
const float2 vec 
)

Definition at line 436 of file opengl3.cpp.

void shader_program::load_uniform ( int  location,
const float3 vec 
)

Definition at line 430 of file opengl3.cpp.

void shader_program::load_uniform ( int  location,
bool  value 
)

Definition at line 424 of file opengl3.cpp.

void shader_program::load_uniform ( int  location,
int  value 
)

Definition at line 412 of file opengl3.cpp.

void shader_program::load_uniform ( int  location,
const matrix4 matrix 
)

Definition at line 442 of file opengl3.cpp.

Member Data Documentation

unsigned int rs2::shader_program::_id
private

Definition at line 95 of file opengl3.h.

std::vector<const shader*> rs2::shader_program::_shaders
private

Definition at line 94 of file opengl3.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:41