Track glEnable states via static refs instead of map lookups.
Sync light state, bound shader, and various gl context states similarly to render matrices. Texture handles now refcounted, as multiple viewer textures could ref the same handle (cubemaps do this) Clean up gl extension loading a bit. Not necessary, but only look for ARB variants if not included in current core version. Removed unused extensions. Use core shader api if supported, else use ARB. (FN signatures are identical. Just doing some pointer substitution to ARB if not core.) Attempt at improving VBO update batching. Subdata updates better batched to gether per-frame. There's probably other stuff I forgot that is in this changeset, too. Todo: Fix lightstate assertion when toggling fullscreen with shaders off.
This commit is contained in:
@@ -113,11 +113,9 @@ void LLDrawPoolSky::render(S32 pass)
|
||||
|
||||
LLGLSquashToFarClip far_clip(glh_get_current_projection());
|
||||
|
||||
LLGLEnable fog_enable( (mVertexShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater()) ? GL_FOG : 0);
|
||||
|
||||
gPipeline.disableLights();
|
||||
LLGLEnable<GL_FOG> fog_enable(mVertexShaderLevel < 1 && LLViewerCamera::getInstance()->cameraUnderWater());
|
||||
|
||||
LLGLDisable clip(GL_CLIP_PLANE0);
|
||||
LLGLDisable<GL_CLIP_PLANE0> clip;
|
||||
|
||||
gGL.pushMatrix();
|
||||
LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
|
||||
@@ -152,7 +150,7 @@ void LLDrawPoolSky::renderSkyCubeFace(U8 side)
|
||||
if (LLSkyTex::doInterpolate())
|
||||
{
|
||||
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
LLGLEnable<GL_BLEND> blend;
|
||||
mSkyTex[side].bindTexture(FALSE);
|
||||
gGL.diffuseColor4f(1, 1, 1, LLSkyTex::getInterpVal()); // lighting is disabled
|
||||
face.renderIndexed();
|
||||
|
||||
Reference in New Issue
Block a user