#define TEST_GL_ABSTRACTION_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
void PreRender();
void PostRender();
+ bool IsSurfacelessContextSupported() const;
+
+ bool TextureRequiresConverting( const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage ) const;
+
/* OpenGL ES 2.0 */
inline void ActiveTexture( GLenum textureUnit )
inline void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
+ mLastClearColor.r = red;
+ mLastClearColor.g = green;
+ mLastClearColor.b = blue;
+ mLastClearColor.a = alpha;
+ }
+
+ inline const Vector4& GetLastClearColor() const
+ {
+ return mLastClearColor;
}
inline void ClearDepthf(GLclampf depth)
inline void Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
+ std::string commaString(", ");
+ std::string params( std::to_string(x) + commaString + std::to_string(y) + commaString + std::to_string(width) + commaString + std::to_string(height) );
+
+ mViewportTrace.PushCall("Viewport", params);
}
/* OpenGL ES 3.0 */
inline void ResetSetUniformCallStack() { mSetUniformTrace.Reset(); }
inline TraceCallStack& GetSetUniformTrace() { return mSetUniformTrace; }
+ //Methods for Viewport verification
+ inline void EnableViewportCallTrace(bool enable) { mViewportTrace.Enable(enable); }
+ inline void ResetViewportCallStack() { mViewportTrace.Reset(); }
+ inline TraceCallStack& GetViewportTrace() { return mViewportTrace; }
+
template <typename T>
inline bool GetUniformValue( const char* name, T& value ) const
{
ShaderSourceMap mShaderSources;
GLuint mLastShaderCompiled;
GLbitfield mLastClearBitMask;
+ Vector4 mLastClearColor;
unsigned int mClearCount;
Vector4 mLastBlendColor;
TraceCallStack mStencilFunctionTrace;
TraceCallStack mScissorTrace;
TraceCallStack mSetUniformTrace;
+ TraceCallStack mViewportTrace;
// Shaders & Uniforms
GLuint mLastShaderIdUsed;