#include <paper_effect.H>
Inheritance diagram for PaperEffect:
Public Member Functions | |
PaperEffect () | |
virtual | ~PaperEffect () |
Static Public Member Functions | |
static TEXTUREptr | get_texture (Cstr_ptr &tf, str_ptr &ret) |
static void | begin_paper_effect (TEXTUREptr t, float cont, float bri, double x=0.0, double y=0.0) |
static void | end_paper_effect (TEXTUREptr t) |
static void | begin_paper_effect (bool apply, double x=0.0, double y=0.0) |
static void | end_paper_effect (bool apply) |
static bool | is_alpha_premult () |
static void | paper_coord (const double *v) |
static void | toggle_active () |
static void | delayed_activate () |
static void | rem_obs (PaperEffectObs *p) |
static void | add_obs (PaperEffectObs *p) |
static str_ptr | get_paper_tex () |
static void | set_paper_tex (Cstr_ptr &p) |
static bool | is_active () |
static float | get_brig () |
static void | set_brig (float b) |
static float | get_cont () |
static void | set_cont (float c) |
static void | set_delayed_activate (bool a) |
Protected Types | |
enum | pe_implementation_t { IMPLEMENTATION__NONE = 0, IMPLEMENTATION__GL_ARB = 1, IMPLEMENTATION__GL_NV = 2, IMPLEMENTATION__GL_ATI = 4 } |
Static Protected Member Functions | |
static void | begin_paper_effect_arb (TEXTUREptr t, float cont, float bri, double x, double y) |
static void | begin_paper_effect_nv (TEXTUREptr t, float cont, float bri, double x, double y) |
static void | begin_paper_effect_ati (TEXTUREptr t, float cont, float bri, double x, double y) |
static void | end_paper_effect_arb (TEXTUREptr t) |
static void | end_paper_effect_nv (TEXTUREptr t) |
static void | end_paper_effect_ati (TEXTUREptr t) |
static bool | check_new_paper () |
static void | init () |
static bool | init_tex () |
static bool | init_arb () |
static bool | init_nv () |
static bool | init_ati () |
static void | notify_usage_toggled () |
static void | notify_paper_changed () |
Static Protected Attributes | |
static int | _implementation = PaperEffect::IMPLEMENTATION__NONE |
static GLuint | _disabled_no_frag_prog_arb |
static GLuint | _disabled_1d_frag_prog_arb |
static GLuint | _disabled_2d_frag_prog_arb |
static GLuint | _paper_with_no_frag_prog_arb |
static GLuint | _paper_with_1d_frag_prog_arb |
static GLuint | _paper_with_2d_frag_prog_arb |
static GLuint | _paper_frag_shader_ati |
static const char * | _DisabledNoFragProgARB |
static const char * | _Disabled1DFragProgARB |
static const char * | _Disabled2DFragProgARB |
static const char * | _PaperWithNoFragProgARB |
static const char * | _PaperWith1DFragProgARB |
static const char * | _PaperWith2DFragProgARB |
static TEXTUREptr | _paper_texture |
static LIST< str_ptr > * | _paper_texture_names = 0 |
static LIST< TEXTUREptr > * | _paper_texture_ptrs = 0 |
static LIST< str_ptr > * | _paper_texture_remap_orig_names = 0 |
static LIST< str_ptr > * | _paper_texture_remap_new_names = 0 |
static ARRAY< PaperEffectObs * > | _obs |
static str_ptr | _paper_tex |
static str_ptr | _paper_filename = str_ptr("") |
static bool | _delayed_activate = false |
static bool | _delayed_activate_state = false |
static bool | _is_inited = false |
static bool | _is_supported = false |
static bool | _is_active = false |
static float | _brig = 0.5f |
static float | _cont = 0.5f |
Definition at line 10 of file paper_effect.H.
|
Definition at line 13 of file paper_effect.H. |
|
Definition at line 371 of file paper_effect.C. |
|
Definition at line 379 of file paper_effect.C. |
|
Definition at line 63 of file paper_effect_base.H. References PaperEffectBase::_obs. |
|
Definition at line 435 of file paper_effect.C. References PaperEffectBase::_brig, PaperEffectBase::_cont, _paper_texture, begin_paper_effect(), and check_new_paper(). |
|
Definition at line 457 of file paper_effect.C. References _implementation, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, begin_paper_effect_arb(), begin_paper_effect_ati(), begin_paper_effect_nv(), GLExtensions::get_debug(), IMPLEMENTATION__GL_ARB, IMPLEMENTATION__GL_ATI, IMPLEMENTATION__GL_NV, IMPLEMENTATION__NONE, init(), and GL_VIEW::print_gl_errors(). Referenced by begin_paper_effect(), and ToonTexture_1D::draw(). |
|
|
|
|
Definition at line 1459 of file paper_effect.C. References PaperEffectBase::_paper_filename, PaperEffectBase::_paper_tex, _paper_texture, get_texture(), Config::JOT_ROOT(), PaperEffectBase::notify_paper_changed(), and NULL_STR. Referenced by begin_paper_effect(), and end_paper_effect(). |
|
Definition at line 89 of file paper_effect.H. References PaperEffectBase::_delayed_activate, PaperEffectBase::_delayed_activate_state, PaperEffectBase::_is_active, and toggle_active(). |
|
Definition at line 446 of file paper_effect.C. References _paper_texture, check_new_paper(), and end_paper_effect(). |
|
Definition at line 490 of file paper_effect.C. References _implementation, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, end_paper_effect_arb(), end_paper_effect_ati(), end_paper_effect_nv(), GLExtensions::get_debug(), IMPLEMENTATION__GL_ARB, IMPLEMENTATION__GL_ATI, IMPLEMENTATION__GL_NV, IMPLEMENTATION__NONE, and GL_VIEW::print_gl_errors(). Referenced by ToonTexture_1D::draw(), and end_paper_effect(). |
|
Definition at line 1215 of file paper_effect.C. References _implementation, PaperEffectBase::_is_active, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, GL_ACTIVE_TEXTURE_ARB, GL_FRAGMENT_PROGRAM_ARB, GL_TEXTURE0_ARB, GL_TEXTURE1_ARB, GL_TEXTURE_2D, glActiveTextureARB, glDisable(), glGetIntegerv(), glIsEnabled(), IMPLEMENTATION__GL_ARB, and GL_VIEW::print_gl_errors(). Referenced by end_paper_effect(). |
|
Definition at line 1168 of file paper_effect.C. References _implementation, PaperEffectBase::_is_active, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, GL_ACTIVE_TEXTURE_ARB, GL_FRAGMENT_SHADER_ATI, GL_TEXTURE0_ARB, GL_TEXTURE1_ARB, GL_TEXTURE_2D, glActiveTextureARB, glDisable(), glGetIntegerv(), glIsEnabled(), and IMPLEMENTATION__GL_ATI. Referenced by end_paper_effect(). |
|
Definition at line 1118 of file paper_effect.C. References _implementation, PaperEffectBase::_is_active, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, GL_ACTIVE_TEXTURE_ARB, GL_REGISTER_COMBINERS_NV, GL_TEXTURE0_ARB, GL_TEXTURE1_ARB, GL_TEXTURE_2D, glActiveTextureARB, glDisable(), glGetIntegerv(), glIsEnabled(), and IMPLEMENTATION__GL_NV. Referenced by end_paper_effect(). |
|
Definition at line 70 of file paper_effect_base.H. References PaperEffectBase::_brig. Referenced by VIEW::put_view_paper_brig(). |
|
Definition at line 73 of file paper_effect_base.H. References PaperEffectBase::_cont. Referenced by VIEW::put_view_paper_cont(). |
|
Definition at line 65 of file paper_effect_base.H. References PaperEffectBase::_paper_tex. Referenced by VIEW::put_view_paper_name(). |
|
Definition at line 1277 of file paper_effect.C. References _paper_texture_names, _paper_texture_ptrs, _paper_texture_remap_new_names, _paper_texture_remap_orig_names, ARRAY< T >::add(), BAD_IND, Image::bpp(), Image::copy(), Image::empty(), ERR_LEV_ERROR, ERR_LEV_INFO, ERR_LEV_SPAM, err_mesg(), ARRAY< T >::get_index(), Image::height(), Config::JOT_ROOT(), Image::load_file(), NULL_STR, paper_remap_base, paper_remap_fnames, and Image::width(). Referenced by check_new_paper(). |
|
Definition at line 1497 of file paper_effect.C. References _implementation, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, ERR_LEV_INFO, err_mesg(), IMPLEMENTATION__GL_ARB, IMPLEMENTATION__GL_ATI, IMPLEMENTATION__GL_NV, IMPLEMENTATION__NONE, GLExtensions::init(), init_arb(), init_ati(), init_nv(), init_tex(), and GL_VIEW::print_gl_errors(). Referenced by begin_paper_effect(), is_alpha_premult(), and toggle_active(). |
|
|
|
Definition at line 1616 of file paper_effect.C. References ERR_LEV_INFO, err_mesg(), GL_MAX_GENERAL_COMBINERS_NV, GLExtensions::gl_nv_register_combiners_supported(), and glGetIntegerv(). Referenced by init(). |
|
Definition at line 1586 of file paper_effect.C. References ERR_LEV_INFO, err_mesg(), GLExtensions::gl_arb_multitexture_supported(), GL_MAX_TEXTURE_UNITS_ARB, and glGetIntegerv(). Referenced by init(). |
|
Definition at line 68 of file paper_effect_base.H. References PaperEffectBase::_is_active. Referenced by VIEW::put_view_paper_active(). |
|
Definition at line 1265 of file paper_effect.C. References PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, and init(). Referenced by ToonTexture_1D::draw(). |
|
Definition at line 29 of file paper_effect_base.C. References PaperEffectBase::_obs, and ARRAY< T >::num(). Referenced by check_new_paper(), and PaperEffectBase::set_paper_tex(). |
|
Definition at line 40 of file paper_effect_base.C. References PaperEffectBase::_obs, and ARRAY< T >::num(). Referenced by toggle_active(). |
|
Definition at line 390 of file paper_effect.C. References GL_TEXTURE1_ARB. Referenced by ToonTexCB::faceCB(), and ToonTexCB_1D::faceCB(). |
|
Definition at line 62 of file paper_effect_base.H. References PaperEffectBase::_obs. |
|
Definition at line 71 of file paper_effect_base.H. References PaperEffectBase::_brig. Referenced by VIEW::get_view_paper_brig(). |
|
Definition at line 74 of file paper_effect_base.H. References PaperEffectBase::_cont. Referenced by VIEW::get_view_paper_cont(). |
|
Definition at line 76 of file paper_effect_base.H. References PaperEffectBase::_delayed_activate, and PaperEffectBase::_delayed_activate_state. Referenced by VIEW::get_view_paper_active(). |
|
Definition at line 66 of file paper_effect_base.H. References PaperEffectBase::_paper_tex, and PaperEffectBase::notify_paper_changed(). Referenced by VIEW::get_view_paper_name(). |
|
Definition at line 403 of file paper_effect.C. References PaperEffectBase::_is_active, PaperEffectBase::_is_inited, PaperEffectBase::_is_supported, ERR_LEV_INFO, err_mesg(), glMultiTexCoord2dvARB, init(), no_op(), and PaperEffectBase::notify_usage_toggled(). Referenced by delayed_activate(). |
|
Definition at line 49 of file paper_effect_base.H. Referenced by begin_paper_effect(), PaperEffectBase::get_brig(), and PaperEffectBase::set_brig(). |
|
Definition at line 50 of file paper_effect_base.H. Referenced by begin_paper_effect(), PaperEffectBase::get_cont(), and PaperEffectBase::set_cont(). |
|
Definition at line 43 of file paper_effect_base.H. Referenced by delayed_activate(), and PaperEffectBase::set_delayed_activate(). |
|
Definition at line 44 of file paper_effect_base.H. Referenced by delayed_activate(), and PaperEffectBase::set_delayed_activate(). |
|
Initial value: { "!!ARBfp1.0\n\ \ ATTRIB iCol = fragment.color;\ ATTRIB iTex0 = fragment.texcoord[0];\ \ OUTPUT oCol = result.color;\ \ TEMP tResult;\ \ \ \ TXP tResult, iTex0, texture[0], 1D;\ \ MUL tResult, iCol, tResult;\ \ MUL tResult.rgb, tResult, tResult.a;\ \ MOV oCol, tResult;\ \ END" } Definition at line 36 of file paper_effect.H. Referenced by init_arb(). |
|
Initial value: { "!!ARBfp1.0\n\ \ ATTRIB iCol = fragment.color;\ ATTRIB iTex0 = fragment.texcoord[0];\ \ OUTPUT oCol = result.color;\ \ TEMP tResult;\ \ \ \ TXP tResult, iTex0, texture[0], 2D;\ \ MUL tResult, iCol, tResult;\ \ MUL tResult.rgb, tResult, tResult.a;\ \ MOV oCol, tResult;\ \ END" } Definition at line 37 of file paper_effect.H. Referenced by init_arb(). |
|
Definition at line 27 of file paper_effect.H. Referenced by begin_paper_effect_arb(), and init_arb(). |
|
Definition at line 28 of file paper_effect.H. Referenced by begin_paper_effect_arb(), and init_arb(). |
|
Definition at line 26 of file paper_effect.H. Referenced by begin_paper_effect_arb(), and init_arb(). |
|
Initial value: { "!!ARBfp1.0\n\ \ ATTRIB iCol = fragment.color;\ \ OUTPUT oCol = result.color;\ \ TEMP tResult;\ \ \ \ MOV tResult, iCol;\ \ MUL tResult.rgb, tResult, tResult.a;\ \ MOV oCol, tResult;\ \ END" } Definition at line 35 of file paper_effect.H. Referenced by init_arb(). |
|
Definition at line 23 of file paper_effect.H. Referenced by begin_paper_effect(), begin_paper_effect_arb(), begin_paper_effect_ati(), begin_paper_effect_nv(), end_paper_effect(), end_paper_effect_arb(), end_paper_effect_ati(), end_paper_effect_nv(), and init(). |
|
Definition at line 47 of file paper_effect_base.H. Referenced by begin_paper_effect_arb(), begin_paper_effect_ati(), begin_paper_effect_nv(), delayed_activate(), end_paper_effect_arb(), end_paper_effect_ati(), end_paper_effect_nv(), PaperEffectBase::is_active(), and toggle_active(). |
|
Definition at line 45 of file paper_effect_base.H. Referenced by begin_paper_effect(), begin_paper_effect_arb(), begin_paper_effect_ati(), begin_paper_effect_nv(), end_paper_effect(), end_paper_effect_arb(), end_paper_effect_ati(), end_paper_effect_nv(), init(), is_alpha_premult(), and toggle_active(). |
|
Definition at line 46 of file paper_effect_base.H. Referenced by begin_paper_effect(), begin_paper_effect_arb(), begin_paper_effect_ati(), begin_paper_effect_nv(), end_paper_effect(), end_paper_effect_arb(), end_paper_effect_ati(), end_paper_effect_nv(), init(), is_alpha_premult(), and toggle_active(). |
|
Definition at line 38 of file paper_effect_base.H. Referenced by PaperEffectBase::add_obs(), PaperEffectBase::notify_paper_changed(), PaperEffectBase::notify_usage_toggled(), and PaperEffectBase::rem_obs(). |
|
Definition at line 41 of file paper_effect_base.H. Referenced by check_new_paper(). |
|
Definition at line 33 of file paper_effect.H. Referenced by begin_paper_effect_ati(), and init_ati(). |
|
Definition at line 40 of file paper_effect_base.H. Referenced by check_new_paper(), PaperEffectBase::get_paper_tex(), and PaperEffectBase::set_paper_tex(). |
|
Definition at line 43 of file paper_effect.H. Referenced by begin_paper_effect(), check_new_paper(), and end_paper_effect(). |
|
Definition at line 54 of file paper_effect.H. Referenced by get_texture(). |
|
Definition at line 55 of file paper_effect.H. Referenced by get_texture(). |
|
Definition at line 57 of file paper_effect.H. Referenced by get_texture(). |
|
Definition at line 56 of file paper_effect.H. Referenced by get_texture(). |
|
Definition at line 30 of file paper_effect.H. Referenced by begin_paper_effect_arb(), and init_arb(). |
|
Definition at line 31 of file paper_effect.H. Referenced by begin_paper_effect_arb(), and init_arb(). |
|
Definition at line 29 of file paper_effect.H. Referenced by begin_paper_effect_arb(), and init_arb(). |
|
Definition at line 39 of file paper_effect.H. Referenced by init_arb(). |
|
Definition at line 40 of file paper_effect.H. Referenced by init_arb(). |
|
Definition at line 38 of file paper_effect.H. Referenced by init_arb(). |