cgv
Loading...
Searching...
No Matches
cgv::render::shader_program_base Class Reference

base interface for shader programs More...

#include <context.h>

Inheritance diagram for cgv::render::shader_program_base:
cgv::render::render_component cgv::render::shader_program

Public Member Functions

 shader_program_base ()
 initializes members
 
void specify_standard_uniforms (bool view, bool material, bool lights, bool gamma)
 
void specify_standard_vertex_attribute_names (context &ctx, bool color=true, bool normal=true, bool texcoord=true)
 
void specify_vertex_attribute_names (context &ctx, const std::string &position, const std::string &color="", const std::string &normal="", const std::string &texcoord="")
 
bool does_use_view () const
 
bool does_use_material () const
 
bool does_use_lights () const
 
bool does_use_gamma () const
 
void allow_context_to_set_color (bool allow)
 
int get_position_index () const
 
int get_color_index () const
 
bool does_context_set_color () const
 
int get_normal_index () const
 
int get_texcoord_index () const
 
- Public Member Functions inherited from cgv::render::render_component
 render_component ()
 initialize members
 
virtual bool is_created () const
 return whether component has been created
 
void put_id_void (void *ptr) const
 copy the rendering api specific id the component to the memory location of the given pointer.
 
template<typename T >
void put_id (T &id) const
 cast the refence to rendering api specific representation of component id to the specified type
 

Public Attributes

PrimitiveType geometry_shader_input_type
 
PrimitiveType geometry_shader_output_type
 
int geometry_shader_output_count
 
- Public Attributes inherited from cgv::render::render_component
void * handle
 
void * internal_format
 
void * user_data
 
const contextctx_ptr
 keep pointer to my context
 
std::string last_error
 a string that contains the last error
 

Protected Attributes

bool is_enabled
 
bool auto_detect_uniforms
 
bool auto_detect_vertex_attributes
 
bool uses_view
 
bool uses_material
 
bool uses_lights
 
bool uses_gamma
 
int position_index
 
int color_index
 
bool context_sets_color
 
int normal_index
 
int texcoord_index
 

Friends

class context
 

Detailed Description

base interface for shader programs

Definition at line 354 of file context.h.

Constructor & Destructor Documentation

◆ shader_program_base()

cgv::render::shader_program_base::shader_program_base ( )

initializes members

Definition at line 2090 of file context.cxx.

Member Function Documentation

◆ allow_context_to_set_color()

void cgv::render::shader_program_base::allow_context_to_set_color ( bool  allow)

Definition at line 2085 of file context.cxx.

◆ does_context_set_color()

bool cgv::render::shader_program_base::does_context_set_color ( ) const
inline

Definition at line 396 of file context.h.

◆ does_use_gamma()

bool cgv::render::shader_program_base::does_use_gamma ( ) const
inline

Definition at line 390 of file context.h.

◆ does_use_lights()

bool cgv::render::shader_program_base::does_use_lights ( ) const
inline

Definition at line 389 of file context.h.

◆ does_use_material()

bool cgv::render::shader_program_base::does_use_material ( ) const
inline

Definition at line 388 of file context.h.

◆ does_use_view()

bool cgv::render::shader_program_base::does_use_view ( ) const
inline

Definition at line 387 of file context.h.

◆ get_color_index()

int cgv::render::shader_program_base::get_color_index ( ) const
inline

Definition at line 395 of file context.h.

◆ get_normal_index()

int cgv::render::shader_program_base::get_normal_index ( ) const
inline

Definition at line 397 of file context.h.

◆ get_position_index()

int cgv::render::shader_program_base::get_position_index ( ) const
inline

Definition at line 394 of file context.h.

◆ get_texcoord_index()

int cgv::render::shader_program_base::get_texcoord_index ( ) const
inline

Definition at line 398 of file context.h.

◆ specify_standard_uniforms()

void cgv::render::shader_program_base::specify_standard_uniforms ( bool  view,
bool  material,
bool  lights,
bool  gamma 
)

Definition at line 2113 of file context.cxx.

◆ specify_standard_vertex_attribute_names()

void cgv::render::shader_program_base::specify_standard_vertex_attribute_names ( context ctx,
bool  color = true,
bool  normal = true,
bool  texcoord = true 
)

Definition at line 2122 of file context.cxx.

◆ specify_vertex_attribute_names()

void cgv::render::shader_program_base::specify_vertex_attribute_names ( context ctx,
const std::string &  position,
const std::string &  color = "",
const std::string &  normal = "",
const std::string &  texcoord = "" 
)

Definition at line 2131 of file context.cxx.

Friends And Related Symbol Documentation

◆ context

friend class context
friend

Definition at line 358 of file context.h.

Member Data Documentation

◆ auto_detect_uniforms

bool cgv::render::shader_program_base::auto_detect_uniforms
protected

Definition at line 360 of file context.h.

◆ auto_detect_vertex_attributes

bool cgv::render::shader_program_base::auto_detect_vertex_attributes
protected

Definition at line 361 of file context.h.

◆ color_index

int cgv::render::shader_program_base::color_index
protected

Definition at line 371 of file context.h.

◆ context_sets_color

bool cgv::render::shader_program_base::context_sets_color
protected

Definition at line 372 of file context.h.

◆ geometry_shader_input_type

PrimitiveType cgv::render::shader_program_base::geometry_shader_input_type

Definition at line 377 of file context.h.

◆ geometry_shader_output_count

int cgv::render::shader_program_base::geometry_shader_output_count

Definition at line 379 of file context.h.

◆ geometry_shader_output_type

PrimitiveType cgv::render::shader_program_base::geometry_shader_output_type

Definition at line 378 of file context.h.

◆ is_enabled

bool cgv::render::shader_program_base::is_enabled
protected

Definition at line 357 of file context.h.

◆ normal_index

int cgv::render::shader_program_base::normal_index
protected

Definition at line 373 of file context.h.

◆ position_index

int cgv::render::shader_program_base::position_index
protected

Definition at line 370 of file context.h.

◆ texcoord_index

int cgv::render::shader_program_base::texcoord_index
protected

Definition at line 374 of file context.h.

◆ uses_gamma

bool cgv::render::shader_program_base::uses_gamma
protected

Definition at line 367 of file context.h.

◆ uses_lights

bool cgv::render::shader_program_base::uses_lights
protected

Definition at line 366 of file context.h.

◆ uses_material

bool cgv::render::shader_program_base::uses_material
protected

Definition at line 365 of file context.h.

◆ uses_view

bool cgv::render::shader_program_base::uses_view
protected

Definition at line 364 of file context.h.


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