1 #ifndef __DALI_INTERNAL_ADAPTOR_BASE_EGL_INTERFACE_H__
2 #define __DALI_INTERNAL_ADAPTOR_BASE_EGL_INTERFACE_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://floralicense.org/license/
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
28 * EglInterface provides an interface for managing EGL contexts
35 NO_SYNC = 0, ///< not synchronised to display (driver might over-ride?)
36 FULL_SYNC = 1, ///< redraw at display refresh rate
37 HALF_SYNC = 2, ///< redraw at half display refresh rate
38 QUARTER_SYNC = 4 ///< redraw at quarter display refresh rate
42 * Create the OpenGL context.
43 * @return true if successful
45 virtual bool CreateContext() = 0;
48 * Make the OpenGL context current
50 virtual void MakeContextCurrent() = 0;
55 virtual void TerminateGles() = 0;
58 * Sets the refresh sync mode.
61 virtual bool SetRefreshSync( SyncMode mode ) = 0;
64 * Performs an OpenGL swap buffers command
66 virtual void SwapBuffers() = 0;
69 * Performs an OpenGL copy buffers command
71 virtual void CopyBuffers() = 0;
74 * Performs an EGL wait GL command
76 virtual void WaitGL() = 0;
80 * Virtual protected destructor, no deletion through this interface
82 virtual ~EglInterface() {}
85 } // namespace Adaptor
87 } // namespace Internal
91 #endif // __DALI_INTERNAL_ADAPTOR_BASE_EGL_INTERFACE_H__