├── .gitignore
├── CMakeLists.txt
├── HOWTOBUILD.txt
├── README.md
├── bin
└── media
│ └── !OBTAIN_THE_MEDIA_PACK_AND_PUT_IT_HERE.txt
├── build
├── !RUN CMAKE FROM HERE.txt
└── templates
│ └── vs2013.vcxproj.user.in
├── extern
└── glfw-3.0.4
│ ├── .gitignore
│ ├── CMake
│ ├── amd64-mingw32msvc.cmake
│ ├── i586-mingw32msvc.cmake
│ ├── i686-pc-mingw32.cmake
│ ├── i686-w64-mingw32.cmake
│ ├── modules
│ │ ├── FindEGL.cmake
│ │ ├── FindGLESv1.cmake
│ │ └── FindGLESv2.cmake
│ └── x86_64-w64-mingw32.cmake
│ ├── CMakeLists.txt
│ ├── COPYING.txt
│ ├── README.md
│ ├── cmake_uninstall.cmake.in
│ ├── deps
│ ├── EGL
│ │ └── eglext.h
│ ├── GL
│ │ ├── glext.h
│ │ ├── glxext.h
│ │ └── wglext.h
│ ├── getopt.c
│ ├── getopt.h
│ ├── tinycthread.c
│ └── tinycthread.h
│ ├── docs
│ ├── CMakeLists.txt
│ ├── Doxyfile.in
│ ├── build.dox
│ ├── compat.dox
│ ├── compile.dox
│ ├── context.dox
│ ├── extra.css
│ ├── footer.html
│ ├── header.html
│ ├── internal.dox
│ ├── main.dox
│ ├── monitor.dox
│ ├── moving.dox
│ ├── news.dox
│ ├── quick.dox
│ └── window.dox
│ ├── examples
│ ├── CMakeLists.txt
│ ├── boing.c
│ ├── gears.c
│ ├── heightmap.c
│ ├── simple.c
│ ├── splitview.c
│ └── wave.c
│ ├── include
│ └── GLFW
│ │ ├── glfw3.h
│ │ └── glfw3native.h
│ ├── src
│ ├── CMakeLists.txt
│ ├── clipboard.c
│ ├── cocoa_clipboard.m
│ ├── cocoa_gamma.c
│ ├── cocoa_init.m
│ ├── cocoa_joystick.m
│ ├── cocoa_monitor.m
│ ├── cocoa_platform.h
│ ├── cocoa_time.c
│ ├── cocoa_window.m
│ ├── context.c
│ ├── egl_context.c
│ ├── egl_platform.h
│ ├── gamma.c
│ ├── glfw3.pc.in
│ ├── glfwConfig.cmake.in
│ ├── glfwConfigVersion.cmake.in
│ ├── glfw_config.h.in
│ ├── glx_context.c
│ ├── glx_platform.h
│ ├── init.c
│ ├── input.c
│ ├── internal.h
│ ├── joystick.c
│ ├── monitor.c
│ ├── nsgl_context.m
│ ├── nsgl_platform.h
│ ├── time.c
│ ├── wgl_context.c
│ ├── wgl_platform.h
│ ├── win32_clipboard.c
│ ├── win32_gamma.c
│ ├── win32_init.c
│ ├── win32_joystick.c
│ ├── win32_monitor.c
│ ├── win32_platform.h
│ ├── win32_time.c
│ ├── win32_window.c
│ ├── window.c
│ ├── x11_clipboard.c
│ ├── x11_gamma.c
│ ├── x11_init.c
│ ├── x11_joystick.c
│ ├── x11_monitor.c
│ ├── x11_platform.h
│ ├── x11_time.c
│ ├── x11_unicode.c
│ └── x11_window.c
│ └── tests
│ ├── CMakeLists.txt
│ ├── accuracy.c
│ ├── clipboard.c
│ ├── defaults.c
│ ├── events.c
│ ├── fsaa.c
│ ├── gamma.c
│ ├── glfwinfo.c
│ ├── iconify.c
│ ├── joysticks.c
│ ├── modes.c
│ ├── peter.c
│ ├── reopen.c
│ ├── sharing.c
│ ├── tearing.c
│ ├── threads.c
│ ├── title.c
│ └── windows.c
├── include
├── GL
│ ├── gl3w.h
│ ├── glcorearb.h
│ ├── glext.h
│ ├── glxext.h
│ └── wglext.h
├── object.h
├── sb6mfile.h
├── sb7.h
├── sb7color.h
├── sb7ext.h
├── sb7ktx.h
├── sb7textoverlay.h
├── shader.h
└── vmath.h
├── lib
└── !DO NOT DELETE THIS DIRECTORY
└── src
├── alienrain
└── alienrain.cpp
├── basicfbo
└── basicfbo.cpp
├── bindlesstex
└── bindlesstex.cpp
├── blendmatrix
└── blendmatrix.cpp
├── blinnphong
└── blinnphong.cpp
├── bumpmapping
└── bumpmapping.cpp
├── clipdistance
└── clipdistance.cpp
├── compressrgtc
└── compressrgtc.cpp
├── csflocking
└── csflocking.cpp
├── cubemapenv
└── cubemapenv.cpp
├── cubicbezier
└── cubicbezier.cpp
├── cullindirect
└── cullindirect.cpp
├── deferredshading
└── deferredshading.cpp
├── depthclamp
└── depthclamp.cpp
├── dflandscape
└── dflandscape.cpp
├── dispmap
└── dispmap.cpp
├── dof
└── dof.cpp
├── envmapsphere
└── envmapsphere.cpp
├── equirectangular
└── equirectangular.cpp
├── fontdemo
└── fontdemo.cpp
├── fragcolorfrompos
└── fragcolorfrompos.cpp
├── fragmentlist
└── fragmentlist.cpp
├── grass
└── grass.cpp
├── gsculling
└── gsculling.cpp
├── gslayered
└── gslayered.cpp
├── gsquads
└── gsquads.cpp
├── gstessellate
└── gstessellate.cpp
├── hdrbloom
└── hdrbloom.cpp
├── hdrexposure
└── hdrexposure.cpp
├── hdrtonemap
└── hdrtonemap.cpp
├── hqfilter
└── hqfilter.cpp
├── indexedcube
└── indexedcube.cpp
├── indirectmaterial
└── indirectmaterial.cpp
├── instancedattribs
└── instancedattribs.cpp
├── julia
└── julia.cpp
├── ktxview
└── ktxview.cpp
├── linesmooth
└── linesmooth.cpp
├── mirrorclampedge
└── mirrorclampedge.cpp
├── movingtri
└── movingtri.cpp
├── msaanative
└── msaanative.cpp
├── multidrawindirect
└── multidrawindirect.cpp
├── multimaterial
└── multimaterial.cpp
├── multiscissor
└── multiscissor.cpp
├── multiviewport
└── multiviewport.cpp
├── noperspective
└── noperspective.cpp
├── normalviewer
└── normalviewer.cpp
├── objectexploder
└── objectexploder.cpp
├── ompparticles
└── ompparticles.cpp
├── packetbuffer
└── packetbuffer.cpp
├── perpixelgloss
└── perpixelgloss.cpp
├── phonglighting
└── phonglighting.cpp
├── pmbfractal
└── pmbfractal.cpp
├── pmbstreaming
└── pmbstreaming.cpp
├── polygonsmooth
└── polygonsmooth.cpp
├── prefixsum
└── prefixsum.cpp
├── prefixsum2d
└── prefixsum2d.cpp
├── programinfo
└── programinfo.cpp
├── raytracer
└── raytracer.cpp
├── rimlight
└── rimlight.cpp
├── sampleshading
└── sampleshading.cpp
├── sb6mrender
└── sb6mrender.cpp
├── sb7
├── gl3w.c
├── sb7.cpp
├── sb7color.cpp
├── sb7ktx.cpp
├── sb7object.cpp
├── sb7shader.cpp
└── sb7textoverlay.cpp
├── sdfdemo
└── sdfdemo.cpp
├── shadowmapping
└── shadowmapping.cpp
├── shapedpoints
└── shapedpoints.cpp
├── simpleclear
└── simpleclear.cpp
├── simpletexcoords
└── simpletexcoords.cpp
├── simpletexture
└── simpletexture.cpp
├── singlepoint
└── singlepoint.cpp
├── singletri
└── singletri.cpp
├── sparsetexture
└── sparsetexture.cpp
├── spinnycube
└── spinnycube.cpp
├── springmass
└── springmass.cpp
├── ssao
└── ssao.cpp
├── starfield
└── starfield.cpp
├── stereo
└── stereo.cpp
├── subroutines
└── subroutines.cpp
├── tessellatedcube
└── tessellatedcube.cpp
├── tessellatedgstri
└── tessellatedgstri.cpp
├── tessellatedtri
└── tessellatedtri.cpp
├── tessmodes
└── tessmodes.cpp
├── tesssubdivmodes
└── tesssubdivmodes.cpp
├── toonshading
└── toonshading.cpp
├── tunnel
└── tunnel.cpp
└── wrapmodes
└── wrapmodes.cpp
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | build/
3 | *.txt.user
4 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required (VERSION 2.6)
2 |
3 | project (superbible7)
4 |
5 | LINK_DIRECTORIES( ${CMAKE_SOURCE_DIR}/lib )
6 |
7 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
8 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
9 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
10 |
11 | # Second, for multi-config builds (e.g. msvc)
12 | foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
13 | string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
14 | set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_SOURCE_DIR}/bin )
15 | set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_SOURCE_DIR}/lib )
16 | set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_SOURCE_DIR}/lib )
17 | endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
18 |
19 | find_package(OpenGL)
20 |
21 | set (CMAKE_DEBUG_POSTFIX "_d")
22 |
23 | if(WIN32)
24 | set(COMMON_LIBS sb7 optimized glfw3 debug glfw3_d ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES})
25 | elseif (UNIX)
26 | find_package(PkgConfig REQUIRED)
27 | pkg_check_modules(GLFW REQUIRED glfw3)
28 | set(COMMON_LIBS sb7 glfw3 X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL rt dl)
29 | else()
30 | set(COMMON_LIBS sb7)
31 | endif()
32 |
33 | set(COMMON_LIBS ${COMMON_LIBS} ${EXTRA_LIBS})
34 |
35 | add_library(sb7
36 | src/sb7/sb7.cpp
37 | src/sb7/sb7color.cpp
38 | src/sb7/sb7ktx.cpp
39 | src/sb7/sb7object.cpp
40 | src/sb7/sb7shader.cpp
41 | src/sb7/sb7textoverlay.cpp
42 | src/sb7/gl3w.c
43 | )
44 |
45 | set(RUN_DIR ${PROJECT_SOURCE_DIR}/bin)
46 |
47 | set(EXAMPLES
48 | alienrain
49 | basicfbo
50 | bindlesstex
51 | blendmatrix
52 | blinnphong
53 | bumpmapping
54 | clipdistance
55 | csflocking
56 | compressrgtc
57 | cubemapenv
58 | cubicbezier
59 | cullindirect
60 | deferredshading
61 | depthclamp
62 | dflandscape
63 | dispmap
64 | dof
65 | envmapsphere
66 | equirectangular
67 | fontdemo
68 | fragcolorfrompos
69 | fragmentlist
70 | grass
71 | gsculling
72 | gslayered
73 | gsquads
74 | gstessellate
75 | hdrbloom
76 | hdrexposure
77 | hdrtonemap
78 | hqfilter
79 | indexedcube
80 | indirectmaterial
81 | instancedattribs
82 | julia
83 | ktxview
84 | linesmooth
85 | mirrorclampedge
86 | movingtri
87 | msaanative
88 | multidrawindirect
89 | multiscissor
90 | multiviewport
91 | noperspective
92 | normalviewer
93 | objectexploder
94 | ompparticles
95 | packetbuffer
96 | perpixelgloss
97 | phonglighting
98 | polygonsmooth
99 | prefixsum
100 | pmbfractal
101 | pmbstreaming
102 | prefixsum2d
103 | programinfo
104 | raytracer
105 | rimlight
106 | sampleshading
107 | # sb6mrender
108 | sdfdemo
109 | shadowmapping
110 | shapedpoints
111 | simpleclear
112 | simpletexcoords
113 | simpletexture
114 | singlepoint
115 | singletri
116 | sparsetexture
117 | spinnycube
118 | springmass
119 | ssao
120 | starfield
121 | stereo
122 | subroutines
123 | tessellatedcube
124 | tessellatedgstri
125 | tessellatedtri
126 | tessmodes
127 | tesssubdivmodes
128 | toonshading
129 | tunnel
130 | wrapmodes
131 | )
132 |
133 | find_package(OpenMP)
134 | if (OPENMP_FOUND)
135 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
136 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
137 | endif()
138 |
139 | foreach(EXAMPLE ${EXAMPLES})
140 | add_executable(${EXAMPLE} WIN32 src/${EXAMPLE}/${EXAMPLE}.cpp)
141 | set_property(TARGET ${EXAMPLE} PROPERTY DEBUG_POSTFIX _d)
142 | target_link_libraries(${EXAMPLE} ${COMMON_LIBS})
143 | if(MSVC)
144 | configure_file(${PROJECT_SOURCE_DIR}/build/templates/vs2013.vcxproj.user.in ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE}.vcxproj.user @ONLY)
145 | endif(MSVC)
146 | endforeach(EXAMPLE)
147 |
148 | IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
149 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LINUX -std=c++0x")
150 | ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
151 |
152 | include_directories( include )
153 | include_directories(extern/glfw-3.0.4/include)
154 |
155 | ADD_CUSTOM_TARGET(debug ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=Debug ${PROJECT_SOURCE_DIR})
156 | ADD_CUSTOM_TARGET(release ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=Release ${PROJECT_SOURCE_DIR})
157 |
--------------------------------------------------------------------------------
/HOWTOBUILD.txt:
--------------------------------------------------------------------------------
1 | OpenGL SuperBible 7th Edition Examples - How to Build
2 | =====================================================
3 |
4 | This source code archive uses CMake to build. The samples also use GLFW library, a
5 | snapshot of which is included in the `extern` folder. It's also possible to use a different
6 | copy of GLFW if desired, but that's an excercise for you. Instructions for each supported
7 | platform are as follows:
8 |
9 | Windows / Microsoft Visual Studio 2013
10 | --------------------------------------
11 |
12 | Install CMake. Windows binaries are available from http://www.cmake.org/.
13 | Ensure that CMake is in your path.
14 | Open a command prompt and change to the directory where you've checked out the code.
15 |
16 | ### Build GLFW
17 |
18 | If you are going to use the copy of GLFW included in the archive, enter the
19 | GLFW directory in `extern/glfw-3.0.4`, and type:
20 |
21 | cmake -G "Visual Studio 12" .
22 |
23 | (Yes, that's not a mistake - Visual Studio 12 is 2013)
24 |
25 | Open the resulting GLFW.sln file in Visual Studio and build both the debug and release configurations.
26 |
27 | Copy and rename the resulting glfw3 libraries:
28 |
29 | * Copy `glfw-3.0.4/src/Debug/glfw3.lib` into the `lib` directory and **rename it to glfw3_d.lib**.
30 | * Copy `glf3-3.0.4/src/Release/glfw3.lib` into the `lib` directory but don't rename it.
31 |
32 | ### Build the samples
33 |
34 | Open a command prompt and change to the build directory in the source archive.
35 | Type:
36 |
37 | cmake -G "Visual Studio 12" ..
38 |
39 | Open the resulting superbible7.sln project in Visual Studio.
40 |
41 | The examples will build into the `bin` directory.
42 |
43 | Linux
44 | -----
45 |
46 | As with Windows, the project uses CMake to create build files. You'll
47 | need to install it with the appropriate method for your distribution. On
48 | Debian-based distributions (such as Ubuntu and Mint):
49 |
50 | sudo apt-get install cmake
51 |
52 | You'll also need to satisfy dependencies. In particular, you'll need GL and
53 | GLX headers and libs (generally included in Mesa packages), and GLFW. You can use
54 | the a snapshot of GLFW included in the archive, if you wish, but pre-compiled
55 | packages should be available through package management on most distributions.
56 |
57 | Once you have everything, you should enter the "build" directory in the source
58 | arvhive and issue:
59 |
60 | cmake ..
61 | make
62 |
63 | The examples will build into the 'bin' directory.
64 |
65 | Other platforms
66 | ---------------
67 |
68 | The code will probably build for other platforms, especially if they are
69 | relatively non-obscure, but nothing besides Windows/Visual Studio and Linux
70 | has been tested. It's up to you to find a capable OpenGL 4.x driver for
71 | your platform of choice. CMake should also be able to build the appropriate
72 | project files for environments such as Code::Blocks and Eclipse, but again,
73 | this is untested.
74 |
75 |
76 | *Please note carefully: EVEN IF YOU CAN BUILD THE SOURCES FOR YOUR FAVORITE
77 | PLATFORM OF CHOICE, YOU NEED RECENT OpenGL 4.x DRIVERS TO RUN THEM. PLEASE
78 | DON'T PAN THE BOOK BECAUSE YOUR COMPUTER DOESN'T SUPPORT OpenGL 4.x. THANKS*
79 |
80 | Running the samples
81 | -------------------
82 |
83 | *This part is really important. Please read it!*
84 |
85 | Most of the samples require some media files. The media files package is a
86 | separate download available from http://www.openglsuperbible.com and is
87 | rougly 100MB of textures, object files and shader code. Unpack the archive
88 | to the bin/media directory before trying to run these samples.
89 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | OpenGL SuperBible 7th Edition Source Code
2 | =========================================
3 |
4 | This is the repository for the example source code for the 7th edition of the
5 | OpenGL SuperBible. Please read HOWTOBUILD.txt. It tells you how to build and
6 | run the examples.
7 |
8 | *Note that to run these examples, you need the associated media files which
9 | are available from http://openglsuperbible.com/files/superbible7-media.zip*.
10 |
--------------------------------------------------------------------------------
/bin/media/!OBTAIN_THE_MEDIA_PACK_AND_PUT_IT_HERE.txt:
--------------------------------------------------------------------------------
1 | Download the media pack from http://www.openglsuperbible.com and unpack it in this directory.
2 |
--------------------------------------------------------------------------------
/build/!RUN CMAKE FROM HERE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openglsuperbible/sb7code/3f80b7a829442e2de9199a15e08ce7d09fd9260e/build/!RUN CMAKE FROM HERE.txt
--------------------------------------------------------------------------------
/build/templates/vs2013.vcxproj.user.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(TargetDir)
5 | WindowsLocalDebugger
6 |
7 |
8 | $(TargetDir)
9 | WindowsLocalDebugger
10 |
11 |
12 | $(TargetDir)
13 | WindowsLocalDebugger
14 |
15 |
16 | $(TargetDir)
17 | WindowsLocalDebugger
18 |
19 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/.gitignore:
--------------------------------------------------------------------------------
1 | # External junk
2 | .DS_Store
3 | _ReSharper*
4 | *.opensdf
5 | *.sdf
6 | *.dir
7 | *.vcxproj*
8 | *.sln
9 | Win32
10 | Debug
11 | Release
12 |
13 | # CMake files
14 | Makefile
15 | CMakeCache.txt
16 | CMakeFiles
17 | cmake_install.cmake
18 | cmake_uninstall.cmake
19 |
20 | # Generated files
21 | docs/Doxyfile
22 | docs/html
23 | docs/warnings.txt
24 | src/glfw_config.h
25 | src/glfw3.pc
26 | src/glfwConfig.cmake
27 | src/glfwConfigVersion.cmake
28 |
29 | # Compiled binaries
30 | src/libglfw.so
31 | src/libglfw.so.3
32 | src/libglfw.so.3.0
33 | src/libglfw.dylib
34 | src/libglfw.dylib
35 | src/libglfw.3.dylib
36 | src/libglfw.3.0.dylib
37 | src/libglfw3.a
38 | src/glfw3.lib
39 | src/glfw3.dll
40 | src/glfw3dll.lib
41 | src/glfw3dll.a
42 | examples/*.app
43 | examples/*.exe
44 | examples/boing
45 | examples/gears
46 | examples/heightmap
47 | examples/splitview
48 | examples/simple
49 | examples/wave
50 | tests/*.app
51 | tests/*.exe
52 | tests/accuracy
53 | tests/clipboard
54 | tests/defaults
55 | tests/events
56 | tests/fsaa
57 | tests/gamma
58 | tests/glfwinfo
59 | tests/iconify
60 | tests/joysticks
61 | tests/modes
62 | tests/peter
63 | tests/reopen
64 | tests/sharing
65 | tests/tearing
66 | tests/threads
67 | tests/title
68 | tests/version
69 | tests/windows
70 |
71 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/amd64-mingw32msvc.cmake:
--------------------------------------------------------------------------------
1 | # Define the environment for cross compiling from Linux to Win64
2 | SET(CMAKE_SYSTEM_NAME Windows)
3 | SET(CMAKE_SYSTEM_VERSION 1)
4 | SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc")
5 | SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++")
6 | SET(CMAKE_RC_COMPILER "amd64-mingw32msvc-windres")
7 | SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib")
8 |
9 | # Configure the behaviour of the find commands
10 | SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc")
11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
14 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/i586-mingw32msvc.cmake:
--------------------------------------------------------------------------------
1 | # Define the environment for cross compiling from Linux to Win32
2 | SET(CMAKE_SYSTEM_NAME Windows)
3 | SET(CMAKE_SYSTEM_VERSION 1)
4 | SET(CMAKE_C_COMPILER "i586-mingw32msvc-gcc")
5 | SET(CMAKE_CXX_COMPILER "i586-mingw32msvc-g++")
6 | SET(CMAKE_RC_COMPILER "i586-mingw32msvc-windres")
7 | SET(CMAKE_RANLIB "i586-mingw32msvc-ranlib")
8 |
9 | # Configure the behaviour of the find commands
10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc")
11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
14 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/i686-pc-mingw32.cmake:
--------------------------------------------------------------------------------
1 | # Define the environment for cross compiling from Linux to Win32
2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name
3 | SET(CMAKE_SYSTEM_VERSION 1)
4 | SET(CMAKE_C_COMPILER "i686-pc-mingw32-gcc")
5 | SET(CMAKE_CXX_COMPILER "i686-pc-mingw32-g++")
6 | SET(CMAKE_RC_COMPILER "i686-pc-mingw32-windres")
7 | SET(CMAKE_RANLIB "i686-pc-mingw32-ranlib")
8 |
9 | #Configure the behaviour of the find commands
10 | SET(CMAKE_FIND_ROOT_PATH "/opt/mingw/usr/i686-pc-mingw32")
11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
14 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/i686-w64-mingw32.cmake:
--------------------------------------------------------------------------------
1 | # Define the environment for cross compiling from Linux to Win32
2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name
3 | SET(CMAKE_SYSTEM_VERSION 1)
4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
8 |
9 | # Configure the behaviour of the find commands
10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
14 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/modules/FindEGL.cmake:
--------------------------------------------------------------------------------
1 | # Find EGL
2 | #
3 | # EGL_INCLUDE_DIR
4 | # EGL_LIBRARY
5 | # EGL_FOUND
6 |
7 | find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h)
8 |
9 | set(EGL_NAMES ${EGL_NAMES} egl EGL)
10 | find_library(EGL_LIBRARY NAMES ${EGL_NAMES})
11 |
12 | include(FindPackageHandleStandardArgs)
13 | find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
14 |
15 | mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
16 |
17 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/modules/FindGLESv1.cmake:
--------------------------------------------------------------------------------
1 | # Find GLESv1
2 | #
3 | # GLESv1_INCLUDE_DIR
4 | # GLESv1_LIBRARY
5 | # GLESv1_FOUND
6 |
7 | find_path(GLESv1_INCLUDE_DIR NAMES GLES/gl.h)
8 |
9 | set(GLESv1_NAMES ${GLESv1_NAMES} GLESv1_CM)
10 | find_library(GLESv1_LIBRARY NAMES ${GLESv1_NAMES})
11 |
12 | include(FindPackageHandleStandardArgs)
13 | find_package_handle_standard_args(GLESv1 DEFAULT_MSG GLESv1_LIBRARY GLESv1_INCLUDE_DIR)
14 |
15 | mark_as_advanced(GLESv1_INCLUDE_DIR GLESv1_LIBRARY)
16 |
17 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/modules/FindGLESv2.cmake:
--------------------------------------------------------------------------------
1 | # Find GLESv2
2 | #
3 | # GLESv2_INCLUDE_DIR
4 | # GLESv2_LIBRARY
5 | # GLESv2_FOUND
6 |
7 | find_path(GLESv2_INCLUDE_DIR NAMES GLES2/gl2.h)
8 |
9 | set(GLESv2_NAMES ${GLESv2_NAMES} GLESv2)
10 | find_library(GLESv2_LIBRARY NAMES ${GLESv2_NAMES})
11 |
12 | include(FindPackageHandleStandardArgs)
13 | find_package_handle_standard_args(GLESv2 DEFAULT_MSG GLESv2_LIBRARY GLESv2_INCLUDE_DIR)
14 |
15 | mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY)
16 |
17 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/CMake/x86_64-w64-mingw32.cmake:
--------------------------------------------------------------------------------
1 | # Define the environment for cross compiling from Linux to Win32
2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name
3 | SET(CMAKE_SYSTEM_VERSION 1)
4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")
8 |
9 | # Configure the behaviour of the find commands
10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
14 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/COPYING.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2002-2006 Marcus Geelnard
2 | Copyright (c) 2006-2010 Camilla Berglund
3 |
4 | This software is provided 'as-is', without any express or implied
5 | warranty. In no event will the authors be held liable for any damages
6 | arising from the use of this software.
7 |
8 | Permission is granted to anyone to use this software for any purpose,
9 | including commercial applications, and to alter it and redistribute it
10 | freely, subject to the following restrictions:
11 |
12 | 1. The origin of this software must not be misrepresented; you must not
13 | claim that you wrote the original software. If you use this software
14 | in a product, an acknowledgment in the product documentation would
15 | be appreciated but is not required.
16 |
17 | 2. Altered source versions must be plainly marked as such, and must not
18 | be misrepresented as being the original software.
19 |
20 | 3. This notice may not be removed or altered from any source
21 | distribution.
22 |
23 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/cmake_uninstall.cmake.in:
--------------------------------------------------------------------------------
1 |
2 | if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
3 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
4 | endif()
5 |
6 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
7 | string(REGEX REPLACE "\n" ";" files "${files}")
8 |
9 | foreach (file ${files})
10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
11 | if (EXISTS "$ENV{DESTDIR}${file}")
12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
13 | OUTPUT_VARIABLE rm_out
14 | RETURN_VALUE rm_retval)
15 | if (NOT "${rm_retval}" STREQUAL 0)
16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
17 | endif()
18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}")
19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
20 | OUTPUT_VARIABLE rm_out
21 | RETURN_VALUE rm_retval)
22 | if (NOT "${rm_retval}" STREQUAL 0)
23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"")
24 | endif()
25 | else()
26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
27 | endif()
28 | endforeach()
29 |
30 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/deps/getopt.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * getopt.h - competent and free getopt library.
3 | * $Header: /cvsroot/freegetopt/freegetopt/getopt.h,v 1.2 2003/10/26 03:10:20 vindaci Exp $
4 | *
5 | * Copyright (c)2002-2003 Mark K. Kim
6 | * All rights reserved.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions
10 | * are met:
11 | *
12 | * * Redistributions of source code must retain the above copyright
13 | * notice, this list of conditions and the following disclaimer.
14 | *
15 | * * Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in
17 | * the documentation and/or other materials provided with the
18 | * distribution.
19 | *
20 | * * Neither the original author of this software nor the names of its
21 | * contributors may be used to endorse or promote products derived
22 | * from this software without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
31 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
34 | * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
35 | * DAMAGE.
36 | */
37 | #ifndef GETOPT_H_
38 | #define GETOPT_H_
39 |
40 |
41 | #ifdef __cplusplus
42 | extern "C" {
43 | #endif
44 |
45 |
46 | extern char* optarg;
47 | extern int optind;
48 | extern int opterr;
49 | extern int optopt;
50 |
51 | int getopt(int argc, char** argv, const char* optstr);
52 |
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 |
59 | #endif /* GETOPT_H_ */
60 |
61 |
62 | /* vim:ts=3
63 | */
64 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/docs/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | add_custom_target(docs ALL ${DOXYGEN_EXECUTABLE}
3 | WORKING_DIRECTORY ${GLFW_BINARY_DIR}/docs
4 | COMMENT "Generating HTML documentation" VERBATIM)
5 |
6 |
--------------------------------------------------------------------------------
/extern/glfw-3.0.4/docs/footer.html:
--------------------------------------------------------------------------------
1 |
6 |