Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:58:15

0001 ////////////////////////////////////////////////////////////
0002 //
0003 // SFML - Simple and Fast Multimedia Library
0004 // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
0005 //
0006 // This software is provided 'as-is', without any express or implied warranty.
0007 // In no event will the authors be held liable for any damages arising from the use of this software.
0008 //
0009 // Permission is granted to anyone to use this software for any purpose,
0010 // including commercial applications, and to alter it and redistribute it freely,
0011 // subject to the following restrictions:
0012 //
0013 // 1. The origin of this software must not be misrepresented;
0014 //    you must not claim that you wrote the original software.
0015 //    If you use this software in a product, an acknowledgment
0016 //    in the product documentation would be appreciated but is not required.
0017 //
0018 // 2. Altered source versions must be plainly marked as such,
0019 //    and must not be misrepresented as being the original software.
0020 //
0021 // 3. This notice may not be removed or altered from any source distribution.
0022 //
0023 ////////////////////////////////////////////////////////////
0024 
0025 #ifndef SFML_OPENGL_HPP
0026 #define SFML_OPENGL_HPP
0027 
0028 
0029 ////////////////////////////////////////////////////////////
0030 /// Headers
0031 ////////////////////////////////////////////////////////////
0032 #include <SFML/Config.hpp>
0033 
0034 
0035 ////////////////////////////////////////////////////////////
0036 /// This file just includes the OpenGL headers,
0037 /// which have actually different paths on each system
0038 ////////////////////////////////////////////////////////////
0039 #if defined(SFML_SYSTEM_WINDOWS)
0040 
0041     // The Visual C++ version of gl.h uses WINGDIAPI and APIENTRY but doesn't define them
0042     #ifdef _MSC_VER
0043         #include <windows.h>
0044     #endif
0045 
0046     #include <GL/gl.h>
0047 
0048 #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) || defined(SFML_SYSTEM_NETBSD)
0049 
0050     #if defined(SFML_OPENGL_ES)
0051         #include <GLES/gl.h>
0052         #include <GLES/glext.h>
0053     #else
0054         #include <GL/gl.h>
0055     #endif
0056 
0057 #elif defined(SFML_SYSTEM_MACOS)
0058 
0059     #include <OpenGL/gl.h>
0060 
0061 #elif defined (SFML_SYSTEM_IOS)
0062 
0063     #include <OpenGLES/ES1/gl.h>
0064     #include <OpenGLES/ES1/glext.h>
0065 
0066 #elif defined (SFML_SYSTEM_ANDROID)
0067 
0068     #include <GLES/gl.h>
0069     #include <GLES/glext.h>
0070     
0071     // We're not using OpenGL ES 2+ yet, but we can use the sRGB extension
0072     #include <GLES2/gl2platform.h>
0073     #include <GLES2/gl2ext.h>
0074 
0075 #endif
0076 
0077 
0078 #endif // SFML_OPENGL_HPP