Line 66... |
Line 66... |
66 |
*/
|
66 |
*/
|
67 |
|
67 |
|
68 |
namespace GLGraphics
|
68 |
namespace GLGraphics
|
69 |
{
|
69 |
{
|
70 |
/// Print the info log for a program if the status is not OK.
|
70 |
/// Print the info log for a program if the status is not OK.
|
71 |
void print_glsl_program_log(GLuint obj);
|
71 |
void print_glsl_program_log(GLuint program);
|
- |
|
72 |
|
- |
|
73 |
/// Print the info log for a shader if the status is not OK.
|
- |
|
74 |
void print_glsl_shader_log(GLuint shader);
|
72 |
|
75 |
|
73 |
/** The two arguments are concatenated to form the name with full path of a text file.
|
76 |
/** The two arguments are concatenated to form the name with full path of a text file.
|
74 |
This file is read and returned as a string. */
|
77 |
This file is read and returned as a string. */
|
75 |
const std::string read_glsl_source(const std::string& path, const std::string& file);
|
78 |
const std::string read_glsl_source(const std::string& path, const std::string& file);
|
76 |
|
79 |
|
77 |
/** Create a shader of type specified by the first argument from a source string given
|
80 |
/** Create a shader of type specified by the first argument from a source string given
|
78 |
as second argument. Return shader handle. If there is a problem, the infolog is
|
81 |
as second argument. Return shader handle. If there is a problem, the infolog is
|
79 |
printed and 0 is returned. */
|
82 |
printed and 0 is returned (unless the third argument is false). */
|
80 |
GLuint create_glsl_shader(GLuint stype, const std::string& src);
|
83 |
GLuint create_glsl_shader(GLuint stype, const std::string& src, bool print_log = true);
|
81 |
|
84 |
|
82 |
/** Create a shader of type specified as first argument from the file indicated by the
|
85 |
/** Create a shader of type specified as first argument from the file indicated by the
|
83 |
supplied path and file name (second and third arguments) and return a shader handle.
|
86 |
supplied path and file name (second and third arguments) and return a shader handle.
|
84 |
This function is only a convenience function wrapping read_glsl_source and
|
87 |
This function is only a convenience function wrapping read_glsl_source and
|
85 |
create_glsl_shader */
|
88 |
create_glsl_shader */
|