MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / loadShaderSource

Function loadShaderSource

src/opengl_depth_packet_processor.cpp:100–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98};
99
100std::string loadShaderSource(const std::string& filename)
101{
102 const unsigned char* data;
103 size_t length = 0;
104
105 if(!loadResource(filename, &data, &length))
106 {
107 LOG_ERROR << "failed to load shader source!";
108 return "";
109 }
110
111 return std::string(reinterpret_cast<const char*>(data), length);
112}
113
114struct ShaderProgram : public WithOpenGLBindings
115{

Callers 1

initializeMethod · 0.85

Calls 2

loadResourceFunction · 0.85
stringFunction · 0.85

Tested by

no test coverage detected