14 #include "system_gl.h"    26     virtual bool Compile() = 0;
    27     virtual void Free() = 0;
    28     virtual GLuint Handle() = 0;
    29     virtual void SetSource(
const std::string& src) { m_source = src; }
    30     virtual bool LoadSource(
const std::string& filename, 
const std::string& prefix = 
"");
    31     virtual bool AppendSource(
const std::string& filename);
    32     virtual bool InsertSource(
const std::string& filename, 
const std::string& loc);
    33     bool OK()
 const { 
return m_compiled; }
    35     std::string GetName()
 const { 
return m_filenames; }
    36     std::string GetSourceWithLineNumbers() 
const;
    40     std::string m_lastLog;
    41     std::vector<std::string> m_attr;
    42     bool m_compiled = 
false;
    45     std::string m_filenames;
    57     void Free()
 override {}
    58     GLuint Handle()
 override { 
return m_vertexShader; }
    61     GLuint m_vertexShader = 0;
    68     bool Compile() 
override;
    80     void Free()
 override {}
    81     GLuint Handle()
 override { 
return m_pixelShader; }
    84     GLuint m_pixelShader = 0;
    91     bool Compile() 
override;
   110     virtual bool Enable() = 0;
   113     virtual void Disable() = 0;
   116     bool OK()
 const { 
return m_ok; }
   125     virtual bool CompileAndLink() = 0;
   129     virtual void OnCompiledAndLinked() {}
   135     virtual bool OnEnabled() { 
return true; }
   136     virtual void OnDisabled() { }
   138     virtual GLuint ProgramHandle() { 
return m_shaderProgram; }
   143     GLuint m_shaderProgram = 0;
   153                        , 
const std::string& frag);
   157     bool Enable() 
override;
   160     void Disable() 
override;
   163     bool CompileAndLink() 
override;
   169     bool m_validated = 
false;
 
Definition: LinuxRendererGL.h:30