Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 279 vs 280 for /trunk/Source Code/Hardware/Video/OpenGL/GLStates.cpp

Diff revisions: vs.
  @@ -61,18 +61,16 @@
61 61 }
62 62
63 63 void GL_API::updateClipPlanes(){
64 - GLuint clipPlaneIndex = 0;
65 64 bool clipPlaneActive = false;
66 65
67 66 const PlaneList& list = GFX_DEVICE.getClippingPlanes();
68 67
69 - for (const Plane<F32>& clipPlane : list){
70 - clipPlaneIndex = clipPlane.getIndex();
71 - clipPlaneActive = clipPlane.active();
68 + for (U8 i = 0; i < Config::MAX_CLIP_PLANES; ++i){
69 + clipPlaneActive = list[i].active();
72 70
73 - if (_activeClipPlanes[clipPlaneIndex] != clipPlaneActive){
74 - _activeClipPlanes[clipPlaneIndex] = clipPlaneActive;
75 - clipPlaneActive ? glEnable(GL_CLIP_DISTANCE0 + clipPlaneIndex) : glDisable(GL_CLIP_DISTANCE0 + clipPlaneIndex);
71 + if (_activeClipPlanes[i] != clipPlaneActive){
72 + _activeClipPlanes[i] = clipPlaneActive;
73 + clipPlaneActive ? glEnable(GL_CLIP_DISTANCE0 + i) : glDisable(GL_CLIP_DISTANCE0 + i);
76 74 }
77 75 }
78 76 }