public void Render(float partialTicks) { ParticleModel.Bind(); for (int i = 0; i < _particles.Count; i++) { _particles[i].Render(partialTicks); } ParticleModel.Unbind(); }
public void Render(float partialTicks) { float partialRot = _lastTick + (_tick - _lastTick) * partialTicks; Matrix4 mat = MatrixHelper.CreateTransformationMatrix(SharpCraft.Instance.Camera.Pos, Vector3.UnitY * partialRot / 10, 1); _cube.Bind(); _cube.Shader.SetMatrix4("transformationMatrix", mat); GL.BindTexture(TextureTarget.TextureCubeMap, _texture); _cube.RawModel.Render(); _cube.Unbind(); }
public void Render(float partialTicks) { float partialRot = lastTick + (tick - lastTick) * partialTicks; Matrix4 mat = MatrixHelper.CreateTransformationMatrix(SharpCraft.Instance.Camera.pos, Vector3.UnitY * partialRot / 10, 1); cube.Bind(); cube.Shader.UpdateGlobalUniforms(); cube.Shader.UpdateModelUniforms(cube.RawModel); cube.Shader.UpdateInstanceUniforms(mat, null); GL.BindTexture(TextureTarget.TextureCubeMap, texture); cube.RawModel.Render(PrimitiveType.Triangles); cube.Unbind(); }