| 132 | } |
| 133 | |
| 134 | void drawexplosion(bool inside, float r, float g, float b, float a) |
| 135 | { |
| 136 | if(mtexplosion && maxtmus>=2 && lastexpmodtex != expmodtex[inside ? 1 : 0]) |
| 137 | { |
| 138 | glActiveTexture_(GL_TEXTURE1_ARB); |
| 139 | lastexpmodtex = expmodtex[inside ? 1 :0]; |
| 140 | glBindTexture(GL_TEXTURE_2D, lastexpmodtex); |
| 141 | glActiveTexture_(GL_TEXTURE0_ARB); |
| 142 | } |
| 143 | loopi(!reflecting && inside ? 2 : 1) |
| 144 | { |
| 145 | glColor4f(r, g, b, i ? a/2 : a); |
| 146 | if(i) |
| 147 | { |
| 148 | glScalef(1, 1, -1); |
| 149 | glDepthFunc(GL_GEQUAL); |
| 150 | } |
| 151 | if(inside) |
| 152 | { |
| 153 | if(!reflecting) |
| 154 | { |
| 155 | glCullFace(GL_BACK); |
| 156 | glDrawElements(GL_TRIANGLES, heminumindices, GL_UNSIGNED_SHORT, hemiindices); |
| 157 | glCullFace(GL_FRONT); |
| 158 | } |
| 159 | glScalef(1, 1, -1); |
| 160 | } |
| 161 | glDrawElements(GL_TRIANGLES, heminumindices, GL_UNSIGNED_SHORT, hemiindices); |
| 162 | if(i) glDepthFunc(GL_LESS); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | void cleanupexplosion() |
| 167 | { |
no test coverage detected