neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::shader_program< Base > Class Template Reference

#include <shader_program.hpp>

Inheritance diagram for neogfx::shader_program< Base >:
neolib::reference_counted< Base, DeallocateOnRelease >

Public Types

typedef neolib::ref_ptr< i_shader_stagestage_t
 
typedef neolib::vector< stage_tstages_t
 
typedef neolib::ref_ptr< i_shader > shader_t
 
typedef neolib::i_ref_ptr< i_shader_stagei_stage_t
 
typedef neolib::i_vector< i_stage_ti_stages_t
 

Public Member Functions

 shader_program (const std::string aName)
 
 ~shader_program ()
 
const i_stringname () const override
 
bool supports (vertex_buffer_type aBufferType) const override
 
bool created () const override
 
void * handle () const override
 
const stages_tstages () const override
 
stages_tstages () override
 
const stage_tstage (shader_type aStage) const override
 
stage_tstage (shader_type aStage) override
 
const i_shader & shader (const neolib::i_string &aName) const override
 
i_shader & shader (const neolib::i_string &aName) override
 
const i_vertex_shadervertex_shader () const override
 
i_vertex_shadervertex_shader () override
 
const i_fragment_shaderfragment_shader () const override
 
i_fragment_shaderfragment_shader () override
 
bool is_first_in_stage (const i_shader &aShader) const override
 
bool is_last_in_stage (const i_shader &aShader) const override
 
const i_shader & first_in_stage (shader_type aStage) const override
 
const i_shader & next_in_stage (const i_shader &aPreviousShader) const override
 
const i_shader & last_in_stage (shader_type aStage) const override
 
i_shader & add_shader (const neolib::i_ref_ptr< i_shader > &aShader) override
 
bool dirty () const override
 
void set_clean () override
 
void prepare_uniforms (const i_rendering_context &aContext) override
 
void make () override
 
bool uniforms_changed () const override
 
bool active () const override
 
void activate (const i_rendering_context &aContext) override
 
void instantiate (const i_rendering_context &aContext) override
 
bool have_stage (shader_type aStage) const
 
virtual void compile ()=0
 
virtual void link ()=0
 
virtual void use ()=0
 
virtual void update_uniform_storage ()=0
 
virtual void update_uniform_locations ()=0
 
virtual void update_uniforms (const i_rendering_context &aContext)=0
 
- Public Member Functions inherited from neolib::reference_counted< Base, DeallocateOnRelease >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_type * release_and_take_ownership () const override
 
base_type * release_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 

Protected Member Functions

bool need_full_uniform_update () const
 
void set_active ()
 
void set_inactive ()
 

Detailed Description

template<typename Base = i_shader_program>
class neogfx::shader_program< Base >

Definition at line 50 of file shader_program.hpp.

Member Typedef Documentation

◆ i_stage_t

template<typename Base = i_shader_program>
typedef neolib::i_ref_ptr<i_shader_stage> neogfx::i_shader_program::i_stage_t

Definition at line 74 of file i_shader_program.hpp.

◆ i_stages_t

template<typename Base = i_shader_program>
typedef neolib::i_vector<i_stage_t> neogfx::i_shader_program::i_stages_t

Definition at line 75 of file i_shader_program.hpp.

◆ shader_t

template<typename Base = i_shader_program>
typedef neolib::ref_ptr<i_shader> neogfx::shader_program< Base >::shader_t

Definition at line 57 of file shader_program.hpp.

◆ stage_t

template<typename Base = i_shader_program>
typedef neolib::ref_ptr<i_shader_stage> neogfx::shader_program< Base >::stage_t

Definition at line 55 of file shader_program.hpp.

◆ stages_t

template<typename Base = i_shader_program>
typedef neolib::vector<stage_t> neogfx::shader_program< Base >::stages_t

Definition at line 56 of file shader_program.hpp.

Constructor & Destructor Documentation

◆ shader_program()

template<typename Base >
neogfx::shader_program< Base >::shader_program ( const std::string  aName)
inline

Definition at line 53 of file shader_program.inl.

◆ ~shader_program()

template<typename Base >
neogfx::shader_program< Base >::~shader_program ( )
inline

Definition at line 65 of file shader_program.inl.

Member Function Documentation

◆ activate()

template<typename Base >
void neogfx::shader_program< Base >::activate ( const i_rendering_context aContext)
inlineoverride

Definition at line 291 of file shader_program.inl.

◆ active()

template<typename Base >
bool neogfx::shader_program< Base >::active ( ) const
inlineoverride

Definition at line 285 of file shader_program.inl.

◆ add_shader()

template<typename Base >
i_shader & neogfx::shader_program< Base >::add_shader ( const neolib::i_ref_ptr< i_shader > &  aShader)
inlineoverride

Definition at line 223 of file shader_program.inl.

◆ compile()

template<typename Base = i_shader_program>
virtual void neogfx::i_shader_program::compile ( )

◆ created()

template<typename Base >
bool neogfx::shader_program< Base >::created ( ) const
inlineoverride

Definition at line 88 of file shader_program.inl.

◆ dirty()

template<typename Base >
bool neogfx::shader_program< Base >::dirty ( ) const
inlineoverride

Definition at line 235 of file shader_program.inl.

◆ first_in_stage()

template<typename Base >
const i_shader & neogfx::shader_program< Base >::first_in_stage ( shader_type  aStage) const
inlineoverride

Definition at line 186 of file shader_program.inl.

◆ fragment_shader() [1/2]

template<typename Base >
const i_fragment_shader & neogfx::shader_program< Base >::fragment_shader ( ) const
inlineoverride

Definition at line 160 of file shader_program.inl.

◆ fragment_shader() [2/2]

template<typename Base >
i_fragment_shader & neogfx::shader_program< Base >::fragment_shader ( )
inlineoverride

Definition at line 168 of file shader_program.inl.

◆ handle()

template<typename Base >
void * neogfx::shader_program< Base >::handle ( ) const
inlineoverride

Definition at line 94 of file shader_program.inl.

◆ have_stage()

template<typename Base = i_shader_program>
bool neogfx::i_shader_program::have_stage ( shader_type  aStage) const
inline

Definition at line 128 of file i_shader_program.hpp.

◆ instantiate()

template<typename Base >
void neogfx::shader_program< Base >::instantiate ( const i_rendering_context aContext)
inlineoverride

Definition at line 299 of file shader_program.inl.

◆ is_first_in_stage()

template<typename Base >
bool neogfx::shader_program< Base >::is_first_in_stage ( const i_shader &  aShader) const
inlineoverride

Definition at line 174 of file shader_program.inl.

◆ is_last_in_stage()

template<typename Base >
bool neogfx::shader_program< Base >::is_last_in_stage ( const i_shader &  aShader) const
inlineoverride

Definition at line 180 of file shader_program.inl.

◆ last_in_stage()

template<typename Base >
const i_shader & neogfx::shader_program< Base >::last_in_stage ( shader_type  aStage) const
inlineoverride

Definition at line 196 of file shader_program.inl.

◆ link()

template<typename Base = i_shader_program>
virtual void neogfx::i_shader_program::link ( )

◆ make()

template<typename Base >
void neogfx::shader_program< Base >::make ( )
inlineoverride

Definition at line 261 of file shader_program.inl.

◆ name()

template<typename Base >
const i_string & neogfx::shader_program< Base >::name ( ) const
inlineoverride

Definition at line 72 of file shader_program.inl.

◆ need_full_uniform_update()

template<typename Base >
bool neogfx::shader_program< Base >::need_full_uniform_update ( ) const
protected

Definition at line 306 of file shader_program.inl.

◆ next_in_stage()

template<typename Base >
const i_shader & neogfx::shader_program< Base >::next_in_stage ( const i_shader &  aPreviousShader) const
inlineoverride

Definition at line 206 of file shader_program.inl.

◆ prepare_uniforms()

template<typename Base >
void neogfx::shader_program< Base >::prepare_uniforms ( const i_rendering_context aContext)
inlineoverride

Definition at line 253 of file shader_program.inl.

◆ set_active()

template<typename Base >
void neogfx::shader_program< Base >::set_active ( )
protected

Definition at line 314 of file shader_program.inl.

◆ set_clean()

template<typename Base >
void neogfx::shader_program< Base >::set_clean ( )
inlineoverride

Definition at line 245 of file shader_program.inl.

◆ set_inactive()

template<typename Base >
void neogfx::shader_program< Base >::set_inactive ( )
protected

Definition at line 320 of file shader_program.inl.

◆ shader() [1/2]

template<typename Base >
const i_shader & neogfx::shader_program< Base >::shader ( const neolib::i_string aName) const
inlineoverride

Definition at line 131 of file shader_program.inl.

◆ shader() [2/2]

template<typename Base >
i_shader & neogfx::shader_program< Base >::shader ( const neolib::i_string aName)
inlineoverride

Definition at line 140 of file shader_program.inl.

◆ stage() [1/2]

template<typename Base >
const shader_program< Base >::stage_t & neogfx::shader_program< Base >::stage ( shader_type  aStage) const
override

Definition at line 119 of file shader_program.inl.

◆ stage() [2/2]

template<typename Base >
shader_program< Base >::stage_t & neogfx::shader_program< Base >::stage ( shader_type  aStage)
override

Definition at line 125 of file shader_program.inl.

◆ stages() [1/2]

template<typename Base >
const shader_program< Base >::stages_t & neogfx::shader_program< Base >::stages ( ) const
inlineoverride

Definition at line 107 of file shader_program.inl.

◆ stages() [2/2]

template<typename Base >
shader_program< Base >::stages_t & neogfx::shader_program< Base >::stages ( )
inlineoverride

Definition at line 113 of file shader_program.inl.

◆ supports()

template<typename Base >
bool neogfx::shader_program< Base >::supports ( vertex_buffer_type  aBufferType) const
inlineoverride

Definition at line 78 of file shader_program.inl.

◆ uniforms_changed()

template<typename Base >
bool neogfx::shader_program< Base >::uniforms_changed ( ) const
override

Definition at line 275 of file shader_program.inl.

◆ update_uniform_locations()

template<typename Base = i_shader_program>
virtual void neogfx::i_shader_program::update_uniform_locations ( )

◆ update_uniform_storage()

template<typename Base = i_shader_program>
virtual void neogfx::i_shader_program::update_uniform_storage ( )

◆ update_uniforms()

template<typename Base = i_shader_program>
virtual void neogfx::i_shader_program::update_uniforms ( const i_rendering_context aContext)

◆ use()

template<typename Base = i_shader_program>
virtual void neogfx::i_shader_program::use ( )

◆ vertex_shader() [1/2]

template<typename Base >
const i_vertex_shader & neogfx::shader_program< Base >::vertex_shader ( ) const
inlineoverride

Definition at line 146 of file shader_program.inl.

◆ vertex_shader() [2/2]

template<typename Base >
i_vertex_shader & neogfx::shader_program< Base >::vertex_shader ( )
inlineoverride

Definition at line 154 of file shader_program.inl.


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