├── 3rd_party ├── sdl2 │ ├── include │ │ └── SDL2 │ │ │ ├── SDL.h │ │ │ ├── SDL_assert.h │ │ │ ├── SDL_atomic.h │ │ │ ├── SDL_audio.h │ │ │ ├── SDL_bits.h │ │ │ ├── SDL_blendmode.h │ │ │ ├── SDL_clipboard.h │ │ │ ├── SDL_config.h │ │ │ ├── SDL_cpuinfo.h │ │ │ ├── SDL_endian.h │ │ │ ├── SDL_error.h │ │ │ ├── SDL_events.h │ │ │ ├── SDL_filesystem.h │ │ │ ├── SDL_gamecontroller.h │ │ │ ├── SDL_gesture.h │ │ │ ├── SDL_haptic.h │ │ │ ├── SDL_hints.h │ │ │ ├── SDL_joystick.h │ │ │ ├── SDL_keyboard.h │ │ │ ├── SDL_keycode.h │ │ │ ├── SDL_loadso.h │ │ │ ├── SDL_log.h │ │ │ ├── SDL_main.h │ │ │ ├── SDL_messagebox.h │ │ │ ├── SDL_mouse.h │ │ │ ├── SDL_mutex.h │ │ │ ├── SDL_name.h │ │ │ ├── SDL_opengl.h │ │ │ ├── SDL_opengles.h │ │ │ ├── SDL_opengles2.h │ │ │ ├── SDL_pixels.h │ │ │ ├── SDL_platform.h │ │ │ ├── SDL_power.h │ │ │ ├── SDL_quit.h │ │ │ ├── SDL_rect.h │ │ │ ├── SDL_render.h │ │ │ ├── SDL_revision.h │ │ │ ├── SDL_rwops.h │ │ │ ├── SDL_scancode.h │ │ │ ├── SDL_shape.h │ │ │ ├── SDL_stdinc.h │ │ │ ├── SDL_surface.h │ │ │ ├── SDL_system.h │ │ │ ├── SDL_syswm.h │ │ │ ├── SDL_test.h │ │ │ ├── SDL_test_assert.h │ │ │ ├── SDL_test_common.h │ │ │ ├── SDL_test_compare.h │ │ │ ├── SDL_test_crc32.h │ │ │ ├── SDL_test_font.h │ │ │ ├── SDL_test_fuzzer.h │ │ │ ├── SDL_test_harness.h │ │ │ ├── SDL_test_images.h │ │ │ ├── SDL_test_log.h │ │ │ ├── SDL_test_md5.h │ │ │ ├── SDL_test_random.h │ │ │ ├── SDL_thread.h │ │ │ ├── SDL_timer.h │ │ │ ├── SDL_touch.h │ │ │ ├── SDL_types.h │ │ │ ├── SDL_version.h │ │ │ ├── SDL_video.h │ │ │ ├── begin_code.h │ │ │ └── close_code.h │ └── lib │ │ ├── osx │ │ └── SDL2.framework │ │ │ ├── Headers │ │ │ ├── Resources │ │ │ ├── SDL2 │ │ │ └── Versions │ │ │ ├── A │ │ │ ├── Headers │ │ │ │ ├── SDL.h │ │ │ │ ├── SDL_assert.h │ │ │ │ ├── SDL_atomic.h │ │ │ │ ├── SDL_audio.h │ │ │ │ ├── SDL_bits.h │ │ │ │ ├── SDL_blendmode.h │ │ │ │ ├── SDL_clipboard.h │ │ │ │ ├── SDL_config.h │ │ │ │ ├── SDL_config_macosx.h │ │ │ │ ├── SDL_copying.h │ │ │ │ ├── SDL_cpuinfo.h │ │ │ │ ├── SDL_endian.h │ │ │ │ ├── SDL_error.h │ │ │ │ ├── SDL_events.h │ │ │ │ ├── SDL_filesystem.h │ │ │ │ ├── SDL_gamecontroller.h │ │ │ │ ├── SDL_gesture.h │ │ │ │ ├── SDL_haptic.h │ │ │ │ ├── SDL_hints.h │ │ │ │ ├── SDL_joystick.h │ │ │ │ ├── SDL_keyboard.h │ │ │ │ ├── SDL_keycode.h │ │ │ │ ├── SDL_loadso.h │ │ │ │ ├── SDL_log.h │ │ │ │ ├── SDL_main.h │ │ │ │ ├── SDL_messagebox.h │ │ │ │ ├── SDL_mouse.h │ │ │ │ ├── SDL_mutex.h │ │ │ │ ├── SDL_name.h │ │ │ │ ├── SDL_opengl.h │ │ │ │ ├── SDL_opengles.h │ │ │ │ ├── SDL_opengles2.h │ │ │ │ ├── SDL_pixels.h │ │ │ │ ├── SDL_platform.h │ │ │ │ ├── SDL_power.h │ │ │ │ ├── SDL_quit.h │ │ │ │ ├── SDL_rect.h │ │ │ │ ├── SDL_render.h │ │ │ │ ├── SDL_revision.h │ │ │ │ ├── SDL_rwops.h │ │ │ │ ├── SDL_scancode.h │ │ │ │ ├── SDL_shape.h │ │ │ │ ├── SDL_stdinc.h │ │ │ │ ├── SDL_surface.h │ │ │ │ ├── SDL_system.h │ │ │ │ ├── SDL_syswm.h │ │ │ │ ├── SDL_thread.h │ │ │ │ ├── SDL_timer.h │ │ │ │ ├── SDL_touch.h │ │ │ │ ├── SDL_types.h │ │ │ │ ├── SDL_version.h │ │ │ │ ├── SDL_video.h │ │ │ │ ├── begin_code.h │ │ │ │ └── close_code.h │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ ├── SDL2 │ │ │ └── _CodeSignature │ │ │ │ └── CodeResources │ │ │ └── Current │ │ └── win_32 │ │ ├── SDL2.dll │ │ ├── SDL2.lib │ │ └── SDL2main.lib └── soil │ └── SOIL │ ├── SOIL.c │ ├── SOIL.h │ ├── image_DXT.c │ ├── image_DXT.h │ ├── image_helper.c │ ├── image_helper.h │ ├── stb_image_aug.c │ ├── stb_image_aug.h │ ├── stbi_DDS_aug.h │ └── stbi_DDS_aug_c.h ├── assets ├── models │ ├── unit_cube.obj │ └── unit_plane.obj ├── shaders │ └── basic_fullbright.ogl └── textures │ ├── dev_colored_squares_512.png │ ├── dev_grid_blue_512.png │ ├── dev_grid_green_512.png │ ├── dev_grid_grey_512.png │ ├── dev_grid_orange_512.png │ ├── dev_grid_red_512.png │ ├── dev_squares_1024.png │ └── dev_squares_512.png ├── code └── mega_texture.cpp ├── external ├── math │ ├── detail │ │ └── detail.hpp │ ├── general │ │ ├── general.hpp │ │ └── to_string.hpp │ ├── geometry │ │ ├── aabb_2d.hpp │ │ ├── aabb_3d.hpp │ │ ├── plane.hpp │ │ └── ray_test.hpp │ ├── math.hpp │ ├── matrix │ │ ├── matrix.hpp │ │ ├── matrix33.hpp │ │ ├── matrix44.hpp │ │ └── matrix_types.hpp │ ├── quaternion │ │ ├── quaternion.hpp │ │ └── quaternion_types.hpp │ ├── transform │ │ ├── transform.hpp │ │ └── transform_types.hpp │ ├── vector │ │ ├── vector.hpp │ │ ├── vector2.hpp │ │ ├── vector3.hpp │ │ ├── vector4.hpp │ │ └── vector_types.hpp │ └── version.hpp ├── sdl_wrapper │ ├── input.cpp │ ├── input.hpp │ ├── message_pump.cpp │ ├── message_pump.hpp │ ├── mixer.cpp │ ├── mixer.hpp │ ├── ogl_context.cpp │ ├── ogl_context.hpp │ ├── sdl_common.cpp │ ├── sdl_common.hpp │ ├── sdl_fwd.hpp │ ├── sdl_lazy_include.hpp │ ├── window.cpp │ └── window.hpp ├── simple_renderer │ ├── common.cpp │ ├── common.hpp │ ├── draw_call.cpp │ ├── draw_call.hpp │ ├── frame_buffer.cpp │ ├── frame_buffer.hpp │ ├── index_buffer.cpp │ ├── index_buffer.hpp │ ├── lazy_include.hpp │ ├── rasterizer.cpp │ ├── rasterizer.hpp │ ├── renderer.cpp │ ├── renderer.hpp │ ├── renderer_fwd.hpp │ ├── shader.cpp │ ├── shader.hpp │ ├── texture.cpp │ ├── texture.hpp │ ├── version.hpp │ ├── vertex_buffer.cpp │ ├── vertex_buffer.hpp │ ├── vertex_format.cpp │ └── vertex_format.hpp └── utils │ ├── directory.hpp │ ├── directory_mac.mm │ ├── directory_nix.cpp │ ├── obj_model_loader.cpp │ └── obj_model_loader.hpp ├── projects └── xcode │ └── Mega Texture │ ├── Mega Texture.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcuserdata │ │ └── PhilCK.xcuserdatad │ │ └── xcschemes │ │ ├── Mega Texture.xcscheme │ │ └── xcschememanagement.plist │ ├── Mega Texture │ └── Info.plist │ └── build │ ├── Debug │ └── Mega Texture.app │ │ └── Contents │ │ ├── Frameworks │ │ └── SDL2.framework │ │ │ ├── Resources │ │ │ ├── SDL2 │ │ │ └── Versions │ │ │ ├── A │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ ├── SDL2 │ │ │ └── _CodeSignature │ │ │ │ └── CodeResources │ │ │ └── Current │ │ ├── Info.plist │ │ ├── MacOS │ │ └── Mega Texture │ │ ├── PkgInfo │ │ ├── Resources │ │ └── assets │ │ │ ├── models │ │ │ ├── unit_cube.obj │ │ │ └── unit_plane.obj │ │ │ ├── shaders │ │ │ └── basic_fullbright.ogl │ │ │ └── textures │ │ │ ├── dev_colored_squares_512.png │ │ │ ├── dev_grid_blue_512.png │ │ │ ├── dev_grid_green_512.png │ │ │ ├── dev_grid_grey_512.png │ │ │ ├── dev_grid_orange_512.png │ │ │ ├── dev_grid_red_512.png │ │ │ ├── dev_squares_1024.png │ │ │ └── dev_squares_512.png │ │ └── _CodeSignature │ │ └── CodeResources │ └── Mega Texture.build │ ├── Debug │ ├── Mega Texture.build │ │ ├── Mega Texture-all-non-framework-target-headers.hmap │ │ ├── Mega Texture-all-target-headers.hmap │ │ ├── Mega Texture-generated-files.hmap │ │ ├── Mega Texture-own-target-headers.hmap │ │ ├── Mega Texture-project-headers.hmap │ │ ├── Mega Texture.hmap │ │ ├── Objects-normal │ │ │ └── x86_64 │ │ │ │ ├── Mega Texture.LinkFileList │ │ │ │ ├── Mega Texture_dependency_info.dat │ │ │ │ ├── SOIL.d │ │ │ │ ├── SOIL.dia │ │ │ │ ├── SOIL.o │ │ │ │ ├── common.d │ │ │ │ ├── common.dia │ │ │ │ ├── common.o │ │ │ │ ├── directory_mac.d │ │ │ │ ├── directory_mac.dia │ │ │ │ ├── directory_mac.o │ │ │ │ ├── directory_nix.d │ │ │ │ ├── directory_nix.dia │ │ │ │ ├── directory_nix.o │ │ │ │ ├── draw_call.d │ │ │ │ ├── draw_call.dia │ │ │ │ ├── draw_call.o │ │ │ │ ├── frame_buffer.d │ │ │ │ ├── frame_buffer.dia │ │ │ │ ├── frame_buffer.o │ │ │ │ ├── image_DXT.d │ │ │ │ ├── image_DXT.dia │ │ │ │ ├── image_DXT.o │ │ │ │ ├── image_helper.d │ │ │ │ ├── image_helper.dia │ │ │ │ ├── image_helper.o │ │ │ │ ├── index_buffer.d │ │ │ │ ├── index_buffer.dia │ │ │ │ ├── index_buffer.o │ │ │ │ ├── input.d │ │ │ │ ├── input.dia │ │ │ │ ├── input.o │ │ │ │ ├── mega_texture.d │ │ │ │ ├── mega_texture.dia │ │ │ │ ├── mega_texture.o │ │ │ │ ├── message_pump.d │ │ │ │ ├── message_pump.dia │ │ │ │ ├── message_pump.o │ │ │ │ ├── mixer.d │ │ │ │ ├── mixer.dia │ │ │ │ ├── mixer.o │ │ │ │ ├── obj_model_loader.d │ │ │ │ ├── obj_model_loader.dia │ │ │ │ ├── obj_model_loader.o │ │ │ │ ├── ogl_context.d │ │ │ │ ├── ogl_context.dia │ │ │ │ ├── ogl_context.o │ │ │ │ ├── rasterizer.d │ │ │ │ ├── rasterizer.dia │ │ │ │ ├── rasterizer.o │ │ │ │ ├── renderer.d │ │ │ │ ├── renderer.dia │ │ │ │ ├── renderer.o │ │ │ │ ├── sdl_common.d │ │ │ │ ├── sdl_common.dia │ │ │ │ ├── sdl_common.o │ │ │ │ ├── shader.d │ │ │ │ ├── shader.dia │ │ │ │ ├── shader.o │ │ │ │ ├── stb_image_aug.d │ │ │ │ ├── stb_image_aug.dia │ │ │ │ ├── stb_image_aug.o │ │ │ │ ├── texture.d │ │ │ │ ├── texture.dia │ │ │ │ ├── texture.o │ │ │ │ ├── vertex_buffer.d │ │ │ │ ├── vertex_buffer.dia │ │ │ │ ├── vertex_buffer.o │ │ │ │ ├── vertex_format.d │ │ │ │ ├── vertex_format.dia │ │ │ │ ├── vertex_format.o │ │ │ │ ├── window.d │ │ │ │ ├── window.dia │ │ │ │ └── window.o │ │ └── dgph │ └── Mega TextureTests.build │ │ ├── Mega TextureTests-all-non-framework-target-headers.hmap │ │ ├── Mega TextureTests-all-target-headers.hmap │ │ ├── Mega TextureTests-generated-files.hmap │ │ ├── Mega TextureTests-own-target-headers.hmap │ │ ├── Mega TextureTests-project-headers.hmap │ │ ├── Mega TextureTests.hmap │ │ ├── Objects-normal │ │ └── x86_64 │ │ │ └── Mega TextureTests.LinkFileList │ │ └── dgph │ └── Release │ └── Mega Texture.build │ └── dgph └── readme.md /3rd_party/sdl2/include/SDL2/SDL_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef _SDL_bits_h 29 | #define _SDL_bits_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return Index of the most significant bit, or -1 if the value is 0. 49 | */ 50 | SDL_FORCE_INLINE int 51 | SDL_MostSignificantBitIndex32(Uint32 x) 52 | { 53 | #if defined(__GNUC__) && __GNUC__ >= 4 54 | /* Count Leading Zeroes builtin in GCC. 55 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 56 | */ 57 | if (x == 0) { 58 | return -1; 59 | } 60 | return 31 - __builtin_clz(x); 61 | #else 62 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 63 | * , released in the public domain. 64 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 65 | */ 66 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 67 | const int S[] = {1, 2, 4, 8, 16}; 68 | 69 | int msbIndex = 0; 70 | int i; 71 | 72 | if (x == 0) { 73 | return -1; 74 | } 75 | 76 | for (i = 4; i >= 0; i--) 77 | { 78 | if (x & b[i]) 79 | { 80 | x >>= S[i]; 81 | msbIndex |= S[i]; 82 | } 83 | } 84 | 85 | return msbIndex; 86 | #endif 87 | } 88 | 89 | /* Ends C function definitions when using C++ */ 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | #include "close_code.h" 94 | 95 | #endif /* _SDL_bits_h */ 96 | 97 | /* vi: set ts=4 sw=4 expandtab: */ 98 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_blendmode.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_blendmode.h 24 | * 25 | * Header file declaring the SDL_BlendMode enumeration 26 | */ 27 | 28 | #ifndef _SDL_blendmode_h 29 | #define _SDL_blendmode_h 30 | 31 | #include "begin_code.h" 32 | /* Set up for C function definitions, even when using C++ */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /** 38 | * \brief The blend mode used in SDL_RenderCopy() and drawing operations. 39 | */ 40 | typedef enum 41 | { 42 | SDL_BLENDMODE_NONE = 0x00000000, /**< no blending 43 | dstRGBA = srcRGBA */ 44 | SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending 45 | dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) 46 | dstA = srcA + (dstA * (1-srcA)) */ 47 | SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending 48 | dstRGB = (srcRGB * srcA) + dstRGB 49 | dstA = dstA */ 50 | SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate 51 | dstRGB = srcRGB * dstRGB 52 | dstA = dstA */ 53 | } SDL_BlendMode; 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* _SDL_video_h */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef _SDL_clipboard_h 29 | #define _SDL_clipboard_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * \brief Put UTF-8 text into the clipboard 43 | * 44 | * \sa SDL_GetClipboardText() 45 | */ 46 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 47 | 48 | /** 49 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() 50 | * 51 | * \sa SDL_SetClipboardText() 52 | */ 53 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 54 | 55 | /** 56 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty 57 | * 58 | * \sa SDL_GetClipboardText() 59 | */ 60 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 61 | 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_clipboard_h */ 70 | 71 | /* vi: set ts=4 sw=4 expandtab: */ 72 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_error.h 24 | * 25 | * Simple error message routines for SDL. 26 | */ 27 | 28 | #ifndef _SDL_error_h 29 | #define _SDL_error_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Public functions */ 40 | /* SDL_SetError() unconditionally returns -1. */ 41 | extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...); 42 | extern DECLSPEC const char *SDLCALL SDL_GetError(void); 43 | extern DECLSPEC void SDLCALL SDL_ClearError(void); 44 | 45 | /** 46 | * \name Internal error functions 47 | * 48 | * \internal 49 | * Private error reporting function - used internally. 50 | */ 51 | /* @{ */ 52 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) 53 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) 54 | #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) 55 | typedef enum 56 | { 57 | SDL_ENOMEM, 58 | SDL_EFREAD, 59 | SDL_EFWRITE, 60 | SDL_EFSEEK, 61 | SDL_UNSUPPORTED, 62 | SDL_LASTERROR 63 | } SDL_errorcode; 64 | /* SDL_Error() unconditionally returns -1. */ 65 | extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); 66 | /* @} *//* Internal error functions */ 67 | 68 | /* Ends C function definitions when using C++ */ 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | #include "close_code.h" 73 | 74 | #endif /* _SDL_error_h */ 75 | 76 | /* vi: set ts=4 sw=4 expandtab: */ 77 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_gesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef _SDL_gesture_h 29 | #define _SDL_gesture_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * \brief Begin Recording a gesture on the specified touch, or all touches (-1) 50 | * 51 | * 52 | */ 53 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 54 | 55 | 56 | /** 57 | * \brief Save all currently loaded Dollar Gesture templates 58 | * 59 | * 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); 62 | 63 | /** 64 | * \brief Save a currently loaded Dollar Gesture template 65 | * 66 | * 67 | */ 68 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); 69 | 70 | 71 | /** 72 | * \brief Load Dollar Gesture templates from a file 73 | * 74 | * 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 77 | 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* _SDL_gesture_h */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_loadso.h 24 | * 25 | * System dependent library loading routines 26 | * 27 | * Some things to keep in mind: 28 | * \li These functions only work on C function names. Other languages may 29 | * have name mangling and intrinsic language support that varies from 30 | * compiler to compiler. 31 | * \li Make sure you declare your function pointers with the same calling 32 | * convention as the actual library function. Your code will crash 33 | * mysteriously if you do not do this. 34 | * \li Avoid namespace collisions. If you load a symbol from the library, 35 | * it is not defined whether or not it goes into the global symbol 36 | * namespace for the application. If it does and it conflicts with 37 | * symbols in your code or other shared libraries, you will not get 38 | * the results you expect. :) 39 | */ 40 | 41 | #ifndef _SDL_loadso_h 42 | #define _SDL_loadso_h 43 | 44 | #include "SDL_stdinc.h" 45 | #include "SDL_error.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /** 54 | * This function dynamically loads a shared object and returns a pointer 55 | * to the object handle (or NULL if there was an error). 56 | * The 'sofile' parameter is a system dependent name of the object file. 57 | */ 58 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 59 | 60 | /** 61 | * Given an object handle, this function looks up the address of the 62 | * named function in the shared object and returns it. This address 63 | * is no longer valid after calling SDL_UnloadObject(). 64 | */ 65 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 66 | const char *name); 67 | 68 | /** 69 | * Unload a shared object from memory. 70 | */ 71 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* _SDL_loadso_h */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDLname_h_ 23 | #define _SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* _SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDL_power_h 23 | #define _SDL_power_h 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | 52 | /** 53 | * \brief Get the current power supply details. 54 | * 55 | * \param secs Seconds of battery life left. You can pass a NULL here if 56 | * you don't care. Will return -1 if we can't determine a 57 | * value, or we're not running on a battery. 58 | * 59 | * \param pct Percentage of battery life left, between 0 and 100. You can 60 | * pass a NULL here if you don't care. Will return -1 if we 61 | * can't determine a value, or we're not running on a battery. 62 | * 63 | * \return The state of the battery (if any). 64 | */ 65 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 66 | 67 | /* Ends C function definitions when using C++ */ 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | #include "close_code.h" 72 | 73 | #endif /* _SDL_power_h */ 74 | 75 | /* vi: set ts=4 sw=4 expandtab: */ 76 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef _SDL_quit_h 29 | #define _SDL_quit_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* _SDL_quit_h */ 59 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-8628:b558f99d48f0" 2 | #define SDL_REVISION_NUMBER 8628 3 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef _SDL_test_h 31 | #define _SDL_test_h 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_common.h" 35 | #include "SDL_test_font.h" 36 | #include "SDL_test_random.h" 37 | #include "SDL_test_fuzzer.h" 38 | #include "SDL_test_crc32.h" 39 | #include "SDL_test_md5.h" 40 | #include "SDL_test_log.h" 41 | #include "SDL_test_assert.h" 42 | #include "SDL_test_harness.h" 43 | #include "SDL_test_images.h" 44 | #include "SDL_test_compare.h" 45 | 46 | #include "begin_code.h" 47 | /* Set up for C function definitions, even when using C++ */ 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /* Global definitions */ 53 | 54 | /* 55 | * Note: Maximum size of SDLTest log message is less than SDLs limit 56 | * to ensure we can fit additional information such as the timestamp. 57 | */ 58 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 59 | 60 | /* Ends C function definitions when using C++ */ 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | #include "close_code.h" 65 | 66 | #endif /* _SDL_test_h */ 67 | 68 | /* vi: set ts=4 sw=4 expandtab: */ 69 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_assert.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Assert API for test code and test cases 33 | * 34 | */ 35 | 36 | #ifndef _SDL_test_assert_h 37 | #define _SDL_test_assert_h 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Fails the assert. 47 | */ 48 | #define ASSERT_FAIL 0 49 | 50 | /** 51 | * \brief Passes the assert. 52 | */ 53 | #define ASSERT_PASS 1 54 | 55 | /** 56 | * \brief Assert that logs and break execution flow on failures. 57 | * 58 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 59 | * \param assertDescription Message to log with the assert describing it. 60 | */ 61 | void SDLTest_Assert(int assertCondition, const char *assertDescription, ...); 62 | 63 | /** 64 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 65 | * 66 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 67 | * \param assertDescription Message to log with the assert describing it. 68 | * 69 | * \returns Returns the assertCondition so it can be used to externally to break execution flow if desired. 70 | */ 71 | int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...); 72 | 73 | /** 74 | * \brief Explicitely pass without checking an assertion condition. Updates assertion counter. 75 | * 76 | * \param assertDescription Message to log with the assert describing it. 77 | */ 78 | void SDLTest_AssertPass(const char *assertDescription, ...); 79 | 80 | /** 81 | * \brief Resets the assert summary counters to zero. 82 | */ 83 | void SDLTest_ResetAssertSummary(); 84 | 85 | /** 86 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 87 | */ 88 | void SDLTest_LogAssertSummary(); 89 | 90 | 91 | /** 92 | * \brief Converts the current assert summary state to a test result. 93 | * 94 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 95 | */ 96 | int SDLTest_AssertSummaryToTestResult(); 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #include "close_code.h" 102 | 103 | #endif /* _SDL_test_assert_h */ 104 | 105 | /* vi: set ts=4 sw=4 expandtab: */ 106 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test_compare.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_compare.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef _SDL_test_compare_h 37 | #define _SDL_test_compare_h 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (squared) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* _SDL_test_compare_h */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test_font.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_font.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef _SDL_test_font_h 31 | #define _SDL_test_font_h 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | #define FONT_CHARACTER_SIZE 8 42 | 43 | /** 44 | * \brief Draw a string in the currently set font. 45 | * 46 | * \param renderer The renderer to draw on. 47 | * \param x The X coordinate of the upper left corner of the character. 48 | * \param y The Y coordinate of the upper left corner of the character. 49 | * \param c The character to draw. 50 | * 51 | * \returns Returns 0 on success, -1 on failure. 52 | */ 53 | int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c ); 54 | 55 | /** 56 | * \brief Draw a string in the currently set font. 57 | * 58 | * \param renderer The renderer to draw on. 59 | * \param x The X coordinate of the upper left corner of the string. 60 | * \param y The Y coordinate of the upper left corner of the string. 61 | * \param s The string to draw. 62 | * 63 | * \returns Returns 0 on success, -1 on failure. 64 | */ 65 | int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s ); 66 | 67 | 68 | /* Ends C function definitions when using C++ */ 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | #include "close_code.h" 73 | 74 | #endif /* _SDL_test_font_h */ 75 | 76 | /* vi: set ts=4 sw=4 expandtab: */ 77 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test_images.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_images.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef _SDL_test_images_h 37 | #define _SDL_test_images_h 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(); 59 | SDL_Surface *SDLTest_ImageBlitColor(); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(); 62 | SDL_Surface *SDLTest_ImageBlitBlend(); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(); 66 | SDL_Surface *SDLTest_ImageFace(); 67 | SDL_Surface *SDLTest_ImagePrimitives(); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* _SDL_test_images_h */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef _SDL_test_log_h 37 | #define _SDL_test_log_h 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(const char *fmt, ...); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(const char *fmt, ...); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* _SDL_test_log_h */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_test_random.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_random.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | A "32-bit Multiply with carry random number generator. Very fast. 33 | Includes a list of recommended multipliers. 34 | 35 | multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. 36 | period: (a*2^31)-1 37 | 38 | */ 39 | 40 | #ifndef _SDL_test_random_h 41 | #define _SDL_test_random_h 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /* --- Definitions */ 50 | 51 | /* 52 | * Macros that return a random number in a specific format. 53 | */ 54 | #define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) 55 | 56 | /* 57 | * Context structure for the random number generator state. 58 | */ 59 | typedef struct { 60 | unsigned int a; 61 | unsigned int x; 62 | unsigned int c; 63 | unsigned int ah; 64 | unsigned int al; 65 | } SDLTest_RandomContext; 66 | 67 | 68 | /* --- Function prototypes */ 69 | 70 | /** 71 | * \brief Initialize random number generator with two integers. 72 | * 73 | * Note: The random sequence of numbers returned by ...Random() is the 74 | * same for the same two integers and has a period of 2^31. 75 | * 76 | * \param rndContext pointer to context structure 77 | * \param xi integer that defines the random sequence 78 | * \param ci integer that defines the random sequence 79 | * 80 | */ 81 | void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, 82 | unsigned int ci); 83 | 84 | /** 85 | * \brief Initialize random number generator based on current system time. 86 | * 87 | * \param rndContext pointer to context structure 88 | * 89 | */ 90 | void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); 91 | 92 | 93 | /** 94 | * \brief Initialize random number generator based on current system time. 95 | * 96 | * Note: ...RandomInit() or ...RandomInitTime() must have been called 97 | * before using this function. 98 | * 99 | * \param rndContext pointer to context structure 100 | * 101 | * \returns A random number (32bit unsigned integer) 102 | * 103 | */ 104 | unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); 105 | 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* _SDL_test_random_h */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_touch.h 24 | * 25 | * Include file for SDL touch event handling. 26 | */ 27 | 28 | #ifndef _SDL_touch_h 29 | #define _SDL_touch_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "begin_code.h" 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef Sint64 SDL_TouchID; 42 | typedef Sint64 SDL_FingerID; 43 | 44 | typedef struct SDL_Finger 45 | { 46 | SDL_FingerID id; 47 | float x; 48 | float y; 49 | float pressure; 50 | } SDL_Finger; 51 | 52 | /* Used as the device ID for mouse events simulated with touch input */ 53 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 54 | 55 | 56 | /* Function prototypes */ 57 | 58 | /** 59 | * \brief Get the number of registered touch devices. 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); 62 | 63 | /** 64 | * \brief Get the touch ID with the given index, or 0 if the index is invalid. 65 | */ 66 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 67 | 68 | /** 69 | * \brief Get the number of active fingers for a given touch device. 70 | */ 71 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 72 | 73 | /** 74 | * \brief Get the finger object of the given touch, with the given index. 75 | */ 76 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 77 | 78 | /* Ends C function definitions when using C++ */ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #include "close_code.h" 83 | 84 | #endif /* _SDL_touch_h */ 85 | 86 | /* vi: set ts=4 sw=4 expandtab: */ 87 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /3rd_party/sdl2/include/SDL2/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /* Reset structure packing at previous byte alignment */ 32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 33 | #ifdef __BORLANDC__ 34 | #pragma nopackwarning 35 | #endif 36 | #pragma pack(pop) 37 | #endif /* Compiler needs structure packing set */ 38 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/SDL2: -------------------------------------------------------------------------------- 1 | Versions/Current/SDL2 -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef _SDL_bits_h 29 | #define _SDL_bits_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return Index of the most significant bit, or -1 if the value is 0. 49 | */ 50 | SDL_FORCE_INLINE int 51 | SDL_MostSignificantBitIndex32(Uint32 x) 52 | { 53 | #if defined(__GNUC__) && __GNUC__ >= 4 54 | /* Count Leading Zeroes builtin in GCC. 55 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 56 | */ 57 | if (x == 0) { 58 | return -1; 59 | } 60 | return 31 - __builtin_clz(x); 61 | #else 62 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 63 | * , released in the public domain. 64 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 65 | */ 66 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 67 | const int S[] = {1, 2, 4, 8, 16}; 68 | 69 | int msbIndex = 0; 70 | int i; 71 | 72 | if (x == 0) { 73 | return -1; 74 | } 75 | 76 | for (i = 4; i >= 0; i--) 77 | { 78 | if (x & b[i]) 79 | { 80 | x >>= S[i]; 81 | msbIndex |= S[i]; 82 | } 83 | } 84 | 85 | return msbIndex; 86 | #endif 87 | } 88 | 89 | /* Ends C function definitions when using C++ */ 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | #include "close_code.h" 94 | 95 | #endif /* _SDL_bits_h */ 96 | 97 | /* vi: set ts=4 sw=4 expandtab: */ 98 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_blendmode.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_blendmode.h 24 | * 25 | * Header file declaring the SDL_BlendMode enumeration 26 | */ 27 | 28 | #ifndef _SDL_blendmode_h 29 | #define _SDL_blendmode_h 30 | 31 | #include "begin_code.h" 32 | /* Set up for C function definitions, even when using C++ */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /** 38 | * \brief The blend mode used in SDL_RenderCopy() and drawing operations. 39 | */ 40 | typedef enum 41 | { 42 | SDL_BLENDMODE_NONE = 0x00000000, /**< no blending 43 | dstRGBA = srcRGBA */ 44 | SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending 45 | dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) 46 | dstA = srcA + (dstA * (1-srcA)) */ 47 | SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending 48 | dstRGB = (srcRGB * srcA) + dstRGB 49 | dstA = dstA */ 50 | SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate 51 | dstRGB = srcRGB * dstRGB 52 | dstA = dstA */ 53 | } SDL_BlendMode; 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* _SDL_video_h */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef _SDL_clipboard_h 29 | #define _SDL_clipboard_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * \brief Put UTF-8 text into the clipboard 43 | * 44 | * \sa SDL_GetClipboardText() 45 | */ 46 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 47 | 48 | /** 49 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() 50 | * 51 | * \sa SDL_SetClipboardText() 52 | */ 53 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 54 | 55 | /** 56 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty 57 | * 58 | * \sa SDL_GetClipboardText() 59 | */ 60 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 61 | 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_clipboard_h */ 70 | 71 | /* vi: set ts=4 sw=4 expandtab: */ 72 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDL_config_h 23 | #define _SDL_config_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /** 28 | * \file SDL_config.h 29 | */ 30 | 31 | /* Add any platform that doesn't build using the configure system. */ 32 | #ifdef USING_PREMAKE_CONFIG_H 33 | #include "SDL_config_premake.h" 34 | #elif defined(__WIN32__) 35 | #include "SDL_config_windows.h" 36 | #elif defined(__WINRT__) 37 | #include "SDL_config_winrt.h" 38 | #elif defined(__MACOSX__) 39 | #include "SDL_config_macosx.h" 40 | #elif defined(__IPHONEOS__) 41 | #include "SDL_config_iphoneos.h" 42 | #elif defined(__ANDROID__) 43 | #include "SDL_config_android.h" 44 | #elif defined(__PSP__) 45 | #include "SDL_config_psp.h" 46 | #else 47 | /* This is a minimal configuration just to get SDL running on new platforms */ 48 | #include "SDL_config_minimal.h" 49 | #endif /* platform config */ 50 | 51 | #ifdef USING_GENERATED_CONFIG_H 52 | #error Wrong SDL_config.h, check your include path? 53 | #endif 54 | 55 | #endif /* _SDL_config_h */ 56 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_error.h 24 | * 25 | * Simple error message routines for SDL. 26 | */ 27 | 28 | #ifndef _SDL_error_h 29 | #define _SDL_error_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Public functions */ 40 | /* SDL_SetError() unconditionally returns -1. */ 41 | extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...); 42 | extern DECLSPEC const char *SDLCALL SDL_GetError(void); 43 | extern DECLSPEC void SDLCALL SDL_ClearError(void); 44 | 45 | /** 46 | * \name Internal error functions 47 | * 48 | * \internal 49 | * Private error reporting function - used internally. 50 | */ 51 | /* @{ */ 52 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) 53 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) 54 | #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) 55 | typedef enum 56 | { 57 | SDL_ENOMEM, 58 | SDL_EFREAD, 59 | SDL_EFWRITE, 60 | SDL_EFSEEK, 61 | SDL_UNSUPPORTED, 62 | SDL_LASTERROR 63 | } SDL_errorcode; 64 | /* SDL_Error() unconditionally returns -1. */ 65 | extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); 66 | /* @} *//* Internal error functions */ 67 | 68 | /* Ends C function definitions when using C++ */ 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | #include "close_code.h" 73 | 74 | #endif /* _SDL_error_h */ 75 | 76 | /* vi: set ts=4 sw=4 expandtab: */ 77 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_gesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef _SDL_gesture_h 29 | #define _SDL_gesture_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * \brief Begin Recording a gesture on the specified touch, or all touches (-1) 50 | * 51 | * 52 | */ 53 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 54 | 55 | 56 | /** 57 | * \brief Save all currently loaded Dollar Gesture templates 58 | * 59 | * 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); 62 | 63 | /** 64 | * \brief Save a currently loaded Dollar Gesture template 65 | * 66 | * 67 | */ 68 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); 69 | 70 | 71 | /** 72 | * \brief Load Dollar Gesture templates from a file 73 | * 74 | * 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 77 | 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* _SDL_gesture_h */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_loadso.h 24 | * 25 | * System dependent library loading routines 26 | * 27 | * Some things to keep in mind: 28 | * \li These functions only work on C function names. Other languages may 29 | * have name mangling and intrinsic language support that varies from 30 | * compiler to compiler. 31 | * \li Make sure you declare your function pointers with the same calling 32 | * convention as the actual library function. Your code will crash 33 | * mysteriously if you do not do this. 34 | * \li Avoid namespace collisions. If you load a symbol from the library, 35 | * it is not defined whether or not it goes into the global symbol 36 | * namespace for the application. If it does and it conflicts with 37 | * symbols in your code or other shared libraries, you will not get 38 | * the results you expect. :) 39 | */ 40 | 41 | #ifndef _SDL_loadso_h 42 | #define _SDL_loadso_h 43 | 44 | #include "SDL_stdinc.h" 45 | #include "SDL_error.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /** 54 | * This function dynamically loads a shared object and returns a pointer 55 | * to the object handle (or NULL if there was an error). 56 | * The 'sofile' parameter is a system dependent name of the object file. 57 | */ 58 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 59 | 60 | /** 61 | * Given an object handle, this function looks up the address of the 62 | * named function in the shared object and returns it. This address 63 | * is no longer valid after calling SDL_UnloadObject(). 64 | */ 65 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 66 | const char *name); 67 | 68 | /** 69 | * Unload a shared object from memory. 70 | */ 71 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* _SDL_loadso_h */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDLname_h_ 23 | #define _SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* _SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _SDL_power_h 23 | #define _SDL_power_h 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | 52 | /** 53 | * \brief Get the current power supply details. 54 | * 55 | * \param secs Seconds of battery life left. You can pass a NULL here if 56 | * you don't care. Will return -1 if we can't determine a 57 | * value, or we're not running on a battery. 58 | * 59 | * \param pct Percentage of battery life left, between 0 and 100. You can 60 | * pass a NULL here if you don't care. Will return -1 if we 61 | * can't determine a value, or we're not running on a battery. 62 | * 63 | * \return The state of the battery (if any). 64 | */ 65 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 66 | 67 | /* Ends C function definitions when using C++ */ 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | #include "close_code.h" 72 | 73 | #endif /* _SDL_power_h */ 74 | 75 | /* vi: set ts=4 sw=4 expandtab: */ 76 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef _SDL_quit_h 29 | #define _SDL_quit_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* _SDL_quit_h */ 59 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-8628:b558f99d48f0" 2 | #define SDL_REVISION_NUMBER 8628 3 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_touch.h 24 | * 25 | * Include file for SDL touch event handling. 26 | */ 27 | 28 | #ifndef _SDL_touch_h 29 | #define _SDL_touch_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "begin_code.h" 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef Sint64 SDL_TouchID; 42 | typedef Sint64 SDL_FingerID; 43 | 44 | typedef struct SDL_Finger 45 | { 46 | SDL_FingerID id; 47 | float x; 48 | float y; 49 | float pressure; 50 | } SDL_Finger; 51 | 52 | /* Used as the device ID for mouse events simulated with touch input */ 53 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 54 | 55 | 56 | /* Function prototypes */ 57 | 58 | /** 59 | * \brief Get the number of registered touch devices. 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); 62 | 63 | /** 64 | * \brief Get the touch ID with the given index, or 0 if the index is invalid. 65 | */ 66 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 67 | 68 | /** 69 | * \brief Get the number of active fingers for a given touch device. 70 | */ 71 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 72 | 73 | /** 74 | * \brief Get the finger object of the given touch, with the given index. 75 | */ 76 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 77 | 78 | /* Ends C function definitions when using C++ */ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #include "close_code.h" 83 | 84 | #endif /* _SDL_touch_h */ 85 | 86 | /* vi: set ts=4 sw=4 expandtab: */ 87 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Headers/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2014 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /* Reset structure packing at previous byte alignment */ 32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__) 33 | #ifdef __BORLANDC__ 34 | #pragma nopackwarning 35 | #endif 36 | #pragma pack(pop) 37 | #endif /* Compiler needs structure packing set */ 38 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 13C64 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | SDL2 11 | CFBundleGetInfoString 12 | http://www.libsdl.org 13 | CFBundleIdentifier 14 | org.libsdl.SDL2 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | Simple DirectMedia Layer 19 | CFBundlePackageType 20 | FMWK 21 | CFBundleShortVersionString 22 | 2.0.3 23 | CFBundleSignature 24 | SDLX 25 | CFBundleVersion 26 | 2.0.3 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 5A3005 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 13A595 35 | DTSDKName 36 | macosx10.9 37 | DTXcode 38 | 0502 39 | DTXcodeBuild 40 | 5A3005 41 | 42 | 43 | -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/SDL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/3rd_party/sdl2/lib/osx/SDL2.framework/Versions/A/SDL2 -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/osx/SDL2.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/win_32/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/3rd_party/sdl2/lib/win_32/SDL2.dll -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/win_32/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/3rd_party/sdl2/lib/win_32/SDL2.lib -------------------------------------------------------------------------------- /3rd_party/sdl2/lib/win_32/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/3rd_party/sdl2/lib/win_32/SDL2main.lib -------------------------------------------------------------------------------- /3rd_party/soil/SOIL/image_DXT.h: -------------------------------------------------------------------------------- 1 | /* 2 | Jonathan Dummer 3 | 2007-07-31-10.32 4 | 5 | simple DXT compression / decompression code 6 | 7 | public domain 8 | */ 9 | 10 | #ifndef HEADER_IMAGE_DXT 11 | #define HEADER_IMAGE_DXT 12 | 13 | /** 14 | Converts an image from an array of unsigned chars (RGB or RGBA) to 15 | DXT1 or DXT5, then saves the converted image to disk. 16 | \return 0 if failed, otherwise returns 1 17 | **/ 18 | int 19 | save_image_as_DDS 20 | ( 21 | const char *filename, 22 | int width, int height, int channels, 23 | const unsigned char *const data 24 | ); 25 | 26 | /** 27 | take an image and convert it to DXT1 (no alpha) 28 | **/ 29 | unsigned char* 30 | convert_image_to_DXT1 31 | ( 32 | const unsigned char *const uncompressed, 33 | int width, int height, int channels, 34 | int *out_size 35 | ); 36 | 37 | /** 38 | take an image and convert it to DXT5 (with alpha) 39 | **/ 40 | unsigned char* 41 | convert_image_to_DXT5 42 | ( 43 | const unsigned char *const uncompressed, 44 | int width, int height, int channels, 45 | int *out_size 46 | ); 47 | 48 | /** A bunch of DirectDraw Surface structures and flags **/ 49 | typedef struct 50 | { 51 | unsigned int dwMagic; 52 | unsigned int dwSize; 53 | unsigned int dwFlags; 54 | unsigned int dwHeight; 55 | unsigned int dwWidth; 56 | unsigned int dwPitchOrLinearSize; 57 | unsigned int dwDepth; 58 | unsigned int dwMipMapCount; 59 | unsigned int dwReserved1[ 11 ]; 60 | 61 | /* DDPIXELFORMAT */ 62 | struct 63 | { 64 | unsigned int dwSize; 65 | unsigned int dwFlags; 66 | unsigned int dwFourCC; 67 | unsigned int dwRGBBitCount; 68 | unsigned int dwRBitMask; 69 | unsigned int dwGBitMask; 70 | unsigned int dwBBitMask; 71 | unsigned int dwAlphaBitMask; 72 | } 73 | sPixelFormat; 74 | 75 | /* DDCAPS2 */ 76 | struct 77 | { 78 | unsigned int dwCaps1; 79 | unsigned int dwCaps2; 80 | unsigned int dwDDSX; 81 | unsigned int dwReserved; 82 | } 83 | sCaps; 84 | unsigned int dwReserved2; 85 | } 86 | DDS_header ; 87 | 88 | /* the following constants were copied directly off the MSDN website */ 89 | 90 | /* The dwFlags member of the original DDSURFACEDESC2 structure 91 | can be set to one or more of the following values. */ 92 | #define DDSD_CAPS 0x00000001 93 | #define DDSD_HEIGHT 0x00000002 94 | #define DDSD_WIDTH 0x00000004 95 | #define DDSD_PITCH 0x00000008 96 | #define DDSD_PIXELFORMAT 0x00001000 97 | #define DDSD_MIPMAPCOUNT 0x00020000 98 | #define DDSD_LINEARSIZE 0x00080000 99 | #define DDSD_DEPTH 0x00800000 100 | 101 | /* DirectDraw Pixel Format */ 102 | #define DDPF_ALPHAPIXELS 0x00000001 103 | #define DDPF_FOURCC 0x00000004 104 | #define DDPF_RGB 0x00000040 105 | 106 | /* The dwCaps1 member of the DDSCAPS2 structure can be 107 | set to one or more of the following values. */ 108 | #define DDSCAPS_COMPLEX 0x00000008 109 | #define DDSCAPS_TEXTURE 0x00001000 110 | #define DDSCAPS_MIPMAP 0x00400000 111 | 112 | /* The dwCaps2 member of the DDSCAPS2 structure can be 113 | set to one or more of the following values. */ 114 | #define DDSCAPS2_CUBEMAP 0x00000200 115 | #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400 116 | #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800 117 | #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000 118 | #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000 119 | #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000 120 | #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000 121 | #define DDSCAPS2_VOLUME 0x00200000 122 | 123 | #endif /* HEADER_IMAGE_DXT */ 124 | -------------------------------------------------------------------------------- /3rd_party/soil/SOIL/image_helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | Jonathan Dummer 3 | 4 | Image helper functions 5 | 6 | MIT license 7 | */ 8 | 9 | #ifndef HEADER_IMAGE_HELPER 10 | #define HEADER_IMAGE_HELPER 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /** 17 | This function upscales an image. 18 | Not to be used to create MIPmaps, 19 | but to make it square, 20 | or to make it a power-of-two sized. 21 | **/ 22 | int 23 | up_scale_image 24 | ( 25 | const unsigned char* const orig, 26 | int width, int height, int channels, 27 | unsigned char* resampled, 28 | int resampled_width, int resampled_height 29 | ); 30 | 31 | /** 32 | This function downscales an image. 33 | Used for creating MIPmaps, 34 | the incoming image should be a 35 | power-of-two sized. 36 | **/ 37 | int 38 | mipmap_image 39 | ( 40 | const unsigned char* const orig, 41 | int width, int height, int channels, 42 | unsigned char* resampled, 43 | int block_size_x, int block_size_y 44 | ); 45 | 46 | /** 47 | This function takes the RGB components of the image 48 | and scales each channel from [0,255] to [16,235]. 49 | This makes the colors "Safe" for display on NTSC 50 | displays. Note that this is _NOT_ a good idea for 51 | loading images like normal- or height-maps! 52 | **/ 53 | int 54 | scale_image_RGB_to_NTSC_safe 55 | ( 56 | unsigned char* orig, 57 | int width, int height, int channels 58 | ); 59 | 60 | /** 61 | This function takes the RGB components of the image 62 | and converts them into YCoCg. 3 components will be 63 | re-ordered to CoYCg (for optimum DXT1 compression), 64 | while 4 components will be ordered CoCgAY (for DXT5 65 | compression). 66 | **/ 67 | int 68 | convert_RGB_to_YCoCg 69 | ( 70 | unsigned char* orig, 71 | int width, int height, int channels 72 | ); 73 | 74 | /** 75 | This function takes the YCoCg components of the image 76 | and converts them into RGB. See above. 77 | **/ 78 | int 79 | convert_YCoCg_to_RGB 80 | ( 81 | unsigned char* orig, 82 | int width, int height, int channels 83 | ); 84 | 85 | /** 86 | Converts an HDR image from an array 87 | of unsigned chars (RGBE) to RGBdivA 88 | \return 0 if failed, otherwise returns 1 89 | **/ 90 | int 91 | RGBE_to_RGBdivA 92 | ( 93 | unsigned char *image, 94 | int width, int height, 95 | int rescale_to_max 96 | ); 97 | 98 | /** 99 | Converts an HDR image from an array 100 | of unsigned chars (RGBE) to RGBdivA2 101 | \return 0 if failed, otherwise returns 1 102 | **/ 103 | int 104 | RGBE_to_RGBdivA2 105 | ( 106 | unsigned char *image, 107 | int width, int height, 108 | int rescale_to_max 109 | ); 110 | 111 | #ifdef __cplusplus 112 | } 113 | #endif 114 | 115 | #endif /* HEADER_IMAGE_HELPER */ 116 | -------------------------------------------------------------------------------- /3rd_party/soil/SOIL/stbi_DDS_aug.h: -------------------------------------------------------------------------------- 1 | /* 2 | adding DDS loading support to stbi 3 | */ 4 | 5 | #ifndef HEADER_STB_IMAGE_DDS_AUGMENTATION 6 | #define HEADER_STB_IMAGE_DDS_AUGMENTATION 7 | 8 | // is it a DDS file? 9 | extern int stbi_dds_test_memory (stbi_uc const *buffer, int len); 10 | 11 | extern stbi_uc *stbi_dds_load (char *filename, int *x, int *y, int *comp, int req_comp); 12 | extern stbi_uc *stbi_dds_load_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp); 13 | #ifndef STBI_NO_STDIO 14 | extern int stbi_dds_test_file (FILE *f); 15 | extern stbi_uc *stbi_dds_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp); 16 | #endif 17 | 18 | // 19 | // 20 | //// end header file ///////////////////////////////////////////////////// 21 | #endif // HEADER_STB_IMAGE_DDS_AUGMENTATION 22 | -------------------------------------------------------------------------------- /assets/models/unit_cube.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.74 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o unit_cube 4 | v -0.500000 -0.500000 0.500000 5 | v -0.500000 0.500000 0.500000 6 | v -0.500000 -0.500000 -0.500000 7 | v -0.500000 0.500000 -0.500000 8 | v 0.500000 -0.500000 0.500000 9 | v 0.500000 0.500000 0.500000 10 | v 0.500000 -0.500000 -0.500000 11 | v 0.500000 0.500000 -0.500000 12 | vt 0.999900 0.000100 13 | vt 0.999900 0.999900 14 | vt 0.000100 0.999900 15 | vt 0.000100 0.000100 16 | vn -1.000000 0.000000 0.000000 17 | vn 0.000000 0.000000 -1.000000 18 | vn 0.000000 0.000000 1.000000 19 | vn 0.000000 -1.000000 0.000000 20 | vn 0.000000 1.000000 0.000000 21 | vn 1.000000 0.000000 0.000000 22 | f 4/1/1 3/2/1 1/3/1 23 | f 8/1/2 7/2/2 3/3/2 24 | f 2/3/3 1/4/3 5/1/3 25 | f 3/4/4 7/1/4 5/2/4 26 | f 8/2/5 4/3/5 2/4/5 27 | f 2/4/1 4/1/1 1/3/1 28 | f 4/4/2 8/1/2 3/3/2 29 | f 6/2/3 2/3/3 5/1/3 30 | f 1/3/4 3/4/4 5/2/4 31 | f 6/1/5 8/2/5 2/4/5 32 | f 6/3/6 5/4/6 7/1/6 33 | f 8/2/6 6/3/6 7/1/6 34 | -------------------------------------------------------------------------------- /assets/models/unit_plane.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.74 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o unit_plane 4 | v -0.500000 0.000000 0.500000 5 | v 0.500000 0.000000 0.500000 6 | v -0.500000 0.000000 -0.500000 7 | v 0.500000 0.000000 -0.500000 8 | vt 0.999900 0.000100 9 | vt 0.999900 0.999900 10 | vt 0.000100 0.999900 11 | vt 0.000100 0.000100 12 | vn 0.000000 1.000000 0.000000 13 | f 2/1/1 4/2/1 3/3/1 14 | f 1/4/1 2/1/1 3/3/1 15 | -------------------------------------------------------------------------------- /assets/textures/dev_colored_squares_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_colored_squares_512.png -------------------------------------------------------------------------------- /assets/textures/dev_grid_blue_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_grid_blue_512.png -------------------------------------------------------------------------------- /assets/textures/dev_grid_green_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_grid_green_512.png -------------------------------------------------------------------------------- /assets/textures/dev_grid_grey_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_grid_grey_512.png -------------------------------------------------------------------------------- /assets/textures/dev_grid_orange_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_grid_orange_512.png -------------------------------------------------------------------------------- /assets/textures/dev_grid_red_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_grid_red_512.png -------------------------------------------------------------------------------- /assets/textures/dev_squares_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_squares_1024.png -------------------------------------------------------------------------------- /assets/textures/dev_squares_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/assets/textures/dev_squares_512.png -------------------------------------------------------------------------------- /external/math/detail/detail.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Detail is here to provide some impl details to the rest 3 | of the library. You shouldn't really have a need to use this. 4 | */ 5 | #ifndef DETAIL_INCLUDED_738ADE13_1093_4593_AF81_2F9CB58DAE42 6 | #define DETAIL_INCLUDED_738ADE13_1093_4593_AF81_2F9CB58DAE42 7 | 8 | 9 | 10 | // Detect what platform 11 | #define CAFFMATH_MAC 12 | //#define CAFFMATH_NIX 13 | //#define CAFFMATH_WIN 14 | //#define CAFFMATH_UNKNOWN 15 | 16 | 17 | // Detect what compiler. 18 | #define CAFFMATH_CLANG 19 | //#define CAFFMATH_GCC 20 | //#define CAFFMATH_MSVS 21 | 22 | 23 | 24 | #define CAFFMATH_INLINE inline 25 | #define CAFFMATH_NO_SIMD 1; 26 | 27 | 28 | 29 | #endif // include guard -------------------------------------------------------------------------------- /external/math/general/general.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GENERAL_INCLUDED_BA1581F2_35C3_4026_BCDA_6E9EC3CF253E 2 | #define GENERAL_INCLUDED_BA1581F2_35C3_4026_BCDA_6E9EC3CF253E 3 | 4 | 5 | /* 6 | These are general math functions and constants. 7 | Alot of them are simple stubs to stl functions. 8 | */ 9 | 10 | 11 | #include 12 | #include 13 | 14 | 15 | namespace caffeine { 16 | namespace math { 17 | 18 | 19 | // ** INTERFACE ** // 20 | 21 | 22 | // ** Constants ** // 23 | 24 | inline float pi() { return 3.14159265359f; } 25 | inline float two_pi() { return 2.f * pi(); } 26 | inline float half_pi() { return pi() * 0.5f; } 27 | inline float tau() { return two_pi(); } 28 | inline float half_tau() { return pi(); } 29 | inline float quart_tau() { return half_pi(); } 30 | inline float g_ratio() { return 1.61803398875f; } 31 | inline float root_two() { return 1.41421356237f; } 32 | inline float root_three() { return 1.73205080757f; } 33 | 34 | 35 | // ** Trig ** // 36 | 37 | inline float tan(const float x); 38 | inline float a_tan2(const float x, const float y); 39 | inline float cos(const float radians); 40 | inline float a_cos(const float radians); 41 | inline float sin(const float radians); 42 | inline float a_sin(const float radians); 43 | 44 | 45 | // ** Degs/Rads ** // 46 | 47 | inline float radians_to_degrees(const float radians); // TODO: 48 | inline float degrees_to_radians(const float degrees); // TODO: 49 | 50 | 51 | // ** Other general ** // 52 | 53 | inline float sqrt(const float x); 54 | inline float abs(const float x); 55 | inline float max(const float a, const float b); // TODO: 56 | inline float min(const float a, const float b); // TODO: 57 | inline float clamp(const float x, const float between_a, const float between_b); 58 | inline bool is_between(const float to_check, const float a, const float b); // TODO: 59 | inline bool is_near(const float actual, const float target, const float error_margin); // TODO: 60 | inline bool is_pow_two(const uint32_t i); // TODO: 61 | inline bool fmod(const float x, const float max); // TODO; 62 | 63 | 64 | 65 | // ** IMPL ** // 66 | 67 | 68 | float 69 | sqrt(const float x) 70 | { 71 | return std::sqrt(x); 72 | } 73 | 74 | 75 | float 76 | clamp(const float x, const float between_a, const float between_b) 77 | { 78 | const float highest = between_a >= between_b ? between_a : between_b; 79 | const float lowest = between_a != highest ? between_a : between_b; 80 | 81 | if(x >= highest) 82 | { 83 | return highest; 84 | } 85 | else if(x <= lowest) 86 | { 87 | return lowest; 88 | } 89 | 90 | return x; 91 | } 92 | 93 | 94 | float 95 | abs(const float x) 96 | { 97 | return std::abs(x); 98 | } 99 | 100 | 101 | float 102 | tan(const float x) 103 | { 104 | return std::tan(x); 105 | } 106 | 107 | 108 | float 109 | a_tan2(const float x, const float y) 110 | { 111 | return std::atan2(x, y); 112 | } 113 | 114 | 115 | float 116 | cos(const float radians) 117 | { 118 | return std::cos(radians); 119 | } 120 | 121 | 122 | float 123 | a_cos(const float radians) 124 | { 125 | return std::acos(radians); 126 | } 127 | 128 | 129 | float 130 | sin(const float radians) 131 | { 132 | return std::sin(radians); 133 | } 134 | 135 | 136 | float 137 | a_sin(const float radians) 138 | { 139 | return std::asin(radians); 140 | } 141 | 142 | 143 | } // namespace 144 | } // namespace 145 | 146 | 147 | #endif // include guard -------------------------------------------------------------------------------- /external/math/general/to_string.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TO_STRING_INCLUDED_AA5F04E4_BDD9_4385_99F2_2C9E7210FDD6 2 | #define TO_STRING_INCLUDED_AA5F04E4_BDD9_4385_99F2_2C9E7210FDD6 3 | 4 | 5 | #include "../vector/vector_types.hpp" 6 | #include "../vector/vector2.hpp" 7 | #include "../vector/vector3.hpp" 8 | #include "../vector/vector4.hpp" 9 | #include "../matrix/matrix_types.hpp" 10 | #include "../matrix/matrix44.hpp" 11 | #include 12 | 13 | 14 | namespace caffeine { 15 | namespace math { 16 | 17 | 18 | inline std::string to_string(const vector2 vec); 19 | inline std::string to_string(const vector3 vec); 20 | inline std::string to_string(const vector4 vec); 21 | inline std::string to_string(const matrix44 mat, const bool line_breaks = false); 22 | 23 | 24 | std::string 25 | to_string(const vector2 vec) 26 | { 27 | const std::string x = std::to_string(vector2_get_x(vec)); 28 | const std::string y = std::to_string(vector2_get_y(vec)); 29 | 30 | return std::string("Vec2: " + x + ", " + y); 31 | } 32 | 33 | 34 | std::string 35 | to_string(const vector3 vec) 36 | { 37 | const std::string x = std::to_string(vector3_get_x(vec)); 38 | const std::string y = std::to_string(vector3_get_y(vec)); 39 | const std::string z = std::to_string(vector3_get_z(vec)); 40 | 41 | return std::string("Vec3: " + x + ", " + y + ", " + z); 42 | } 43 | 44 | std::string 45 | to_string(const vector4 vec) 46 | { 47 | const std::string x = std::to_string(vector4_get_x(vec)); 48 | const std::string y = std::to_string(vector4_get_y(vec)); 49 | const std::string z = std::to_string(vector4_get_z(vec)); 50 | const std::string w = std::to_string(vector4_get_w(vec)); 51 | 52 | return std::string("Vec4: " + x + ", " + y + ", " + z + ", " + w); 53 | } 54 | 55 | 56 | std::string 57 | to_string(const matrix44 mat, const bool line_breaks) 58 | { 59 | const std::string row_break = line_breaks ? "\n" : ", "; 60 | 61 | const std::string row_1 = std::to_string(matrix44_get(mat, 0, 0)) + ", " + std::to_string(matrix44_get(mat, 0, 1)) + ", " + std::to_string(matrix44_get(mat, 0, 2)) + ", " + std::to_string(matrix44_get(mat, 0, 3)) + row_break; 62 | const std::string row_2 = std::to_string(matrix44_get(mat, 1, 0)) + ", " + std::to_string(matrix44_get(mat, 1, 1)) + ", " + std::to_string(matrix44_get(mat, 1, 2)) + ", " + std::to_string(matrix44_get(mat, 1, 3)) + row_break; 63 | const std::string row_3 = std::to_string(matrix44_get(mat, 2, 0)) + ", " + std::to_string(matrix44_get(mat, 2, 1)) + ", " + std::to_string(matrix44_get(mat, 2, 2)) + ", " + std::to_string(matrix44_get(mat, 2, 3)) + row_break; 64 | const std::string row_4 = std::to_string(matrix44_get(mat, 3, 0)) + ", " + std::to_string(matrix44_get(mat, 3, 1)) + ", " + std::to_string(matrix44_get(mat, 3, 2)) + ", " + std::to_string(matrix44_get(mat, 3, 3)); 65 | 66 | const std::string title_break = line_breaks ? "\n" : " "; 67 | 68 | return std::string("Mat44:" + title_break + row_1 + row_2 + row_3 + row_4); 69 | } 70 | 71 | 72 | } // namespace 73 | } // namespace 74 | 75 | 76 | #endif // include guard -------------------------------------------------------------------------------- /external/math/geometry/aabb_2d.hpp: -------------------------------------------------------------------------------- 1 | #ifndef AABB_INCLUDED_513E1E12_3A45_4E66_96F0_60E7702B08A5 2 | #define AABB_INCLUDED_513E1E12_3A45_4E66_96F0_60E7702B08A5 3 | 4 | 5 | #include "../vector/vector2.hpp" 6 | 7 | 8 | namespace caffeine { 9 | namespace dev_math { 10 | 11 | 12 | struct aabb_2d 13 | { 14 | vector2 position; 15 | vector2 size; 16 | }; 17 | 18 | 19 | inline aabb_2d aabb_2d_init(const vector2 position = vector2_zero(), const vector2 size = vector2_one()); 20 | inline bool aabb_2d_do_intersect(const aabb_2d &left, const aabb_2d &right); 21 | inline float aabb_2d_get_area(const aabb_2d &left); 22 | inline float aabb_2d_get_size(); 23 | inline float aabb_2d_set_size(); 24 | inline float aabb_2d_get_position(); 25 | inline float aabb_2d_set_position(); 26 | inline float aabb_2d_get_extents(); 27 | 28 | 29 | // Impl 30 | aabb_2d 31 | aabb_2d_init(const vector2 position, const vector2 size) 32 | { 33 | return aabb_2d{position, size}; 34 | } 35 | 36 | 37 | bool 38 | aabb_2d_do_intersect(const aabb_2d &left, const aabb_2d &right) 39 | { 40 | // Are the x's overlapping. 41 | if(vector2_get_x(left) >= vector2_get_x(right) && vector2_get_x(right) > vector2_get_x(left)) 42 | { 43 | if(vector2_get_y(left) >= vector2_get_y(right) && vector2_get_y(right) > vector2_get_y(left)) 44 | { 45 | return true; 46 | } 47 | } 48 | 49 | return false; 50 | } 51 | 52 | 53 | float 54 | aabb_2d_get_area(const aabb_2d &left) 55 | { 56 | return vector2_get_x(left) & vectro2_get_y(right); 57 | } 58 | 59 | 60 | } // namespace 61 | } // namespace 62 | 63 | 64 | #endif // include guard -------------------------------------------------------------------------------- /external/math/geometry/aabb_3d.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/external/math/geometry/aabb_3d.hpp -------------------------------------------------------------------------------- /external/math/geometry/plane.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PLANE_INCLUDED_55941C8D_6E60_4984_9420_576F55E2FF9F 2 | #define PLANE_INCLUDED_55941C8D_6E60_4984_9420_576F55E2FF9F 3 | 4 | struct inf_plane 5 | { 6 | // point 7 | // normal 8 | }; 9 | 10 | struct some_plane 11 | { 12 | // point 3 13 | // normal 3 14 | // size 2 15 | }; 16 | 17 | #endif // include guard -------------------------------------------------------------------------------- /external/math/geometry/ray_test.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RAY_TEST_INCLUDED_A9CE71C2_B1BF_448C_97C8_17EED63FF42C 2 | #define RAY_TEST_INCLUDED_A9CE71C2_B1BF_448C_97C8_17EED63FF42C 3 | 4 | 5 | struct ray 6 | { 7 | 8 | }; 9 | 10 | struct result 11 | { 12 | 13 | }; 14 | 15 | 16 | #endif // include guard -------------------------------------------------------------------------------- /external/math/math.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MATH_INCLUDED_B36273D6_32F5_4D9F_AF97_F2CC702156FD 2 | #define MATH_INCLUDED_B36273D6_32F5_4D9F_AF97_F2CC702156FD 3 | 4 | 5 | /* 6 | Lazy include for math functionality. 7 | */ 8 | 9 | 10 | #include "vector/vector.hpp" 11 | #include "matrix/matrix.hpp" 12 | #include "quaternion/quaternion.hpp" 13 | #include "transform/transform.hpp" 14 | 15 | 16 | #endif // include guard -------------------------------------------------------------------------------- /external/math/matrix/matrix.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MATRIX_INCLUDED_998E4CEC_819E_4B20_BE2E_49E6C0D1CBAF 2 | #define MATRIX_INCLUDED_998E4CEC_819E_4B20_BE2E_49E6C0D1CBAF 3 | 4 | 5 | /* 6 | Lazy include for matrix functionality. 7 | */ 8 | 9 | 10 | #include "matrix_types.hpp" 11 | #include "matrix44.hpp" 12 | #include "matrix33.hpp" 13 | 14 | 15 | #endif // include guard -------------------------------------------------------------------------------- /external/math/matrix/matrix_types.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MATRIX_TYPES_INCLUDED_2460E1C2_10A1_4101_A23D_C5E683367E4A 2 | #define MATRIX_TYPES_INCLUDED_2460E1C2_10A1_4101_A23D_C5E683367E4A 3 | 4 | 5 | /* 6 | Matrix types 7 | */ 8 | 9 | 10 | namespace caffeine { 11 | namespace math { 12 | 13 | 14 | class matrix33 15 | { 16 | float data[9]; 17 | }; 18 | 19 | class matrix44 20 | { 21 | float data[16]; 22 | }; 23 | 24 | 25 | } // namespace 26 | } // namespace 27 | 28 | 29 | #endif // include guard -------------------------------------------------------------------------------- /external/math/quaternion/quaternion_types.hpp: -------------------------------------------------------------------------------- 1 | #ifndef QUATERNION_TYPES_INCLUDED_14E724D5_7132_4778_9DAE_0215B606AF3C 2 | #define QUATERNION_TYPES_INCLUDED_14E724D5_7132_4778_9DAE_0215B606AF3C 3 | 4 | 5 | /* 6 | Quaternion type 7 | */ 8 | 9 | 10 | namespace caffeine { 11 | namespace math { 12 | 13 | 14 | class quaternion 15 | { 16 | float data[4]; // x, y, z, w; 17 | }; 18 | 19 | 20 | } // namespace 21 | } // namespace 22 | 23 | 24 | namespace caffmath = ::caffeine::math; 25 | 26 | 27 | 28 | #endif // include guard -------------------------------------------------------------------------------- /external/math/transform/transform.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TRANSFORM_INCLUDED_E79342EA_D69A_4FEB_BEAD_BA21D7B8B8E6 2 | #define TRANSFORM_INCLUDED_E79342EA_D69A_4FEB_BEAD_BA21D7B8B8E6 3 | 4 | 5 | /* 6 | Transform 7 | -- 8 | Transform is a position and rotation in 3D space. 9 | */ 10 | 11 | 12 | #include "../transform/transform_types.hpp" 13 | #include "../quaternion/quaternion.hpp" 14 | #include "../vector/vector3.hpp" 15 | #include "../matrix/matrix44.hpp" 16 | 17 | 18 | namespace caffeine { 19 | namespace math { 20 | 21 | 22 | // ** Interface ** // 23 | 24 | inline transform transform_init(const vector3 position, const vector3 scale, const quaternion &rotation); 25 | inline matrix44 transform_get_world_matrix(const transform &transform); 26 | inline void transform_set_with_world_matrix(transform &transform, const matrix44 &matrix); 27 | inline transform transform_inherited(const transform &parent, const transform &child); 28 | 29 | 30 | // ** Impl ** // 31 | 32 | 33 | transform 34 | transform_init(const vector3 position, const vector3 scale, const quaternion &rotation) 35 | { 36 | transform return_transform; 37 | return_transform.position = position; 38 | return_transform.scale = scale; 39 | return_transform.rotation = rotation; 40 | 41 | return return_transform; 42 | } 43 | 44 | 45 | transform 46 | transform_inherited(const transform &parent, const transform &child) 47 | { 48 | transform inherited; 49 | 50 | inherited.scale = caffmath::vector3_multiply(parent.scale, child.scale); 51 | inherited.position = caffmath::vector3_subtract(parent.position, child.position); 52 | 53 | // TODO: Rotation. 54 | 55 | return inherited; 56 | } 57 | 58 | 59 | } // namespace 60 | } // namespace 61 | 62 | 63 | #endif // include guard -------------------------------------------------------------------------------- /external/math/transform/transform_types.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TRANSFORM_TYPES_INCLUDED_8D47B2F6_5764_483F_98BA_CE06AEEFB50C 2 | #define TRANSFORM_TYPES_INCLUDED_8D47B2F6_5764_483F_98BA_CE06AEEFB50C 3 | 4 | 5 | #include "../quaternion/quaternion.hpp" 6 | #include "../vector/vector3.hpp" 7 | 8 | 9 | namespace caffeine { 10 | namespace math { 11 | 12 | 13 | struct transform 14 | { 15 | transform() {} 16 | 17 | quaternion rotation = quaternion_init(0.f,0.f,0.f,1.f); 18 | vector3 scale = vector3_init(1.f,1.f,1.f); 19 | vector3 position = vector3_init(0.f,0.f,0.f); 20 | }; // class 21 | 22 | 23 | } // namespace 24 | } // namespace 25 | 26 | 27 | #endif // include guard -------------------------------------------------------------------------------- /external/math/vector/vector.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VECTOR_INCLUDED_61D06A64_BC38_456C_B5B7_E6E787FD9D2D 2 | #define VECTOR_INCLUDED_61D06A64_BC38_456C_B5B7_E6E787FD9D2D 3 | 4 | 5 | /* 6 | Lazy include for vector functionality. 7 | */ 8 | 9 | 10 | #include "vector_types.hpp" 11 | #include "vector2.hpp" 12 | #include "vector3.hpp" 13 | #include "vector4.hpp" 14 | 15 | 16 | #endif // include guard -------------------------------------------------------------------------------- /external/math/vector/vector_types.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VECTOR_TYPES_INCLUDED_76A0D96A_8385_4283_9EA9_CF89D0D5A10C 2 | #define VECTOR_TYPES_INCLUDED_76A0D96A_8385_4283_9EA9_CF89D0D5A10C 3 | 4 | 5 | /* 6 | Vector Types. 7 | These are the vector types in caffeine math. 8 | */ 9 | 10 | 11 | namespace caffeine { 12 | namespace math { 13 | 14 | 15 | // To access the components you should go through the vector interface. 16 | 17 | class vector4 18 | { 19 | float data[4]; 20 | }; 21 | 22 | class vector3 23 | { 24 | float data[3]; 25 | }; 26 | 27 | class vector2 28 | { 29 | float data[2]; 30 | }; 31 | 32 | 33 | } // namespace 34 | } // namespace 35 | 36 | 37 | // aliases 38 | namespace caffmath = ::caffeine::math; 39 | namespace caff_math = ::caffeine::math; 40 | 41 | 42 | #endif // include guard -------------------------------------------------------------------------------- /external/math/version.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_INCLUDED_541DE9C6_B2EB_4353_9593_54E6C65CB965 2 | #define VERSION_INCLUDED_541DE9C6_B2EB_4353_9593_54E6C65CB965 3 | 4 | 5 | #define CAFF_MATH_BUILD_DATE 1434796882 6 | 7 | 8 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/input.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDL_INPUT_INCLUDED_A92B3254_3BD2_4EE7_AAF7_65555A4B6672 2 | #define SDL_INPUT_INCLUDED_A92B3254_3BD2_4EE7_AAF7_65555A4B6672 3 | 4 | 5 | #include "sdl_common.hpp" 6 | #include "sdl_fwd.hpp" 7 | #include "window.hpp" 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | namespace sdl { 14 | 15 | class input final 16 | { 17 | public: 18 | 19 | explicit input(); 20 | ~input(); 21 | 22 | void think(); 23 | 24 | inline int32_t get_mouse_delta_x() const { return m_mouse_delta_x; } 25 | inline int32_t get_mouse_delta_y() const { return m_mouse_delta_y; } 26 | int32_t get_mouse_x() const; 27 | int32_t get_mouse_y() const; 28 | 29 | bool set_mouse_hold(const bool set); 30 | bool is_mouse_held() const; 31 | 32 | // bool set_text_stream(const bool set); 33 | // bool is_text_stream_enabled() const; 34 | 35 | bool is_key_down(uint32_t key_id); 36 | bool is_key_down_on_frame(uint32_t key_id); 37 | 38 | private: 39 | 40 | bool _process_message(const SDL_Event &event); 41 | 42 | private: 43 | 44 | int32_t m_mouse_delta_x = 0; 45 | int32_t m_mouse_delta_y = 0; 46 | 47 | enum class key_state {UP, DOWN,}; 48 | std::map m_key_states; 49 | std::map m_frame_key_states; 50 | 51 | std::function m_message_callback = std::bind(&input::_process_message, this, std::placeholders::_1); 52 | 53 | 54 | }; // class 55 | 56 | 57 | } // namespace 58 | 59 | 60 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/message_pump.cpp: -------------------------------------------------------------------------------- 1 | #include "message_pump.hpp" 2 | #include 3 | #include 4 | #include 5 | 6 | 7 | namespace 8 | { 9 | std::mutex lock; 10 | std::vector> callbacks; 11 | } 12 | 13 | 14 | 15 | namespace sdl { 16 | 17 | 18 | void 19 | message_callback_register(std::function callback) 20 | { 21 | std::lock_guard locker(lock); 22 | 23 | callbacks.emplace_back(callback); 24 | } 25 | 26 | 27 | void 28 | message_callback_unregister(std::function &callback) 29 | { 30 | std::lock_guard locker(lock); 31 | 32 | for(auto it = callbacks.begin(); it != callbacks.end(); ++it) 33 | { 34 | if(it->target() == callback.target()) 35 | { 36 | callbacks.erase(it); 37 | return; 38 | } 39 | } 40 | } 41 | 42 | 43 | void 44 | message_pump() 45 | { 46 | std::lock_guard locker(lock); 47 | 48 | SDL_Event sdl_event; 49 | 50 | while (SDL_PollEvent(&sdl_event)) 51 | { 52 | for(auto &cb : callbacks) 53 | { 54 | // If the event was swallowed then stop any more parsing of this event. 55 | if(cb(sdl_event)) 56 | { 57 | break; 58 | } 59 | } 60 | } 61 | } 62 | 63 | 64 | } // namespace -------------------------------------------------------------------------------- /external/sdl_wrapper/message_pump.hpp: -------------------------------------------------------------------------------- 1 | #ifndef MESSAGE_PUMP_INCLUDED_977F16E3_A92A_4BEF_AD8E_36A3FF74AF2A 2 | #define MESSAGE_PUMP_INCLUDED_977F16E3_A92A_4BEF_AD8E_36A3FF74AF2A 3 | 4 | 5 | #include "sdl_common.hpp" 6 | #include 7 | 8 | 9 | namespace sdl { 10 | 11 | 12 | void message_callback_register(std::function); 13 | void message_callback_unregister(std::function &callback); 14 | void message_pump(); 15 | 16 | 17 | } // namespace 18 | 19 | 20 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/mixer.hpp: -------------------------------------------------------------------------------- 1 | //#ifndef SDL_MIXER_INCLUDED_F0E6D002_0008_439E_8989_F59789BD232F 2 | //#define SDL_MIXER_INCLUDED_F0E6D002_0008_439E_8989_F59789BD232F 3 | // 4 | // 5 | //#include "sdl_common.hpp" 6 | ////#include 7 | //#include 8 | //#include 9 | //#include 10 | // 11 | // 12 | //namespace sdl { 13 | // 14 | // 15 | ///* 16 | // Wrap around for sdl_mixer. 17 | // -- 18 | // There is only supposed to be one active instances of this class. Having two instances is 19 | // 'undefined' as when an instances goes out of scope it will call SDL Mixer's quit function. 20 | // 21 | // Although this is move friendly. 22 | // 23 | // Issue. 24 | // Needs better support for playing the same file multiple times. 25 | //*/ 26 | //class mixer 27 | //{ 28 | // 29 | // mixer(const mixer &) = delete; 30 | // mixer operator=(const mixer &) = delete; 31 | // 32 | //public: 33 | // 34 | // explicit mixer(); 35 | // ~mixer(); 36 | // 37 | // mixer(mixer &&other); 38 | // mixer& operator=(mixer &&other); 39 | // 40 | // // ** Samples ** // 41 | // uint32_t sample_add(const std::string &filename); 42 | // bool sample_remove(const uint32_t id); 43 | // bool sample_play(const uint32_t id, const int32_t number_of_loops = 0); 44 | // bool sample_is_playing(const uint32_t id) const; 45 | // void sample_set_volume(const uint32_t id, const float vol); 46 | // float sample_get_volume(const uint32_t id) const; 47 | // void sample_set_position(const uint32_t id, const std::array &position); 48 | // 49 | // // ** Music ** // 50 | // uint32_t music_add(const std::string &filename); 51 | // bool music_remove(const uint32_t id); 52 | // bool music_play(const uint32_t id, const int32_t number_of_loops = -1); 53 | // bool music_is_playing() const; 54 | // void music_set_volume(const float vol); 55 | // float music_get_volume() const; 56 | // void music_set_balance(const uint32_t id, const float bal); 57 | // float music_get_balance(const uint32_t id); 58 | // 59 | // // ** Everything else ** // 60 | // void set_virtual_ear_look_at(const std::array &position, 61 | // const std::array &direction, 62 | // const std::array &up); 63 | // void update_3d_positions(); 64 | // void reset(); 65 | // void clear_samples(); 66 | // void clear_music(); 67 | // bool is_valid() const; 68 | // 69 | //private: 70 | // 71 | // struct audio_sample 72 | // { 73 | // Mix_Chunk *chunk = nullptr; 74 | // uint32_t channel = 0; 75 | // float x = 0.f; 76 | // float y = 0.f; 77 | // float z = 0.f; 78 | // }; 79 | // 80 | // struct audio_music 81 | // { 82 | // Mix_Music *chunk = nullptr; 83 | // }; 84 | // 85 | // std::vector m_samples; 86 | // std::vector m_music; 87 | // mutable std::mutex m_lock; 88 | // std::array m_position = {{0.f, 0.f, 0.f}}; 89 | // std::array m_direction = {{0.f, 0.f, 1.f}}; 90 | // std::array m_up = {{0.f, 1.f, 0.f}}; 91 | // bool m_dirty_pos = false; 92 | // 93 | //}; // class 94 | // 95 | // 96 | //} // namespace 97 | // 98 | // 99 | //#endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/ogl_context.cpp: -------------------------------------------------------------------------------- 1 | #include "ogl_context.hpp" 2 | #include "window.hpp" 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | namespace sdl { 9 | 10 | 11 | ogl_context::ogl_context(const sdl::window &window) 12 | { 13 | assert(window.has_valid_context()); 14 | 15 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); 16 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); 17 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); 18 | SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5); 19 | SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5); 20 | SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); 21 | SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); 22 | SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); 23 | SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); 24 | SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0); 25 | SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 8); 26 | 27 | m_sdl_gl_context = SDL_GL_CreateContext(window.get_sdl_window()); 28 | //SDL_ERROR("Renderer::Renderer() - SDL_GL_CreateContext"); 29 | assert(m_sdl_gl_context); 30 | 31 | SDL_GL_MakeCurrent(window.get_sdl_window(), m_sdl_gl_context); 32 | //SDL_ERROR("Renderer::Renderer() - SDL_GL_MakeCurrent"); 33 | 34 | } 35 | 36 | 37 | void 38 | ogl_context::_destroy() 39 | { 40 | if(m_sdl_gl_context) 41 | { 42 | SDL_GL_DeleteContext(m_sdl_gl_context); 43 | } 44 | } 45 | 46 | 47 | ogl_context::~ogl_context() 48 | { 49 | _destroy(); 50 | } 51 | 52 | 53 | void 54 | ogl_context::_move(ogl_context &other_one) 55 | { 56 | _destroy(); 57 | 58 | ogl_context &this_one = *this; 59 | 60 | this_one.m_sdl_gl_context = other_one.m_sdl_gl_context; 61 | } 62 | 63 | 64 | ogl_context::ogl_context(ogl_context&& other) 65 | { 66 | _move(other); 67 | } 68 | 69 | 70 | ogl_context& 71 | ogl_context::operator=(ogl_context&& other) 72 | { 73 | _move(other); 74 | return *this; 75 | } 76 | 77 | 78 | } // namespace -------------------------------------------------------------------------------- /external/sdl_wrapper/ogl_context.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDL_OGL_CONTEXT_INCLUDED_1205DA41_7BC8_41AD_B776_01BD838772A4 2 | #define SDL_OGL_CONTEXT_INCLUDED_1205DA41_7BC8_41AD_B776_01BD838772A4 3 | 4 | 5 | #include "sdl_common.hpp" 6 | #include "sdl_fwd.hpp" 7 | 8 | 9 | namespace sdl { 10 | 11 | 12 | class ogl_context 13 | { 14 | 15 | 16 | ogl_context(const ogl_context &) = delete; 17 | ogl_context operator=(const ogl_context &) = delete; 18 | 19 | public: 20 | 21 | explicit ogl_context(const sdl::window &window); 22 | ~ogl_context(); 23 | 24 | ogl_context(ogl_context&& other); 25 | ogl_context& operator=(ogl_context&& other); 26 | 27 | inline bool has_valid_context() const { return m_sdl_gl_context != nullptr; } 28 | 29 | void think() {} // constant accross the other modules. 30 | 31 | private: 32 | 33 | void _destroy(); 34 | void _move(ogl_context &other_one); 35 | 36 | private: 37 | 38 | SDL_GLContext m_sdl_gl_context; 39 | 40 | }; // class 41 | 42 | 43 | } // namespace 44 | 45 | 46 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/sdl_common.cpp: -------------------------------------------------------------------------------- 1 | #include "sdl_common.hpp" 2 | 3 | 4 | namespace 5 | { 6 | std::function error_callback; 7 | std::string last_error = ""; 8 | } 9 | 10 | 11 | namespace sdl { 12 | 13 | 14 | void 15 | log_error(const std::string &error) 16 | { 17 | last_error = error; 18 | } 19 | 20 | 21 | void 22 | log_debug_error_check(const std::string &msg) 23 | { 24 | 25 | } 26 | 27 | 28 | std::string 29 | get_last_error() 30 | { 31 | return last_error; 32 | } 33 | 34 | 35 | void 36 | set_error_callback(std::function set_error_callback) 37 | { 38 | error_callback = set_error_callback; 39 | } 40 | 41 | 42 | void 43 | clear_error_callback() 44 | { 45 | // TODO: How 46 | } 47 | 48 | 49 | } // namespace -------------------------------------------------------------------------------- /external/sdl_wrapper/sdl_common.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDL_COMMON_INCLUDED_3DA33932_47CB_4400_A549_64B8C18B64D7 2 | #define SDL_COMMON_INCLUDED_3DA33932_47CB_4400_A549_64B8C18B64D7 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | namespace sdl { 11 | 12 | 13 | void log_error(const std::string &error); 14 | void log_debug_error_check(const std::string &msg = ""); 15 | std::string get_last_error(); 16 | 17 | void set_error_callback(std::function); 18 | void clear_error_callback(); 19 | 20 | 21 | } // namespace 22 | 23 | 24 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/sdl_fwd.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDL_FWD_INCLUDED_8230A5D1_B9FC_4F3F_9C94_A56D71871DB9 2 | #define SDL_FWD_INCLUDED_8230A5D1_B9FC_4F3F_9C94_A56D71871DB9 3 | 4 | 5 | namespace sdl { 6 | 7 | 8 | class window; 9 | class input; 10 | class ogl_context; 11 | class mixer; 12 | 13 | 14 | } // namespace 15 | 16 | 17 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/sdl_lazy_include.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDL_LAZY_INCLUDE_INCLUDED_EAD38942_D528_42F3_BE26_9D635FB96E9A 2 | #define SDL_LAZY_INCLUDE_INCLUDED_EAD38942_D528_42F3_BE26_9D635FB96E9A 3 | 4 | #include "window.hpp" 5 | #include "input.hpp" 6 | #include "ogl_context.hpp" 7 | #include "mixer.hpp" 8 | #include "message_pump.hpp" 9 | #include "sdl_common.hpp" 10 | #include "sdl_fwd.hpp" 11 | 12 | #endif // include guard -------------------------------------------------------------------------------- /external/sdl_wrapper/window.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SDL_WINDOW_INCLUDED_09D60A47_F1DA_4146_8F2B_5EF5C099CD60 2 | #define SDL_WINDOW_INCLUDED_09D60A47_F1DA_4146_8F2B_5EF5C099CD60 3 | 4 | 5 | #include "sdl_common.hpp" 6 | #include "sdl_fwd.hpp" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | 15 | namespace sdl { 16 | 17 | 18 | class window final 19 | { 20 | 21 | window(const window &) = delete; 22 | window operator=(const window &) = delete; 23 | 24 | public: 25 | 26 | 27 | explicit window(const uint32_t width = 640, 28 | const uint32_t height = 480, 29 | const bool is_fullscreen = false, 30 | const std::string& title = "App"); 31 | 32 | ~window(); 33 | 34 | window(window&& other); 35 | window& operator=(window&& other); 36 | 37 | bool set_resolution(const uint32_t width, const uint32_t height); 38 | uint32_t get_width() const; 39 | uint32_t get_height() const; 40 | 41 | bool set_fullscreen(const bool set); 42 | bool is_fullscreen() const; 43 | 44 | bool set_title(const std::string &str); 45 | std::string get_title() const; 46 | 47 | void think() {} // constant accross the other modules. 48 | void flip_buffer(); 49 | 50 | inline bool wants_to_quit() const { return m_quit_requested; } 51 | inline SDL_Window* get_sdl_window() const { return m_sdl_window; } 52 | inline bool has_valid_context() const { return m_sdl_window != nullptr; } 53 | 54 | private: 55 | 56 | bool _process_message(const SDL_Event &event); 57 | void _move(window &this_one, window &other_one); 58 | 59 | private: 60 | 61 | SDL_Window *m_sdl_window = nullptr; 62 | bool m_quit_requested = false; 63 | std::function m_message_callback = std::bind(&window::_process_message, this, std::placeholders::_1); 64 | mutable std::mutex m_lock; 65 | 66 | }; // class 67 | 68 | 69 | } // namespace 70 | 71 | 72 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/common.cpp: -------------------------------------------------------------------------------- 1 | #include "common.hpp" 2 | #include 3 | 4 | 5 | namespace 6 | { 7 | std::function log_callback; 8 | std::string last_error_message; 9 | } 10 | 11 | 12 | namespace renderer { 13 | 14 | 15 | 16 | void 17 | check_and_log_error(const std::string &str) 18 | { 19 | #ifdef SIMPLE_RENDERER_LOG_ERROR 20 | 21 | GLenum gl_error_code = glGetError(); 22 | 23 | if(gl_error_code != GL_NO_ERROR) 24 | { 25 | log_error(gl_error_code, str); 26 | } 27 | 28 | #endif 29 | } 30 | 31 | 32 | void 33 | log_error(const int32_t error_code, const std::string &str) 34 | { 35 | last_error_message = std::to_string(error_code) + " : " + str; 36 | 37 | if(log_callback) 38 | { 39 | log_callback(error_code, str); 40 | } 41 | } 42 | 43 | 44 | void 45 | set_log_callback(std::function set_log_callback) 46 | { 47 | log_callback = set_log_callback; 48 | } 49 | 50 | 51 | std::string 52 | get_last_error() 53 | { 54 | return "foop"; 55 | } 56 | 57 | 58 | } // namespace -------------------------------------------------------------------------------- /external/simple_renderer/common.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_INCLUDED_BFD4FCA8_212A_42D3_AF8F_0A55C08947D8 2 | #define COMMON_INCLUDED_BFD4FCA8_212A_42D3_AF8F_0A55C08947D8 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | // Comment this line out if you wish to disable error checking. 12 | #define SIMPLE_RENDERER_LOG_ERROR 13 | 14 | 15 | namespace renderer { 16 | 17 | // If you wish to pipe out error messages to your own system you can use this callback. 18 | // If the error is directly against GL then the error_code will corrispond to that. 19 | // If an error outside of GL happens then error_code will be GL_NO_ERROR. 20 | void set_log_callback(std::function log_callback); 21 | 22 | void log_error(const int32_t error_code, const std::string &str); 23 | void check_and_log_error(const std::string &str); 24 | std::string get_last_error(); 25 | 26 | 27 | } // namespace 28 | 29 | 30 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/draw_call.cpp: -------------------------------------------------------------------------------- 1 | #include "draw_call.hpp" 2 | #include "vertex_format.hpp" 3 | #include "vertex_buffer.hpp" 4 | #include "index_buffer.hpp" 5 | #include "frame_buffer.hpp" 6 | #include "shader.hpp" 7 | 8 | #include 9 | namespace renderer { 10 | 11 | 12 | void draw(shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer) 13 | { 14 | glBindFramebuffer(GL_FRAMEBUFFER, 0); 15 | 16 | set_shader.bind(); 17 | set_vertex_buffer.bind(set_vert_fmt, set_shader); 18 | 19 | const uint32_t number_of_vertices = set_vertex_buffer.get_number_entries() / set_vert_fmt.get_number_of_entires(); 20 | 21 | glDrawArrays(GL_TRIANGLES, 0, number_of_vertices); 22 | } 23 | 24 | 25 | void draw(frame_buffer &set_frame_buffer, shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer) 26 | { 27 | set_frame_buffer.bind(); 28 | set_shader.bind(); 29 | set_vertex_buffer.bind(set_vert_fmt, set_shader); 30 | 31 | const uint32_t number_of_vertices = set_vertex_buffer.get_number_entries() / set_vert_fmt.get_number_of_entires(); 32 | 33 | glDrawArrays(GL_TRIANGLES, 0, number_of_vertices); 34 | 35 | set_frame_buffer.unbind(); 36 | } 37 | 38 | 39 | void draw(shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer, const uint32_t start, const uint32_t size) 40 | { 41 | set_shader.bind(); 42 | set_vertex_buffer.bind(set_vert_fmt, set_shader); 43 | 44 | //const uint32_t number_of_vertices = set_vertex_buffer.get_number_entries() / set_vert_fmt.get_number_of_elements(); 45 | //const uint32_t number_of_primitives = number_of_vertices / 3; 46 | 47 | glDrawArrays(GL_TRIANGLES, start, size); 48 | } 49 | 50 | 51 | void draw(shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer, index_buffer &set_index_buffer) 52 | { 53 | set_shader.bind(); 54 | set_vertex_buffer.bind(set_vert_fmt, set_shader); 55 | set_index_buffer.bind(); 56 | 57 | glDrawElements(GL_TRIANGLES, set_index_buffer.get_number_of_indices(), GL_UNSIGNED_INT, 0); 58 | } 59 | 60 | 61 | } // namespace -------------------------------------------------------------------------------- /external/simple_renderer/draw_call.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_CALL_INCLUDED_3592DEB3_2FAC_4538_977A_8E6D7BD736A8 2 | #define DRAW_CALL_INCLUDED_3592DEB3_2FAC_4538_977A_8E6D7BD736A8 3 | 4 | 5 | #include "renderer_fwd.hpp" 6 | #include 7 | 8 | /* 9 | These are draw helpers. 10 | They are only simple methods that bind the various objects etc. 11 | */ 12 | namespace renderer { 13 | 14 | 15 | void draw(shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer); 16 | void draw(frame_buffer &set_frame_buffer, shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer); 17 | void draw(shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer, const uint32_t start, const uint32_t size); 18 | void draw(shader &set_shader, vertex_format &set_vert_fmt, vertex_buffer &set_vertex_buffer, index_buffer &set_index_buffer); 19 | 20 | 21 | } // namespace 22 | 23 | 24 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/frame_buffer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FRAME_BUFFER_INCLUDED_08DDDDEB_BA61_44F5_9DD0_8932689F7174 2 | #define FRAME_BUFFER_INCLUDED_08DDDDEB_BA61_44F5_9DD0_8932689F7174 3 | 4 | 5 | #include "common.hpp" 6 | 7 | 8 | namespace renderer { 9 | 10 | 11 | class frame_buffer 12 | { 13 | 14 | frame_buffer(const frame_buffer &) = delete; 15 | frame_buffer operator=(const frame_buffer &) = delete; 16 | 17 | public: 18 | 19 | explicit frame_buffer() {} 20 | explicit frame_buffer(const uint32_t width, const uint32_t height); 21 | ~frame_buffer(); 22 | 23 | frame_buffer(frame_buffer&& other); 24 | frame_buffer& operator=(frame_buffer&& other); 25 | 26 | bool load_buffer(const uint32_t width, const uint32_t height); 27 | void bind(); 28 | void unbind(); 29 | void clear(const bool color = true, const bool depth = true); 30 | 31 | inline bool is_valid() const { return m_frame_buffer != 0; } 32 | inline GLuint get_gl_id() const { return m_frame_buffer; } 33 | inline uint32_t get_width() const { return m_width; } 34 | inline uint32_t get_height() const { return m_height; } 35 | 36 | private: 37 | 38 | void _move(frame_buffer &this_one, frame_buffer &other_one); 39 | void _destroy(); 40 | 41 | private: 42 | 43 | uint32_t m_width = 0; 44 | uint32_t m_height = 0; 45 | GLsizei m_view_port_width = 0; 46 | GLsizei m_view_port_height = 0; 47 | GLuint m_frame_buffer = 0; 48 | GLuint m_color_buffer = 0; 49 | GLuint m_render_buffer = 0; 50 | 51 | }; 52 | 53 | 54 | } // namespace 55 | 56 | 57 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/index_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "index_buffer.hpp" 2 | 3 | 4 | namespace renderer { 5 | 6 | 7 | index_buffer::index_buffer() 8 | { 9 | 10 | } 11 | 12 | 13 | index_buffer::index_buffer(const std::vector &index) 14 | { 15 | load_index_buffer(index); 16 | } 17 | 18 | 19 | void 20 | index_buffer::_destroy() 21 | { 22 | if(is_valid()) 23 | { 24 | glDeleteBuffers(1, &m_index_buffer); 25 | } 26 | } 27 | 28 | 29 | index_buffer::~index_buffer() 30 | { 31 | _destroy(); 32 | } 33 | 34 | 35 | void 36 | index_buffer::_move(index_buffer &other_one) 37 | { 38 | _destroy(); 39 | 40 | index_buffer &this_one = *this; 41 | this_one.m_index_buffer = other_one.m_index_buffer; 42 | this_one.m_number_of_indices = other_one.m_number_of_indices; 43 | 44 | other_one.m_index_buffer = 0; 45 | other_one.m_number_of_indices = 0; 46 | } 47 | 48 | 49 | index_buffer::index_buffer(index_buffer&& other) 50 | { 51 | _move(other); 52 | } 53 | 54 | 55 | index_buffer& 56 | index_buffer::operator=(index_buffer&& other) 57 | { 58 | _move(other); 59 | return *this; 60 | } 61 | 62 | 63 | bool 64 | index_buffer::load_index_buffer(const std::vector &index) 65 | { 66 | if(m_index_buffer) 67 | { 68 | _destroy(); 69 | } 70 | 71 | m_number_of_indices = static_cast(index.size()); 72 | 73 | glGenBuffers(1, &m_index_buffer); 74 | glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer); 75 | glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(index), &index[0], GL_STATIC_DRAW); 76 | glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); 77 | check_and_log_error("index_buffer::load_index_buffer - loading buffer."); 78 | 79 | return (is_valid() ? true : false); 80 | } 81 | 82 | 83 | void 84 | index_buffer::bind() 85 | { 86 | if(is_valid()) 87 | { 88 | glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_index_buffer); 89 | check_and_log_error("index_buffer::bind - failed binding buffer"); 90 | } 91 | } 92 | 93 | 94 | } -------------------------------------------------------------------------------- /external/simple_renderer/index_buffer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INDEX_BUFFER_INCLUDED_1E4A158B_1FEC_4954_B768_3BC77C61DB07 2 | #define INDEX_BUFFER_INCLUDED_1E4A158B_1FEC_4954_B768_3BC77C61DB07 3 | 4 | 5 | #include "common.hpp" 6 | #include 7 | #include 8 | 9 | 10 | namespace renderer { 11 | 12 | 13 | class index_buffer 14 | { 15 | 16 | index_buffer(const index_buffer &) = delete; 17 | index_buffer operator=(const index_buffer &) = delete; 18 | 19 | public: 20 | 21 | explicit index_buffer(); 22 | explicit index_buffer(const std::vector &index); 23 | ~index_buffer(); 24 | 25 | index_buffer(index_buffer&& other); 26 | index_buffer& operator=(index_buffer&& other); 27 | 28 | 29 | bool load_index_buffer(const std::vector &index); 30 | void bind(); 31 | 32 | inline bool is_valid() const { return m_index_buffer != 0; } 33 | inline uint32_t get_number_of_indices() const { return m_number_of_indices; } 34 | 35 | private: 36 | 37 | void _move(index_buffer &other); 38 | void _destroy(); 39 | 40 | private: 41 | 42 | GLuint m_index_buffer = 0; 43 | uint32_t m_number_of_indices = 0; 44 | 45 | 46 | }; // include guard 47 | 48 | 49 | } // include guard 50 | 51 | 52 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/lazy_include.hpp: -------------------------------------------------------------------------------- 1 | #ifndef LAZY_INCLUDE_5C516E1F_BED7_48C3_8439_3A288E7729DF 2 | #define LAZY_INCLUDE_5C516E1F_BED7_48C3_8439_3A288E7729DF 3 | 4 | 5 | #include "common.hpp" 6 | #include "draw_call.hpp" 7 | #include "frame_buffer.hpp" 8 | #include "index_buffer.hpp" 9 | #include "rasterizer.hpp" 10 | #include "renderer.hpp" 11 | #include "shader.hpp" 12 | #include "texture.hpp" 13 | #include "vertex_buffer.hpp" 14 | #include "vertex_format.hpp" 15 | 16 | 17 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/rasterizer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/external/simple_renderer/rasterizer.cpp -------------------------------------------------------------------------------- /external/simple_renderer/rasterizer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RASTERIZER_INCLUDED_CAA942C4_4CF5_486F_8AD9_E87B3A9172BB 2 | #define RASTERIZER_INCLUDED_CAA942C4_4CF5_486F_8AD9_E87B3A9172BB 3 | 4 | 5 | namespace renderer { 6 | 7 | 8 | 9 | 10 | 11 | } // include guard 12 | 13 | 14 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/renderer.cpp: -------------------------------------------------------------------------------- 1 | #include "renderer.hpp" 2 | #include "common.hpp" 3 | 4 | 5 | namespace 6 | { 7 | GLuint vao_id = 0; 8 | } 9 | 10 | 11 | namespace renderer { 12 | 13 | 14 | void 15 | initialize() 16 | { 17 | if(!vao_id) 18 | { 19 | glGenVertexArrays(1, &vao_id); 20 | glBindVertexArray(vao_id); 21 | 22 | reset(); 23 | } 24 | } 25 | 26 | 27 | void 28 | de_initialize() 29 | { 30 | if(vao_id) 31 | { 32 | glDeleteVertexArrays(1, &vao_id); 33 | } 34 | } 35 | 36 | 37 | void 38 | reset() 39 | { 40 | glEnable(GL_DEPTH_TEST); 41 | glDisable(GL_STENCIL_TEST); 42 | } 43 | 44 | 45 | void 46 | depth(const bool set) 47 | { 48 | if(set) 49 | { 50 | glEnable(GL_DEPTH_TEST); 51 | } 52 | else 53 | { 54 | glDisable(GL_DEPTH_TEST); 55 | } 56 | } 57 | 58 | 59 | void 60 | clear(const bool color, const bool depth) 61 | { 62 | GLbitfield flags = 0; 63 | flags |= color ? GL_COLOR_BUFFER_BIT : 0; 64 | flags |= depth ? GL_DEPTH_BUFFER_BIT : 0; 65 | 66 | glClear(flags); 67 | } 68 | 69 | 70 | void 71 | clear_color(const float red, const float green, const float blue) 72 | { 73 | glClearColor(red, green, blue, 1.f); 74 | } 75 | 76 | 77 | } // namespace -------------------------------------------------------------------------------- /external/simple_renderer/renderer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RENDERER_INCLUDED_7F2E7FF0_5B7F_47AE_8293_BCA5D46ED911 2 | #define RENDERER_INCLUDED_7F2E7FF0_5B7F_47AE_8293_BCA5D46ED911 3 | 4 | 5 | namespace renderer { 6 | 7 | 8 | void initialize(); 9 | void de_initialize(); 10 | void reset(); 11 | void depth(const bool set); 12 | void clear(const bool color = true, const bool depth = true); 13 | void clear_color(const float red = 0, const float green = 0, const float blue = 0); 14 | 15 | 16 | } // include guard 17 | 18 | 19 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/renderer_fwd.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RENDERER_FWD_INCLUDED_14756E6A_6A2D_4160_9EE2_AF6501CDC8B7 2 | #define RENDERER_FWD_INCLUDED_14756E6A_6A2D_4160_9EE2_AF6501CDC8B7 3 | 4 | 5 | namespace renderer { 6 | 7 | 8 | class draw_call; 9 | class frame_buffer; 10 | class index_buffer; 11 | class rasterizer; 12 | class shader; 13 | class texture; 14 | class vertex_buffer; 15 | class vertex_format; 16 | 17 | 18 | } // namespace 19 | 20 | 21 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/texture.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TEXTURE_INCLUDED_2C5BD8B8_1F7A_4A72_A8AC_6036FE8777EE 2 | #define TEXTURE_INCLUDED_2C5BD8B8_1F7A_4A72_A8AC_6036FE8777EE 3 | 4 | 5 | #include "common.hpp" 6 | #include 7 | 8 | 9 | namespace renderer { 10 | 11 | 12 | namespace texture_utils 13 | { 14 | 15 | uint32_t get_max_1d_texture_size(); 16 | uint32_t get_max_2d_texture_size(); 17 | uint32_t get_max_3d_texture_size(); 18 | uint32_t get_max_texels(); 19 | 20 | } 21 | 22 | 23 | class texture 24 | { 25 | 26 | texture(const texture &) = delete; 27 | texture operator=(const texture &) = delete; 28 | 29 | public: 30 | 31 | explicit texture() {} 32 | explicit texture(void* image_data, const uint32_t width, const uint32_t height = 0, const uint32_t depth = 0); 33 | ~texture(); 34 | 35 | texture(texture&& other); 36 | texture& operator=(texture&& other); 37 | 38 | bool load_data(void* image_data, const uint32_t width, const uint32_t height = 0, const uint32_t depth = 0); 39 | bool update_data(void* image_data, const uint32_t width, const uint32_t offset_x); 40 | bool update_data(void* image_data, const uint32_t width, const uint32_t height, const uint32_t offset_x, const uint32_t offset_y); 41 | bool update_data(void* image_data, const uint32_t width, const uint32_t height, const uint32_t depth, const uint32_t offset_x, const uint32_t offset_y, const uint32_t offset_z); 42 | 43 | inline uint32_t get_width() const { return m_width; } 44 | inline uint32_t get_height() const { return m_height; } 45 | inline uint32_t get_depth() const { return m_depth; } 46 | inline bool is_valid() const { return m_texture_id != 0; } 47 | inline GLuint get_gl_id() const { return m_texture_id; } 48 | inline GLenum get_gl_dimention() const { return m_dimention; } 49 | 50 | private: 51 | 52 | void _move(texture &other_one); 53 | void _destroy(); 54 | 55 | private: 56 | 57 | uint32_t m_width = 0; 58 | uint32_t m_height = 0; 59 | uint32_t m_depth = 0; 60 | GLuint m_texture_id = 0; 61 | GLenum m_dimention = GL_TEXTURE_2D; 62 | 63 | 64 | }; // class 65 | 66 | 67 | } // namespace 68 | 69 | 70 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/version.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_INCLUDED_1A5573B8_2BA1_4752_96E6_A4A1613058B0 2 | #define VERSION_INCLUDED_1A5573B8_2BA1_4752_96E6_A4A1613058B0 3 | 4 | 5 | #define SIMPLE_RENDERER_BUILD_DATE 1435170284 6 | 7 | 8 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/vertex_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "vertex_buffer.hpp" 2 | #include "shader.hpp" 3 | #include "vertex_format.hpp" 4 | 5 | 6 | namespace renderer { 7 | 8 | 9 | vertex_buffer::vertex_buffer(const std::vector &vertex_data, const bool is_dynamic) 10 | { 11 | load_vertex_buffer(vertex_data, is_dynamic); 12 | } 13 | 14 | 15 | void 16 | vertex_buffer::_destroy() 17 | { 18 | if(m_vertex_buffer) 19 | { 20 | glDeleteBuffers(1, &m_vertex_buffer); 21 | m_vertex_buffer = 0; 22 | check_and_log_error("vertex_buffer::_destroy - destroying buffer."); 23 | } 24 | } 25 | 26 | 27 | vertex_buffer::~vertex_buffer() 28 | { 29 | _destroy(); 30 | } 31 | 32 | 33 | void 34 | vertex_buffer::_move(vertex_buffer &this_one, vertex_buffer &other_one) 35 | { 36 | _destroy(); 37 | 38 | this_one.m_vertex_buffer = other_one.m_vertex_buffer; 39 | this_one.m_buffer_size = other_one.m_buffer_size; 40 | this_one.m_number_entries = other_one.m_number_entries; 41 | 42 | other_one.m_vertex_buffer = 0; 43 | other_one.m_buffer_size = 0; 44 | other_one.m_number_entries = 0; 45 | } 46 | 47 | 48 | vertex_buffer::vertex_buffer(vertex_buffer&& other) 49 | { 50 | _move(*this, other); 51 | } 52 | 53 | 54 | vertex_buffer& 55 | vertex_buffer::operator=(vertex_buffer&& other) 56 | { 57 | _move(*this, other); 58 | 59 | return *this; 60 | } 61 | 62 | 63 | bool 64 | vertex_buffer::load_vertex_buffer(const std::vector &vertex_data, const bool is_dynamic) 65 | { 66 | if(is_valid()) 67 | { 68 | log_error(GL_NO_ERROR, "vertex_buffer::load_shader - a vertex_buffer already exists, destroying old one."); 69 | _destroy(); 70 | } 71 | 72 | glGenBuffers(1, &m_vertex_buffer); 73 | glBindBuffer(GL_ARRAY_BUFFER, m_vertex_buffer); 74 | glBufferData(GL_ARRAY_BUFFER, vertex_data.size() * sizeof(float), vertex_data.data(), is_dynamic ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW); 75 | glBindBuffer(GL_ARRAY_BUFFER, 0); 76 | 77 | if(is_valid()) 78 | { 79 | m_buffer_size = static_cast(vertex_data.size()); 80 | m_number_entries = vertex_data.size(); 81 | return true; 82 | } 83 | 84 | check_and_log_error("vertex_buffer::load_vertex_buffer - loading vertex buffer."); 85 | return false; 86 | } 87 | 88 | 89 | void 90 | vertex_buffer::bind(const vertex_format &set_vert_fmt, const shader &set_shader) const 91 | { 92 | if(!is_valid()) 93 | { 94 | log_error(GL_NO_ERROR, "vertex_buffer::bind - buffer is not valid."); 95 | return; 96 | } 97 | 98 | glBindBuffer(GL_ARRAY_BUFFER, m_vertex_buffer); 99 | check_and_log_error("vertex_buffer::bind - binding buffer."); 100 | 101 | // Vertex Format 102 | { 103 | for(std::size_t i = 0; i < set_vert_fmt.get_number_of_elements(); ++i) 104 | { 105 | const GLint NOT_USED = -1; 106 | 107 | attribute attrib = set_vert_fmt.get_attribute(i); 108 | 109 | GLint index = glGetAttribLocation(set_shader.get_program_gl_id(), attrib.name.c_str()); 110 | 111 | if(index != NOT_USED) 112 | { 113 | glEnableVertexAttribArray(index); 114 | glVertexAttribPointer(index, 115 | static_cast(attrib.size), 116 | attrib.type, 117 | GL_FALSE, 118 | set_vert_fmt.get_stride(), 119 | (void*)attrib.pointer); 120 | 121 | check_and_log_error("vertex_buffer::bind - applying vertex format '" + attrib.name + "'."); 122 | } 123 | } 124 | } 125 | 126 | check_and_log_error("vertex_buffer::bind - applying vertex buffer."); 127 | } 128 | 129 | 130 | } // namespace -------------------------------------------------------------------------------- /external/simple_renderer/vertex_buffer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VERTEX_BUFFER_INCLUDED_9A4FC9A6_E5FD_4C2F_B761_0A3CF0BFA9E0 2 | #define VERTEX_BUFFER_INCLUDED_9A4FC9A6_E5FD_4C2F_B761_0A3CF0BFA9E0 3 | 4 | 5 | #include "common.hpp" 6 | #include "renderer_fwd.hpp" 7 | #include 8 | #include 9 | 10 | 11 | namespace renderer { 12 | 13 | 14 | class vertex_buffer 15 | { 16 | 17 | vertex_buffer(const vertex_buffer &) = delete; 18 | vertex_buffer operator=(const vertex_buffer &) = delete; 19 | 20 | public: 21 | 22 | explicit vertex_buffer() {} 23 | explicit vertex_buffer(const std::vector &vertex_data, const bool is_dynamic = false); 24 | ~vertex_buffer(); 25 | 26 | vertex_buffer(vertex_buffer&& other); 27 | vertex_buffer& operator=(vertex_buffer&& other); 28 | 29 | bool load_vertex_buffer(const std::vector &vertex_data, const bool is_dynamic = false); 30 | void bind(const vertex_format &set_vert_fmt, const shader &set_shader) const; 31 | 32 | inline bool is_valid() const { return m_vertex_buffer != 0; } 33 | inline uint32_t get_number_entries() const { return m_number_entries; } 34 | 35 | private: 36 | 37 | void _move(vertex_buffer &this_one, vertex_buffer &other_one); 38 | void _destroy(); 39 | 40 | private: 41 | 42 | GLuint m_vertex_buffer = 0; 43 | GLuint m_buffer_size = 0; 44 | uint32_t m_number_entries = 0; 45 | 46 | }; // class 47 | 48 | 49 | } // namespace 50 | 51 | 52 | #endif // include guard -------------------------------------------------------------------------------- /external/simple_renderer/vertex_format.cpp: -------------------------------------------------------------------------------- 1 | #include "vertex_format.hpp" 2 | #include 3 | 4 | 5 | namespace 6 | { 7 | std::size_t number_of_elements(renderer::attr_type type) 8 | { 9 | switch(type) 10 | { 11 | case(renderer::attr_type::FLOAT): return 1; break; 12 | case(renderer::attr_type::FLOAT2): return 2; break; 13 | case(renderer::attr_type::FLOAT3): return 3; break; 14 | case(renderer::attr_type::FLOAT4): return 4; break; 15 | case(renderer::attr_type::INT): return 1; break; 16 | case(renderer::attr_type::UINT): return 1; break; 17 | } 18 | 19 | assert(false); // shouldn't have got here. 20 | return 0; // For waring message. 21 | } 22 | 23 | GLenum gl_type(renderer::attr_type type) 24 | { 25 | switch(type) 26 | { 27 | case(renderer::attr_type::FLOAT): return GL_FLOAT; break; 28 | case(renderer::attr_type::FLOAT2): return GL_FLOAT; break; 29 | case(renderer::attr_type::FLOAT3): return GL_FLOAT; break; 30 | case(renderer::attr_type::FLOAT4): return GL_FLOAT; break; 31 | case(renderer::attr_type::INT): return GL_INT; break; 32 | case(renderer::attr_type::UINT): return GL_UNSIGNED_INT; break; 33 | } 34 | 35 | assert(false); // shouldn't have got here. 36 | return 0; // For waring message. 37 | } 38 | 39 | uint32_t size_of_gl_type(GLenum type) 40 | { 41 | switch(type) 42 | { 43 | case(GL_FLOAT): return sizeof(GLfloat); break; 44 | case(GL_INT): return sizeof(GLint); break; 45 | case(GL_UNSIGNED_INT): return sizeof(GLuint); break; 46 | } 47 | 48 | assert(false); // shouldn't have got here. 49 | return 0; // For waring message. 50 | } 51 | } 52 | 53 | 54 | namespace renderer { 55 | 56 | 57 | vertex_format::vertex_format(const std::vector &desc) 58 | { 59 | load_format(desc); 60 | } 61 | 62 | 63 | bool vertex_format::load_format(const std::vector &desc) 64 | { 65 | if(is_valid()) 66 | { 67 | assert(false); 68 | return false; 69 | } 70 | 71 | for(const auto &attr : desc) 72 | { 73 | attribute attr_info; 74 | 75 | attr_info.name = attr.name; 76 | attr_info.size = static_cast(number_of_elements(attr.type)); 77 | attr_info.type = gl_type(attr.type); 78 | attr_info.pointer = m_stride; 79 | m_stride += (number_of_elements(attr.type) * sizeof(attr_info.type)); 80 | m_number_of_entires += number_of_elements(attr.type); 81 | 82 | m_format.emplace_back(attr_info); 83 | } 84 | 85 | return true; 86 | } 87 | 88 | } // namespace -------------------------------------------------------------------------------- /external/simple_renderer/vertex_format.hpp: -------------------------------------------------------------------------------- 1 | #ifndef VERTEX_FORMAT_INCLUDED_AFB37FCF_7EB8_480E_AF41_496E7BB2230F 2 | #define VERTEX_FORMAT_INCLUDED_AFB37FCF_7EB8_480E_AF41_496E7BB2230F 3 | 4 | 5 | #include "common.hpp" 6 | #include 7 | #include 8 | 9 | 10 | namespace renderer { 11 | 12 | 13 | enum class attr_type { FLOAT, FLOAT2, FLOAT3, FLOAT4, INT, UINT, }; 14 | 15 | 16 | struct attr_format_desc 17 | { 18 | std::string name; 19 | attr_type type; 20 | }; 21 | 22 | 23 | struct attribute 24 | { 25 | std::string name; 26 | uint32_t size; 27 | std::size_t pointer; 28 | GLenum type; 29 | }; 30 | 31 | 32 | 33 | class vertex_format 34 | { 35 | public: 36 | 37 | explicit vertex_format() {} 38 | explicit vertex_format(const std::vector &desc); 39 | 40 | bool load_format(const std::vector &desc); 41 | 42 | attribute get_attribute(const uint32_t i) const { return m_format.at(i); } 43 | inline bool is_valid() const { return m_stride > 0; } 44 | inline uint32_t get_stride() const { return m_stride; } 45 | inline uint32_t get_number_of_elements() const { return static_cast(m_format.size()); } 46 | inline uint32_t get_number_of_entires() const { return m_number_of_entires; } 47 | 48 | private: 49 | 50 | std::vector m_format; 51 | uint32_t m_stride = 0; 52 | uint32_t m_number_of_entires = 0; 53 | 54 | }; // class 55 | 56 | 57 | } // namespace 58 | 59 | 60 | #endif // include guard -------------------------------------------------------------------------------- /external/utils/directory.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DIRECTORY_INCLUDED_5551C33B_D835_42D2_99FF_661889A068A0 2 | #define DIRECTORY_INCLUDED_5551C33B_D835_42D2_99FF_661889A068A0 3 | 4 | 5 | #include 6 | 7 | 8 | namespace util { 9 | 10 | //! Returns the resource folder on mac, exe_path on others. Prefer this. 11 | std::string get_resource_path(); 12 | 13 | //! Returns the executable path with trailing slash. Prefer resource path. 14 | std::string get_executable_path(); 15 | 16 | 17 | } // namespace 18 | 19 | 20 | #endif // include guard -------------------------------------------------------------------------------- /external/utils/directory_mac.mm: -------------------------------------------------------------------------------- 1 | #include "directory.hpp" 2 | #import 3 | #import 4 | 5 | 6 | namespace util { 7 | 8 | 9 | std::string 10 | get_resource_path() 11 | { 12 | static std::string path; 13 | 14 | if(path.empty()) 15 | { 16 | NSBundle *bundle = [NSBundle mainBundle]; 17 | 18 | if(bundle == nil) { 19 | return ""; 20 | } 21 | else 22 | { 23 | NSString *rPath = [bundle resourcePath]; 24 | path = [rPath UTF8String] + std::string("/"); 25 | } 26 | } 27 | 28 | return path; 29 | } 30 | 31 | 32 | } // namespace -------------------------------------------------------------------------------- /external/utils/directory_nix.cpp: -------------------------------------------------------------------------------- 1 | #include "directory.hpp" 2 | #include 3 | #include 4 | 5 | 6 | namespace util { 7 | 8 | 9 | #ifndef __APPLE__ // This is defined in directory_mac.mm This is here if we are on another nix 10 | std::string 11 | get_resource_path() 12 | { 13 | return get_executable_path(); 14 | } 15 | #endif 16 | 17 | 18 | std::string 19 | get_executable_path() 20 | { 21 | static std::string path = ""; 22 | 23 | if(path.empty()) 24 | { 25 | char __exe_path_buffer[PROC_PIDPATHINFO_MAXSIZE]; 26 | 27 | proc_pidpath(getpid(), __exe_path_buffer, sizeof(__exe_path_buffer)); 28 | 29 | size_t path_length = 0; 30 | for(size_t i = 0; i < PROC_PIDPATHINFO_MAXSIZE; i++) { 31 | if(__exe_path_buffer[i] == '\0') { 32 | path_length = i; 33 | break; 34 | } 35 | } 36 | 37 | size_t last_slash_index = 0; 38 | for(size_t i = 0; i < path_length; i++) { 39 | size_t r_i = (path_length - 1) - i; 40 | if(__exe_path_buffer[r_i] == '/' || __exe_path_buffer[r_i] == '\\') { 41 | last_slash_index = r_i; 42 | break; 43 | } 44 | } 45 | 46 | __exe_path_buffer[last_slash_index + 1] = '\0'; 47 | 48 | path = __exe_path_buffer; 49 | } 50 | 51 | return path; 52 | } 53 | 54 | 55 | } // namespace -------------------------------------------------------------------------------- /external/utils/obj_model_loader.hpp: -------------------------------------------------------------------------------- 1 | #ifndef OBJ_MODEL_LOADER_INCLUDE_71435C61_A8DE_4D1B_BF0C_F5DD45775AD8 2 | #define OBJ_MODEL_LOADER_INCLUDE_71435C61_A8DE_4D1B_BF0C_F5DD45775AD8 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | namespace util { 11 | 12 | 13 | struct obj_mesh 14 | { 15 | std::string name; //!< Name of the mesh if available. 16 | std::vector positions; //!< Positions in x,y,z form. 17 | std::vector uvs; //!< Texture coords in u,v form. 18 | std::vector normals; //!< Normals in x,y,z form. 19 | std::vector index; //!< Index into data. index is [position, uv, normal]. 20 | }; 21 | 22 | 23 | struct obj_model 24 | { 25 | std::vector meshes; //!< A model can contain multiple meshes. 26 | }; 27 | 28 | 29 | //! Loads Wavefront obj file into mesh. 30 | obj_model load_obj(const std::string &filename); 31 | 32 | 33 | struct gl_mesh 34 | { 35 | std::vector mesh_data; 36 | //std::vector index; 37 | }; 38 | 39 | //! Converts mesh into a combined, position,normal,uv format for gl. 40 | gl_mesh convert_to_open_gl_mesh(obj_mesh); 41 | 42 | 43 | struct bounds 44 | { 45 | float width, height; 46 | }; 47 | 48 | 49 | } // namespace 50 | 51 | 52 | #endif // include guard -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/Mega Texture.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/Mega Texture.xcodeproj/xcuserdata/PhilCK.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Mega Texture.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 7E4F9DB61B600F69000185F3 16 | 17 | primary 18 | 19 | 20 | 7E4F9DC91B600F69000185F3 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/Mega Texture/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.SquidVsShark.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 Squid Vs Shark. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/SDL2: -------------------------------------------------------------------------------- 1 | Versions/Current/SDL2 -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 13C64 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | SDL2 11 | CFBundleGetInfoString 12 | http://www.libsdl.org 13 | CFBundleIdentifier 14 | org.libsdl.SDL2 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | Simple DirectMedia Layer 19 | CFBundlePackageType 20 | FMWK 21 | CFBundleShortVersionString 22 | 2.0.3 23 | CFBundleSignature 24 | SDLX 25 | CFBundleVersion 26 | 2.0.3 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 5A3005 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 13A595 35 | DTSDKName 36 | macosx10.9 37 | DTXcode 38 | 0502 39 | DTXcodeBuild 40 | 5A3005 41 | 42 | 43 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/Info.plist 8 | 9 | d2/oGv37hzJiI02uqOn6tWDcYXg= 10 | 11 | 12 | files2 13 | 14 | Resources/Info.plist 15 | 16 | d2/oGv37hzJiI02uqOn6tWDcYXg= 17 | 18 | 19 | rules 20 | 21 | ^Resources/ 22 | 23 | ^Resources/.*\.lproj/ 24 | 25 | optional 26 | 27 | weight 28 | 1000 29 | 30 | ^Resources/.*\.lproj/locversion.plist$ 31 | 32 | omit 33 | 34 | weight 35 | 1100 36 | 37 | ^version.plist$ 38 | 39 | 40 | rules2 41 | 42 | .*\.dSYM($|/) 43 | 44 | weight 45 | 11 46 | 47 | ^(.*/)?\.DS_Store$ 48 | 49 | omit 50 | 51 | weight 52 | 2000 53 | 54 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 55 | 56 | nested 57 | 58 | weight 59 | 10 60 | 61 | ^.* 62 | 63 | ^Info\.plist$ 64 | 65 | omit 66 | 67 | weight 68 | 20 69 | 70 | ^PkgInfo$ 71 | 72 | omit 73 | 74 | weight 75 | 20 76 | 77 | ^Resources/ 78 | 79 | weight 80 | 20 81 | 82 | ^Resources/.*\.lproj/ 83 | 84 | optional 85 | 86 | weight 87 | 1000 88 | 89 | ^Resources/.*\.lproj/locversion.plist$ 90 | 91 | omit 92 | 93 | weight 94 | 1100 95 | 96 | ^[^/]+$ 97 | 98 | nested 99 | 100 | weight 101 | 10 102 | 103 | ^embedded\.provisionprofile$ 104 | 105 | weight 106 | 20 107 | 108 | ^version\.plist$ 109 | 110 | weight 111 | 20 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Frameworks/SDL2.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14D136 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | Mega Texture 11 | CFBundleIdentifier 12 | com.SquidVsShark.Mega-Texture 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Mega Texture 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | DTCompiler 26 | com.apple.compilers.llvm.clang.1_0 27 | DTPlatformBuild 28 | 6D2105 29 | DTPlatformVersion 30 | GM 31 | DTSDKBuild 32 | 14D125 33 | DTSDKName 34 | macosx10.10 35 | DTXcode 36 | 0632 37 | DTXcodeBuild 38 | 6D2105 39 | LSMinimumSystemVersion 40 | 10.10 41 | NSHumanReadableCopyright 42 | Copyright © 2015 Squid Vs Shark. All rights reserved. 43 | NSMainNibFile 44 | MainMenu 45 | NSPrincipalClass 46 | NSApplication 47 | 48 | 49 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/MacOS/Mega Texture: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/MacOS/Mega Texture -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/models/unit_cube.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.74 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o unit_cube 4 | v -0.500000 -0.500000 0.500000 5 | v -0.500000 0.500000 0.500000 6 | v -0.500000 -0.500000 -0.500000 7 | v -0.500000 0.500000 -0.500000 8 | v 0.500000 -0.500000 0.500000 9 | v 0.500000 0.500000 0.500000 10 | v 0.500000 -0.500000 -0.500000 11 | v 0.500000 0.500000 -0.500000 12 | vt 0.999900 0.000100 13 | vt 0.999900 0.999900 14 | vt 0.000100 0.999900 15 | vt 0.000100 0.000100 16 | vn -1.000000 0.000000 0.000000 17 | vn 0.000000 0.000000 -1.000000 18 | vn 0.000000 0.000000 1.000000 19 | vn 0.000000 -1.000000 0.000000 20 | vn 0.000000 1.000000 0.000000 21 | vn 1.000000 0.000000 0.000000 22 | f 4/1/1 3/2/1 1/3/1 23 | f 8/1/2 7/2/2 3/3/2 24 | f 2/3/3 1/4/3 5/1/3 25 | f 3/4/4 7/1/4 5/2/4 26 | f 8/2/5 4/3/5 2/4/5 27 | f 2/4/1 4/1/1 1/3/1 28 | f 4/4/2 8/1/2 3/3/2 29 | f 6/2/3 2/3/3 5/1/3 30 | f 1/3/4 3/4/4 5/2/4 31 | f 6/1/5 8/2/5 2/4/5 32 | f 6/3/6 5/4/6 7/1/6 33 | f 8/2/6 6/3/6 7/1/6 34 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/models/unit_plane.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.74 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o unit_plane 4 | v -0.500000 0.000000 0.500000 5 | v 0.500000 0.000000 0.500000 6 | v -0.500000 0.000000 -0.500000 7 | v 0.500000 0.000000 -0.500000 8 | vt 0.999900 0.000100 9 | vt 0.999900 0.999900 10 | vt 0.000100 0.999900 11 | vt 0.000100 0.000100 12 | vn 0.000000 1.000000 0.000000 13 | f 2/1/1 4/2/1 3/3/1 14 | f 1/4/1 2/1/1 3/3/1 15 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/shaders/basic_fullbright.ogl: -------------------------------------------------------------------------------- 1 | 2 | Full Bright Shader 3 | ------------------ 4 | A general purpose shader with no lighting calculations. 5 | 6 | 7 | [VERTEX] 8 | 9 | #version 150 core 10 | 11 | // Vertex Format 12 | in vec3 inPosition; 13 | in vec2 inTexC; 14 | in vec3 inNormal; 15 | 16 | // WVP matrix. 17 | uniform mat4 worldMat; 18 | uniform mat4 viewMat; 19 | uniform mat4 projMat; 20 | 21 | // Texture settings 22 | uniform vec2 texScale = vec2(1, 1); 23 | uniform vec2 texOffset = vec2(0, 0); 24 | 25 | // Other settings 26 | uniform vec3 vertScale = vec3(1, 1, 1); 27 | uniform vec4 color = vec4(1, 1, 1, 0); 28 | 29 | // Output Format 30 | out vec2 frag_tex_coords; 31 | 32 | void main() 33 | { 34 | // Position vert 35 | mat4 wvpMat = projMat * viewMat * worldMat; 36 | vec3 position = vec3(inPosition.x * vertScale.x, inPosition.y * vertScale.y, inPosition.z * vertScale.z); 37 | 38 | gl_Position = wvpMat * vec4(position, 1.0); 39 | 40 | // Update tex coords with given info. 41 | float u = (inTexC.x * texScale.x) + texOffset.x; 42 | float v = (inTexC.y * texScale.y) + texOffset.y; 43 | frag_tex_coords = vec2(u, v); 44 | } 45 | 46 | [/VERTEX] 47 | 48 | 49 | [PIXEL] 50 | 51 | #version 150 52 | 53 | in vec2 frag_tex_coords; 54 | 55 | uniform sampler2D mip0; 56 | uniform vec2 mip0_position = vec2(0.5,0.5); 57 | 58 | uniform sampler2D mip1; 59 | uniform vec2 mip1_position = vec2(0.5,0.5); 60 | 61 | uniform sampler2D mip2; 62 | uniform vec2 mip2_position = vec2(0.5,0.5); 63 | 64 | uniform sampler2D mip3; 65 | uniform vec2 mip3_position = vec2(0.5,0.5); 66 | 67 | out vec4 frag_out_color; 68 | 69 | 70 | void main() 71 | { 72 | vec4 tex_color; 73 | 74 | 75 | // These are constant. 76 | float number_of_mips = 4; 77 | float mip0_size = 1.0 / pow(2.0, 0); 78 | float mip1_size = 1.0 / pow(2.0, 1); 79 | float mip2_size = 1.0 / pow(2.0, 2); 80 | float mip3_size = 1.0 / pow(2.0, 3); 81 | 82 | 83 | // Highest mip (more detailed) to lowest (less detailed). 84 | // I've not tested which way around is better. I suspect it doens't make much difference. 85 | 86 | 87 | // High to low. 88 | // Simple AABB to check if we need to sample inside. 89 | if(length(mip3_position - frag_tex_coords) < (0.125 / 2)) 90 | { 91 | vec2 uv_adjusted = vec2((mip3_position - frag_tex_coords).x * 8 + 0.5, (mip3_position - frag_tex_coords).y * 8 + 0.5); 92 | tex_color = texture(mip3, uv_adjusted); 93 | } 94 | else if(length(mip2_position - frag_tex_coords) < (0.25 / 2)) 95 | { 96 | vec2 uv_adjusted = vec2((mip3_position - frag_tex_coords).x * 4 + 0.5, (mip3_position - frag_tex_coords).y * 4 + 0.5); 97 | tex_color = texture(mip2, uv_adjusted); 98 | } 99 | else if(length(mip1_position - frag_tex_coords) < (0.5 /2 )) 100 | { 101 | vec2 uv_adjusted = vec2((mip3_position - frag_tex_coords).x * 2 + 0.5, (mip3_position - frag_tex_coords).y * 2 + 0.5); 102 | tex_color = texture(mip1, uv_adjusted); 103 | } 104 | else 105 | { 106 | tex_color = texture(mip0, frag_tex_coords); 107 | } 108 | 109 | frag_out_color = tex_color; 110 | } 111 | 112 | [/PIXEL] 113 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_colored_squares_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_colored_squares_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_blue_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_blue_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_green_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_green_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_grey_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_grey_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_orange_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_orange_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_red_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_grid_red_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_squares_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_squares_1024.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_squares_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Debug/Mega Texture.app/Contents/Resources/assets/textures/dev_squares_512.png -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-all-non-framework-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-all-non-framework-target-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-all-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-all-target-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-generated-files.hmap: -------------------------------------------------------------------------------- 1 | pamhx -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-own-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-own-target-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-project-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture-project-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Mega Texture.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/Mega Texture.LinkFileList: -------------------------------------------------------------------------------- 1 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/shader.o 2 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/index_buffer.o 3 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/ogl_context.o 4 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/rasterizer.o 5 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/sdl_common.o 6 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/frame_buffer.o 7 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_mac.o 8 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/renderer.o 9 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/draw_call.o 10 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_buffer.o 11 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_helper.o 12 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_DXT.o 13 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/texture.o 14 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/SOIL.o 15 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/stb_image_aug.o 16 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/message_pump.o 17 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/window.o 18 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/common.o 19 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/obj_model_loader.o 20 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mega_texture.o 21 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_nix.o 22 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/input.o 23 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_format.o 24 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mixer.o 25 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/SOIL.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/SOIL.c \ 3 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/SOIL.h \ 4 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/stb_image_aug.h \ 5 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/image_helper.h \ 6 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/image_DXT.h 7 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/SOIL.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/SOIL.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/SOIL.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/SOIL.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/common.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp 4 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/common.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/common.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/common.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/common.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_mac.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/utils/directory_mac.mm \ 3 | /Users/PhilCK/Developer/mega_texture/external/utils/directory.hpp 4 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_mac.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_mac.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_mac.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_mac.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_nix.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/utils/directory_nix.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/utils/directory.hpp 4 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_nix.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_nix.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_nix.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/directory_nix.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/draw_call.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/draw_call.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/draw_call.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/renderer_fwd.hpp \ 5 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_format.hpp \ 6 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp \ 7 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_buffer.hpp \ 8 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/index_buffer.hpp \ 9 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/frame_buffer.hpp \ 10 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/shader.hpp 11 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/draw_call.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/draw_call.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/draw_call.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/draw_call.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/frame_buffer.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/frame_buffer.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/frame_buffer.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp 5 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/frame_buffer.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/frame_buffer.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/frame_buffer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/frame_buffer.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_DXT.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/image_DXT.c \ 3 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/image_DXT.h 4 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_DXT.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_DXT.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_DXT.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_DXT.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_helper.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/image_helper.c \ 3 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/image_helper.h 4 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_helper.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_helper.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_helper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/image_helper.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/index_buffer.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/index_buffer.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/index_buffer.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp 5 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/index_buffer.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/index_buffer.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/index_buffer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/index_buffer.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/input.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/input.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/input.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/input.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mega_texture.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mega_texture.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mega_texture.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mega_texture.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/message_pump.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/message_pump.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/message_pump.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/message_pump.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mixer.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/sdl_wrapper/mixer.cpp 3 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mixer.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mixer.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mixer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/mixer.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/obj_model_loader.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/utils/obj_model_loader.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/utils/obj_model_loader.hpp 4 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/obj_model_loader.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/obj_model_loader.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/obj_model_loader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/obj_model_loader.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/ogl_context.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/ogl_context.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/ogl_context.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/ogl_context.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/rasterizer.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/rasterizer.cpp 3 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/rasterizer.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/rasterizer.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/rasterizer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/rasterizer.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/renderer.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/renderer.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/renderer.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp 5 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/renderer.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/renderer.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/renderer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/renderer.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/sdl_common.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/sdl_common.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/sdl_common.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/sdl_common.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/shader.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/shader.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/shader.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp \ 5 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/renderer_fwd.hpp \ 6 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/texture.hpp \ 7 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/frame_buffer.hpp 8 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/shader.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/shader.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/shader.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/shader.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/stb_image_aug.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/stb_image_aug.c \ 3 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/stb_image_aug.h \ 4 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/stbi_DDS_aug.h \ 5 | /Users/PhilCK/Developer/mega_texture/3rd_party/soil/SOIL/stbi_DDS_aug_c.h 6 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/stb_image_aug.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/stb_image_aug.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/stb_image_aug.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/stb_image_aug.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/texture.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/texture.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/texture.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp 5 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/texture.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/texture.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/texture.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/texture.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_buffer.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_buffer.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_buffer.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp \ 5 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/renderer_fwd.hpp \ 6 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/shader.hpp \ 7 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_format.hpp 8 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_buffer.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_buffer.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_buffer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_buffer.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_format.d: -------------------------------------------------------------------------------- 1 | dependencies: \ 2 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_format.cpp \ 3 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/vertex_format.hpp \ 4 | /Users/PhilCK/Developer/mega_texture/external/simple_renderer/common.hpp 5 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_format.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_format.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_format.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/vertex_format.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/window.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/window.dia -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/window.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/Objects-normal/x86_64/window.o -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/dgph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega Texture.build/dgph -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-all-non-framework-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-all-non-framework-target-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-all-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-all-target-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-generated-files.hmap: -------------------------------------------------------------------------------- 1 | pamhx -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-own-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-own-target-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-project-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests-project-headers.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Mega TextureTests.hmap -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Objects-normal/x86_64/Mega TextureTests.LinkFileList: -------------------------------------------------------------------------------- 1 | /Users/PhilCK/Developer/mega_texture/projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/Objects-normal/x86_64/Mega_TextureTests.o 2 | -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Debug/Mega TextureTests.build/dgph: -------------------------------------------------------------------------------- 1 | DGPH1.00 May 11 201516:37:23A/UsersPhilCK Developer mega_textureprojectsxcode Mega Texturebuildtmp 2 | Mega Texture.dstvar folders 4xq2rx_bt17r97yqv3lft00djc0000gnCcom.apple.DeveloperTools 6.3.2-6D2105Xcode Debug Mega Texture.buildDebugSharedPrecompiledHeaders Applications Xcode.appContents Developer PlatformsMacOSX.platform DeveloperSDKsMacOSX10.10.sdkMega TextureTests! 3 | Info.plistMega TextureTests.build#DerivedSourcesMega TextureTests.xctest%Contents& 4 | Info.plist&PkgInfo!Mega_TextureTests.m#Objects-normal*x86_64+Mega_TextureTests.o SDKSettings.plist System.Library/ CoreServices0SystemVersion.plist 5 | Toolchains2XcodeDefault.xctoolchain3usr4lib5clang66.1.07include8 6 | module.map+Mega_TextureTests.ast&MacOS;Mega TextureTests+Mega TextureTests.LinkFileListr&Headers&PrivateHeaders& Resources -------------------------------------------------------------------------------- /projects/xcode/Mega Texture/build/Mega Texture.build/Release/Mega Texture.build/dgph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilCK/mega-texture/620bad0c813533123b603e8e7c1fd204003731ca/projects/xcode/Mega Texture/build/Mega Texture.build/Release/Mega Texture.build/dgph -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Mega Textures 2 | 3 | This is a little experiment to do mega textures. This is meant to be a simple implimentation only. 4 | 5 | 6 | 7 | ## What Are Mega Textures 8 | 9 | What I mean by mega textures is what existed in Quake Wars, not what was in Rage (Virtual Textures). Its also called dynamic mip mapping. 10 | 11 | 12 | 13 | ## Code 14 | 15 | All the code surrounding the mega texture itself is in the `code/` directory. The `external/` directory are just helpers, mainly surrounding SDL use and math etc. 16 | 17 | 18 | 19 | ## How It Works (Brifely) 20 | 21 | In a nutshell the system keeps a number of 512 x 512 textures. These textures cover a greater and greater area (usually landscape) at a lower and lower resolution. The idea being that the imediate area around the camera can be textured with a highly detailed 512 x 512 texture, while larger areas are covererd by another 512 x 512 texture but stretched over more terrain. 22 | 23 | 24 | 25 | ## Pros and Cons 26 | 27 | **Pros** 28 | - Very very large areas of terrain can be uniquely textured. 29 | - Very low texture space, 5-6 (Whatever you wish) textures can be used to represent many km(s) of terrain. 30 | 31 | **Cons** 32 | - Primarily 2D, no overhangs or caves. 33 | - Requres constant rebuilding of textures. 34 | 35 | 36 | 37 | ## More Information 38 | 39 | - http://www.beyond3d.com/content/articles/95/3 40 | - https://en.wikipedia.org/wiki/Enemy_Territory:_Quake_Wars#MegaTexture 41 | - http://wiki.splashdamage.com/index.php/An_Advanced_Terrain_and_Megatexture 42 | 43 | 44 | 45 | ## Included Projects 46 | 47 | I've only included an xcode project, however rebuilding for Windows should be easy enough. There is nothing OSX specific. You'll just need to get the Windows SDL2 lib, and GLEW or something. 48 | 49 | 50 | 51 | ## Licence 52 | 53 | Everything inside the `code/` directory is public. The rest is covered by their individual repos/projects. --------------------------------------------------------------------------------