Beispiel #1
0
 public ShaderProgram(Graphics graphics, ShaderVariation vertexShader, ShaderVariation pixelShader) : base(UrhoObjectFlag.Empty)
 {
     Runtime.Validate(typeof(ShaderProgram));
     handle = ShaderProgram_ShaderProgram((object)graphics == null ? IntPtr.Zero : graphics.Handle, (object)vertexShader == null ? IntPtr.Zero : vertexShader.Handle, (object)pixelShader == null ? IntPtr.Zero : pixelShader.Handle);
     Runtime.RegisterObject(this);
     OnShaderProgramCreated();
 }
Beispiel #2
0
 /// <summary>
 /// Collect a shader combination. Called by Graphics when shaders have been set.
 /// </summary>
 public void StoreShaders(ShaderVariation vs, ShaderVariation ps)
 {
     Runtime.ValidateRefCounted(this);
     ShaderPrecache_StoreShaders(handle, (object)vs == null ? IntPtr.Zero : vs.Handle, (object)ps == null ? IntPtr.Zero : ps.Handle);
 }