1{ 2 This file is part of the PTCPas framebuffer library 3 Copyright (C) 2012 Nikolay Nikolov (nickysn@users.sourceforge.net) 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version 9 with the following modification: 10 11 As a special exception, the copyright holders of this library give you 12 permission to link this library with independent modules to produce an 13 executable, regardless of the license terms of these independent modules,and 14 to copy and distribute the resulting executable under terms of your choice, 15 provided that you also meet, for each linked independent module, the terms 16 and conditions of the license of that module. An independent module is a 17 module which is not derived from or based on this library. If you modify 18 this library, you may extend this exception to your version of the library, 19 but you are not obligated to do so. If you do not wish to do so, delete this 20 exception statement from your version. 21 22 This library is distributed in the hope that it will be useful, 23 but WITHOUT ANY WARRANTY; without even the implied warranty of 24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 Lesser General Public License for more details. 26 27 You should have received a copy of the GNU Lesser General Public 28 License along with this library; if not, write to the Free Software 29 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 30} 31 32{$IFDEF ENABLE_X11_EXTENSION_GLX} 33type 34 TX11GLXFBConfig = class 35 private 36 FDisplay: PDisplay; 37 FScreen: cint; 38 39 FGLXFBConfig: TGLXFBConfig; 40 FVisInfo: TXVisualInfo; 41 42 FGLXContext: TGLXContext; 43 FGLXWindow: TGLXWindow; 44 FGLXWindowCreated: Boolean; 45 46 FSGISwapInterval: Integer; 47 48 FRenderingContextHasBeenMadeCurrentAtLeastOnce: Boolean; 49 50 procedure ChooseFBConfig(const AAttr: IPTCOpenGLAttributes); 51 procedure GetVisualFromFBConfig; 52 procedure CreateRenderingContext; 53 public 54 constructor Create(ADisplay: PDisplay; AScreen: cint; const AAttr: IPTCOpenGLAttributes); 55 destructor Destroy; override; 56 57 procedure AttachToWindow(AWindow: TWindow); 58 procedure MakeRenderingContextCurrent; 59 60 procedure SwapBuffers; 61 62 procedure SetSwapInterval(AInterval: Integer); 63 function GetSwapInterval: Integer; 64 end; 65{$ENDIF ENABLE_X11_EXTENSION_GLX} 66