-----------------------------------------------------------------------------
| 1231 | } |
| 1232 | //----------------------------------------------------------------------------- |
| 1233 | void GLRenderSystem::_setPointParameters(bool attenuationEnabled, Real minSize, Real maxSize) |
| 1234 | { |
| 1235 | if(attenuationEnabled) |
| 1236 | { |
| 1237 | // Point size is still calculated in pixels even when attenuation is |
| 1238 | // enabled, which is pretty awkward, since you typically want a viewport |
| 1239 | // independent size if you're looking for attenuation. |
| 1240 | // So, scale the point size up by viewport size (this is equivalent to |
| 1241 | // what D3D does as standard) |
| 1242 | minSize = minSize * mActiveViewport->getActualHeight(); |
| 1243 | if (maxSize == 0.0f) |
| 1244 | maxSize = mCurrentCapabilities->getMaxPointSize(); // pixels |
| 1245 | else |
| 1246 | maxSize = maxSize * mActiveViewport->getActualHeight(); |
| 1247 | |
| 1248 | if (mCurrentCapabilities->hasCapability(RSC_VERTEX_PROGRAM)) |
| 1249 | mStateCacheManager->setEnabled(GL_VERTEX_PROGRAM_POINT_SIZE, true); |
| 1250 | } |
| 1251 | else |
| 1252 | { |
| 1253 | if (maxSize == 0.0f) |
| 1254 | maxSize = mCurrentCapabilities->getMaxPointSize(); |
| 1255 | if (mCurrentCapabilities->hasCapability(RSC_VERTEX_PROGRAM)) |
| 1256 | mStateCacheManager->setEnabled(GL_VERTEX_PROGRAM_POINT_SIZE, false); |
| 1257 | } |
| 1258 | |
| 1259 | mStateCacheManager->setPointParameters(NULL, minSize, maxSize); |
| 1260 | } |
| 1261 | |
| 1262 | void GLRenderSystem::_setLineWidth(float width) |
| 1263 | { |
no test coverage detected