projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove RenderSurface from Core
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
render
/
gl-resources
/
context.cpp
diff --git
a/dali/internal/render/gl-resources/context.cpp
b/dali/internal/render/gl-resources/context.cpp
index
041565e
..
ead1be3
100644
(file)
--- a/
dali/internal/render/gl-resources/context.cpp
+++ b/
dali/internal/render/gl-resources/context.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 20
16
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-21,9
+21,9
@@
// EXTERNAL INCLUDES
#include <algorithm>
#include <cstring>
// EXTERNAL INCLUDES
#include <algorithm>
#include <cstring>
+#include <type_traits>
// INTERNAL INCLUDES
// INTERNAL INCLUDES
-#include <dali/public-api/common/compile-time-assert.h>
#include <dali/public-api/common/constants.h>
#include <dali/public-api/rendering/texture-set.h>
#include <dali/integration-api/platform-abstraction.h>
#include <dali/public-api/common/constants.h>
#include <dali/public-api/rendering/texture-set.h>
#include <dali/integration-api/platform-abstraction.h>
@@
-39,7
+39,7
@@
namespace Internal
namespace // unnamed namespace
{
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
/**
* GL error strings
@@
-64,7
+64,12
@@
errorStrings errors[] =
Debug::Filter* gContextLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_CONTEXT_STATE");
#endif
Debug::Filter* gContextLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_CONTEXT_STATE");
#endif
-Context::Context(Integration::GlAbstraction& glAbstraction)
+Context::Context( Integration::GlAbstraction& glAbstraction )
+: Context( glAbstraction, nullptr )
+{
+}
+
+Context::Context( Integration::GlAbstraction& glAbstraction, std::vector< Context* >* contexts )
: mGlAbstraction(glAbstraction),
mGlContextCreated(false),
mColorMask(true),
: mGlAbstraction(glAbstraction),
mGlContextCreated(false),
mColorMask(true),
@@
-91,11
+96,18
@@
Context::Context(Integration::GlAbstraction& glAbstraction)
mBlendFuncSeparateDstAlpha(GL_ZERO),
mBlendEquationSeparateModeRGB( GL_FUNC_ADD ),
mBlendEquationSeparateModeAlpha( GL_FUNC_ADD ),
mBlendFuncSeparateDstAlpha(GL_ZERO),
mBlendEquationSeparateModeRGB( GL_FUNC_ADD ),
mBlendEquationSeparateModeAlpha( GL_FUNC_ADD ),
+ mStencilFunc( GL_ALWAYS ),
+ mStencilFuncRef( 0 ),
+ mStencilFuncMask( 0xFFFFFFFF ),
+ mStencilOpFail( GL_KEEP ),
+ mStencilOpDepthFail( GL_KEEP ),
+ mStencilOpDepthPass( GL_KEEP ),
mDepthFunction( GL_LESS ),
mMaxTextureSize(0),
mClearColor(Color::WHITE), // initial color, never used until it's been set by the user
mCullFaceMode( FaceCullingMode::NONE ),
mDepthFunction( GL_LESS ),
mMaxTextureSize(0),
mClearColor(Color::WHITE), // initial color, never used until it's been set by the user
mCullFaceMode( FaceCullingMode::NONE ),
- mViewPort( 0, 0, 0, 0 )
+ mViewPort( 0, 0, 0, 0 ),
+ mSceneContexts( contexts )
{
}
{
}
@@
-241,7
+253,7
@@
void Context::InitializeGlState()
memset( &mVertexAttributeCurrentState, 0, sizeof(mVertexAttributeCurrentState) );
//Initialize bound 2d texture cache
memset( &mVertexAttributeCurrentState, 0, sizeof(mVertexAttributeCurrentState) );
//Initialize bound 2d texture cache
- memset( &mBound
2dTextureId, 0, sizeof(mBound2
dTextureId) );
+ memset( &mBound
TextureId, 0, sizeof(mBoun
dTextureId) );
mFrameBufferStateCache.Reset();
}
mFrameBufferStateCache.Reset();
}