MCPcopy Create free account
hub / github.com/SirLynix/obs-kinect / ConvertDepthIRToColorEffect

Method ConvertDepthIRToColorEffect

src/ConvertDepthIRToColorEffect.cpp:65–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63)";
64
65ConvertDepthIRToColorEffect::ConvertDepthIRToColorEffect()
66{
67 ObsGraphics gfx;
68
69 char* errStr;
70
71 m_effect = gs_effect_create(colorMultiplierEffect, "color_multiplier.effect", &errStr);
72 if (m_effect)
73 {
74 m_params_ColorImage = gs_effect_get_param_by_name(m_effect, "ColorImage");
75 m_params_ColorMultiplier = gs_effect_get_param_by_name(m_effect, "ColorMultiplier");
76 m_tech_Draw = gs_effect_get_technique(m_effect, "Draw");
77
78 m_workTexture = gs_texrender_create(GS_RGBA, GS_ZS_NONE);
79 }
80 else
81 {
82 std::string err("failed to create effect: ");
83 err.append((errStr) ? errStr : "shader error");
84 bfree(errStr);
85
86 throw std::runtime_error(err);
87 }
88}
89
90ConvertDepthIRToColorEffect::~ConvertDepthIRToColorEffect()
91{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected