public void UnbindTexturedModel() { GL.DisableVertexAttribArray(0); GL.DisableVertexAttribArray(1); GL.DisableVertexAttribArray(2); GL.BindVertexArray(0); MasterRenderer.EnableCulling(); }
public void Render(Camera camera) { MasterRenderer.DisableCulling(); shader.Start(); shader.LoadViewMatrix(camera.GetViewMatrix()); shader.LoadTransformationMatrix(camera.gameObject.transform.TransformationMatrixTranslation()); GL.BindVertexArray(cube.vaoID); GL.EnableVertexAttribArray(0); GL.ActiveTexture(TextureUnit.Texture0); GL.BindTexture(TextureTarget.TextureCubeMap, skyboxTextureID); GL.DrawArrays(PrimitiveType.Triangles, 0, cube.vertexCount); GL.DisableVertexAttribArray(0); GL.BindVertexArray(0); shader.Stop(); MasterRenderer.EnableCulling(); }