1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * This file is part of the libgltf project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 */ 9 10 #ifndef INCLUDED_VCL_OPENGL_OPENGLCONTEXT_HXX 11 #define INCLUDED_VCL_OPENGL_OPENGLCONTEXT_HXX 12 13 class OpenGLContext_Impl; 14 15 class OpenGLContext 16 { 17 public: 18 OpenGLContext(); 19 ~OpenGLContext(); 20 21 bool init(); 22 23 void makeCurrent(); 24 void resetCurrent(); 25 void swapBuffers(); 26 void sync(); 27 28 void setWinPosAndSize(const int nX, const int nY, const int nWidth, const int nHeight); 29 void setWinSize(const int nWidth, const int nHeight); 30 31 bool isInitialized() const; 32 33 private: 34 OpenGLContext(const OpenGLContext&); 35 OpenGLContext& operator=(const OpenGLContext&); 36 37 OpenGLContext_Impl* mpImpl; 38 bool mbInitialized; 39 }; 40 41 #endif 42 43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 44