Dali 3D User Interface Engine
egl-debug.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 // CLASS HEADER
19 #include <gl/egl-debug.h>
20 
21 // EXTERNAL INCLUDES
23 
24 namespace Dali
25 {
26 
27 namespace Internal
28 {
29 
30 namespace Adaptor
31 {
32 
33 namespace Egl
34 {
35 
36 void PrintError( EGLint error)
37 {
38  switch (error)
39  {
40  case EGL_BAD_DISPLAY:
41  {
42  DALI_LOG_ERROR("EGL_BAD_DISPLAY : Display is not an EGL display connection\n");
43  break;
44  }
45  case EGL_NOT_INITIALIZED:
46  {
47  DALI_LOG_ERROR("EGL_NOT_INITIALIZED : Display has not been initialized\n");
48  break;
49  }
50  case EGL_BAD_SURFACE:
51  {
52  DALI_LOG_ERROR("EGL_BAD_SURFACE : Draw or read is not an EGL surface\n");
53  break;
54  }
55  case EGL_BAD_CONTEXT:
56  {
57  DALI_LOG_ERROR("EGL_BAD_CONTEXT : Context is not an EGL rendering context\n");
58  break;
59  }
60  case EGL_BAD_MATCH:
61  {
62  DALI_LOG_ERROR("EGL_BAD_MATCH : Draw or read are not compatible with context, or if context is set to EGL_NO_CONTEXT and draw or read are not set to EGL_NO_SURFACE, or if draw or read are set to EGL_NO_SURFACE and context is not set to EGL_NO_CONTEXT\n");
63  break;
64  }
65  case EGL_BAD_ACCESS:
66  {
67  DALI_LOG_ERROR("EGL_BAD_ACCESS : Context is current to some other thread\n");
68  break;
69  }
70  case EGL_BAD_NATIVE_PIXMAP:
71  {
72  DALI_LOG_ERROR("EGL_BAD_NATIVE_PIXMAP : A native pixmap underlying either draw or read is no longer valid\n");
73  break;
74  }
75  case EGL_BAD_NATIVE_WINDOW:
76  {
77  DALI_LOG_ERROR("EGL_BAD_NATIVE_WINDOW : A native window underlying either draw or read is no longer valid\n");
78  break;
79  }
80  case EGL_BAD_CURRENT_SURFACE:
81  {
82  DALI_LOG_ERROR("EGL_BAD_CURRENT_SURFACE : The previous context has unflushed commands and the previous surface is no longer valid\n");
83  break;
84  }
85  case EGL_BAD_ALLOC:
86  {
87  DALI_LOG_ERROR("EGL_BAD_ALLOC : Allocation of ancillary buffers for draw or read were delayed until eglMakeCurrent is called, and there are not enough resources to allocate them\n");
88  break;
89  }
90  case EGL_CONTEXT_LOST:
91  {
92  DALI_LOG_ERROR("EGL_CONTEXT_LOST : If a power management event has occurred. The application must destroy all contexts and reinitialise OpenGL ES state and objects to continue rendering\n");
93  break;
94  }
95  default:
96  {
97  DALI_LOG_ERROR("Unknown error with code: %d\n", error);
98  break;
99  }
100  }
101 }
102 
103 } // namespace Egl
104 
105 } // namespace Adaptor
106 
107 } // namespace Internal
108 
109 } // namespace Dali
Dali Docs Home
Read more about Dali