public GLShader(string code, GLShaderType type = GLShaderType.Fragment, bool compileOnCreate = true) { SourceCode = code; Type = type; switch (type) { case GLShaderType.Fragment: TKType = ShaderType.FragmentShader; break; case GLShaderType.Vertex: TKType = ShaderType.VertexShader; break; case GLShaderType.Geometry: TKType = ShaderType.GeometryShader; break; } GLObject = GL.CreateShader(TKType); GL.ShaderSource(GLObject, code); if (compileOnCreate) { Compile(); } }
public GLShaderHandle CreateShader(GLShaderType type) { int shaderName = TKGL.CreateShader((ShaderType)type); AddContextObject(new ShaderDisposable(shaderName)); return(new GLShaderHandle(shaderName)); }
public GLShaderHandle CreateShader(GLShaderType type) { var shader = MacGL.CreateShader((ShaderType)type); AddContextObject(new ShaderDisposable(shader)); return(new GLShaderHandle(shader)); }
public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision) { try { this.BeginFunc(); return(this._gl.GetShaderPrecisionFormat(shader, precision)); } finally { this.EndFunc(); } }
public GLShaderHandle CreateShader(GLShaderType type) { try { this.BeginFunc(); return(this._gl.CreateShader(type)); } finally { this.EndFunc(); } }
public GLShader(string code, GLShaderType type = GLShaderType.FRAGMENT) { SourceCode = code; Type = type; switch (type) { case GLShaderType.FRAGMENT: TKType = ShaderType.FragmentShader; break; case GLShaderType.VERTEX: TKType = ShaderType.VertexShader; break; } GLObject = GL.CreateShader(TKType); GL.ShaderSource(GLObject, code); }
public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision) { return(new GLShaderPrecisionFormat()); }
public extern static uint compileShader(GLShaderType shaderType, [MarshalAs(UnmanagedType.LPStr)] string shaderSource);
public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision) { throw new NotImplementedException(); }
public static GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision) { return(GL._gl.GetShaderPrecisionFormat(shaderType, precision)); }
public static GLShaderHandle CreateShader(GLShaderType type) { return(GL._gl.CreateShader(type)); }
public GLShaderHandle CreateShader(GLShaderType type) { return(new GLShaderHandle(0)); }