X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fgl-resources%2Fcontext.cpp;h=d3e0b56114415c47259dc898baa4374a1cc7bd34;hb=refs%2Fchanges%2F43%2F160543%2F2;hp=e7014523b78f1017f2a195bf935fcba271b1a17d;hpb=ba5ad9b4f9cc695a5b4ddbe0aa349bc8f596306e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/gl-resources/context.cpp b/dali/internal/render/gl-resources/context.cpp index e701452..d3e0b56 100644 --- a/dali/internal/render/gl-resources/context.cpp +++ b/dali/internal/render/gl-resources/context.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,14 @@ // EXTERNAL INCLUDES #include #include +#include // INTERNAL INCLUDES #include -#include +#include #include #include #include -#include namespace Dali { @@ -39,7 +39,7 @@ namespace Internal namespace // unnamed namespace { -DALI_COMPILE_TIME_ASSERT( TEXTURE_UNIT_LAST <= Context::MAX_TEXTURE_UNITS ); +static_assert( TEXTURE_UNIT_LAST <= Context::MAX_TEXTURE_UNITS, "TEXTURE_UNIT_LAST is greater than Context::MAX_TEXTURE_UNITS" ); /** * GL error strings @@ -91,9 +91,10 @@ Context::Context(Integration::GlAbstraction& glAbstraction) mBlendFuncSeparateDstAlpha(GL_ZERO), mBlendEquationSeparateModeRGB( GL_FUNC_ADD ), mBlendEquationSeparateModeAlpha( GL_FUNC_ADD ), + mDepthFunction( GL_LESS ), mMaxTextureSize(0), mClearColor(Color::WHITE), // initial color, never used until it's been set by the user - mCullFaceMode( Dali::Renderer::NONE ), + mCullFaceMode( FaceCullingMode::NONE ), mViewPort( 0, 0, 0, 0 ) { } @@ -227,7 +228,7 @@ void Context::InitializeGlState() mBlendEquationSeparateModeRGB = GL_FUNC_ADD; mBlendEquationSeparateModeAlpha = GL_FUNC_ADD; - mCullFaceMode = Dali::Renderer::NONE; //By default cullface is disabled, front face is set to CCW and cull face is set to back + mCullFaceMode = FaceCullingMode::NONE; //By default cullface is disabled, front face is set to CCW and cull face is set to back // get maximum texture size mGlAbstraction.GetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize); @@ -240,7 +241,7 @@ void Context::InitializeGlState() memset( &mVertexAttributeCurrentState, 0, sizeof(mVertexAttributeCurrentState) ); //Initialize bound 2d texture cache - memset( &mBound2dTextureId, 0, sizeof(mBound2dTextureId) ); + memset( &mBoundTextureId, 0, sizeof(mBoundTextureId) ); mFrameBufferStateCache.Reset(); }