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 context * ctx_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
std::map< std::string, int > uniform_locations
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 411 of file context.h.

Constructor & Destructor Documentation

◆ shader_program_base()

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

initializes members

Definition at line 2275 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 2270 of file context.cxx.

◆ does_context_set_color()

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

Definition at line 455 of file context.h.

◆ does_use_gamma()

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

Definition at line 449 of file context.h.

◆ does_use_lights()

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

Definition at line 448 of file context.h.

◆ does_use_material()

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

Definition at line 447 of file context.h.

◆ does_use_view()

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

Definition at line 446 of file context.h.

◆ get_color_index()

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

Definition at line 454 of file context.h.

◆ get_normal_index()

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

Definition at line 456 of file context.h.

◆ get_position_index()

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

Definition at line 453 of file context.h.

◆ get_texcoord_index()

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

Definition at line 457 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 2298 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 2307 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 2316 of file context.cxx.

◆ context

friend class context
friend

Definition at line 415 of file context.h.

Member Data Documentation

◆ auto_detect_uniforms

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

Definition at line 417 of file context.h.

◆ auto_detect_vertex_attributes

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

Definition at line 418 of file context.h.

◆ color_index

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

Definition at line 430 of file context.h.

◆ context_sets_color

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

Definition at line 431 of file context.h.

◆ geometry_shader_input_type

PrimitiveType cgv::render::shader_program_base::geometry_shader_input_type

Definition at line 436 of file context.h.

◆ geometry_shader_output_count

int cgv::render::shader_program_base::geometry_shader_output_count

Definition at line 438 of file context.h.

◆ geometry_shader_output_type

PrimitiveType cgv::render::shader_program_base::geometry_shader_output_type

Definition at line 437 of file context.h.

◆ is_enabled

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

Definition at line 414 of file context.h.

◆ normal_index

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

Definition at line 432 of file context.h.

◆ position_index

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

Definition at line 429 of file context.h.

◆ texcoord_index

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

Definition at line 433 of file context.h.

◆ uniform_locations

std::map<std::string, int> cgv::render::shader_program_base::uniform_locations
protected

Definition at line 426 of file context.h.

◆ uses_gamma

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

Definition at line 424 of file context.h.

◆ uses_lights

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

Definition at line 423 of file context.h.

◆ uses_material

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

Definition at line 422 of file context.h.

◆ uses_view

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

Definition at line 421 of file context.h.


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