Ejemplo n.º 1
0
 /// <summary>
 /// Bind <code>GLPass</code> for debugging.
 /// </summary>
 /// <param name="pass">The pass to bind for debugging.</param>
 /// <param name="frame">The current frame ID to generate debug information for.</param>
 public static void Bind(GLPass pass, int frame)
 {
     // get debug uniforms for the pass
     Uniforms unif;
     if (!passes.TryGetValue(pass.glname, out unif))
         passes.Add(pass.glname, unif = new Uniforms(pass));
     // set shader debug uniforms
     unif.Bind(Settings, frame);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// End debugging of the specified pass. Must be
 /// the same as when calling <code>Bind</code>.
 /// </summary>
 /// <param name="pass">The pass specified when calling <code>Bind</code>.</param>
 public static void Unbind(GLPass pass)
 {
     Uniforms unif;
     if (passes.TryGetValue(pass.glname, out unif))
         unif.Unbind();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create debug uniform class for the specified pass.
 /// </summary>
 /// <param name="pass"></param>
 public Uniforms(GLPass pass)
 {
     dbgOut = GL.GetUniformLocation(pass.glname, "_dbgOut");
     dbgVert = GL.GetUniformLocation(pass.glname, "_dbgVert");
     dbgTess = GL.GetUniformLocation(pass.glname, "_dbgTess");
     dbgEval = GL.GetUniformLocation(pass.glname, "_dbgEval");
     dbgGeom = GL.GetUniformLocation(pass.glname, "_dbgGeom");
     dbgFrag = GL.GetUniformLocation(pass.glname, "_dbgFrag");
     dbgComp = GL.GetUniformLocation(pass.glname, "_dbgComp");
     dbgFrame = GL.GetUniformLocation(pass.glname, "_dbgFrame");
     unit = -1;
     data = null;
 }