Ejemplo n.º 1
0
        public void resetRenderState()
        {
            //create a blank/default renderstate and apply it (this will update the global render state
            RenderState rs = new RenderState();

            rs.apply();

            //clear out any previously bound buffers
            for (int i = 0; i < myBoundUniformBuffers.Length; i++)
            {
                bindUniformBuffer(0, i);
                myBoundUniformBuffers[i] = 0;
            }

            for (int i = 0; i < myBoundStorageBuffers.Length; i++)
            {
                bindStorageBuffer(0, i);
                myBoundStorageBuffers[i] = 0;
            }

            for (int i = 0; i < myBoundImageBuffers.Length; i++)
            {
                bindImageBuffer(0, i, TextureAccess.ReadOnly, SizedInternalFormat.R32f);
                myBoundImageBuffers[i] = 0;
            }

            for (int i = 0; i < myBoundVertexBuffers.Length; i++)
            {
                bindVertexBuffer(0, i, 0, 0);
                myBoundVertexBuffers[i] = 0;
            }

            for (int i = 0; i < myBoundTextures.Length; i++)
            {
                if (myBoundTextures[i].id != 0)
                {
                    bindTexture(0, i, myBoundTextures[i].type);
                }
            }

            bindIndexBuffer(0);
        }
Ejemplo n.º 2
0
 public override void execute()
 {
     //apply the renderstate
     myRenderState.apply();
 }