2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiEffects_RendererLog.cpp
20 * @brief This is the source file for the renderer logging functions
22 #include <FUiEffects_RendererLog.h>
25 #include <FGraphicsOpengl2.h>
26 #include <FGraphics.h>
27 #include <FBaseSysLog.h>
29 using namespace Tizen::Graphics::Opengl;
31 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer
35 CheckEglNoErrors(void)
37 EGLint egl_error_code = eglGetError();
39 switch (egl_error_code)
43 case EGL_NOT_INITIALIZED:
44 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_NOT_INITIALIZED");
47 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_ACCESS");
50 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_ALLOC");
52 case EGL_BAD_ATTRIBUTE:
53 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_ATTRIBUTE");
56 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_CONTEXT");
59 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_CONFIG");
61 case EGL_BAD_CURRENT_SURFACE:
62 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_CURRENT_SURFACE");
65 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_DISPLAY");
68 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_SURFACE");
71 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_MATCH");
73 case EGL_BAD_PARAMETER:
74 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_PARAMETER");
76 case EGL_BAD_NATIVE_PIXMAP:
77 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_NATIVE_PIXMAP");
79 case EGL_BAD_NATIVE_WINDOW:
80 SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_NATIVE_WINDOW");
83 SysLog(NID_UI_EFFECT, "[OpenGL] Unknown eglGetError error code %d", egl_error_code);
93 GLint gl_error_code = glGetError();
95 switch (gl_error_code)
100 SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_ENUM");
102 case GL_INVALID_VALUE:
103 SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_VALUE");
105 case GL_INVALID_OPERATION:
106 SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_OPERATION");
108 case GL_INVALID_FRAMEBUFFER_OPERATION:
109 SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_FRAMEBUFFER_OPERATION");
111 case GL_OUT_OF_MEMORY:
112 SysLog(NID_UI_EFFECT, "[OpenGL] GL_OUT_OF_MEMORY");
121 } } } } // Tizen::Ui::Effects::_EffectRenderer