├── LICENSE
├── README.md
├── bin64
├── EAWebKit.dll
├── EAWebKitd.7z
├── SDL2.dll
├── UI
│ ├── Roboto-Regular.ttf
│ ├── actionMenu.html
│ ├── styleTest.html
│ └── test.html
├── glew32.dll
└── times.ttf
├── build
├── premake5.exe
└── premake5.lua
├── include
├── EABase
│ ├── config
│ │ ├── eacompiler.h
│ │ ├── eacompilertraits.h
│ │ └── eaplatform.h
│ ├── eabase.h
│ ├── eahave.h
│ ├── earesult.h
│ ├── eastdarg.h
│ ├── nullptr.h
│ └── version.h
├── EAWebKit
│ ├── DLLInterface.h
│ ├── EAWebKit
│ ├── EAWebKit.h
│ ├── EAWebKitClient.h
│ ├── EAWebKitConfig.h
│ ├── EAWebKitDll.h
│ ├── EAWebKitFileSystem.h
│ ├── EAWebKitHardwareRenderer.h
│ ├── EAWebKitInput.h
│ ├── EAWebKitLocalizedStringsEnum.h
│ ├── EAWebKitPlatformSocketAPI.h
│ ├── EAWebKitSurface.h
│ ├── EAWebKitSystem.h
│ ├── EAWebKitTextInterface.h
│ ├── EAWebKitThreadInterface.h
│ ├── EAWebKitTransport.h
│ ├── EAWebKitView.h
│ ├── EAWebkitAllocator.h
│ ├── EAWebkitJavascriptValue.h
│ └── EAWebkitSTLWrapper.h
├── GL
│ ├── eglew.h
│ ├── glew.h
│ ├── glxew.h
│ └── wglew.h
├── SDL
│ ├── 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.h.cmake
│ ├── SDL_config.h.in
│ ├── SDL_config_android.h
│ ├── SDL_config_iphoneos.h
│ ├── SDL_config_macosx.h
│ ├── SDL_config_macosx.h.orig
│ ├── SDL_config_minimal.h
│ ├── SDL_config_pandora.h
│ ├── SDL_config_psp.h
│ ├── SDL_config_windows.h
│ ├── SDL_config_winrt.h
│ ├── SDL_config_wiz.h
│ ├── SDL_copying.h
│ ├── SDL_cpuinfo.h
│ ├── SDL_egl.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_opengl_glext.h
│ ├── SDL_opengles.h
│ ├── SDL_opengles2.h
│ ├── SDL_opengles2_gl2.h
│ ├── SDL_opengles2_gl2ext.h
│ ├── SDL_opengles2_gl2platform.h
│ ├── SDL_opengles2_khrplatform.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_memory.h
│ ├── SDL_test_random.h
│ ├── SDL_thread.h
│ ├── SDL_timer.h
│ ├── SDL_touch.h
│ ├── SDL_types.h
│ ├── SDL_version.h
│ ├── SDL_video.h
│ ├── SDL_vulkan.h
│ ├── begin_code.h
│ └── close_code.h
├── glWebKit
│ └── glWebKit.h
└── glm
│ ├── CMakeLists.txt
│ ├── common.hpp
│ ├── detail
│ ├── _features.hpp
│ ├── _fixes.hpp
│ ├── _noise.hpp
│ ├── _swizzle.hpp
│ ├── _swizzle_func.hpp
│ ├── _vectorize.hpp
│ ├── compute_vector_relational.hpp
│ ├── dummy.cpp
│ ├── func_common.inl
│ ├── func_common_simd.inl
│ ├── func_exponential.inl
│ ├── func_exponential_simd.inl
│ ├── func_geometric.inl
│ ├── func_geometric_simd.inl
│ ├── func_integer.inl
│ ├── func_integer_simd.inl
│ ├── func_matrix.inl
│ ├── func_matrix_simd.inl
│ ├── func_packing.inl
│ ├── func_packing_simd.inl
│ ├── func_trigonometric.inl
│ ├── func_trigonometric_simd.inl
│ ├── func_vector_relational.inl
│ ├── func_vector_relational_simd.inl
│ ├── glm.cpp
│ ├── qualifier.hpp
│ ├── setup.hpp
│ ├── type_float.hpp
│ ├── type_gentype.hpp
│ ├── type_gentype.inl
│ ├── type_half.hpp
│ ├── type_half.inl
│ ├── type_int.hpp
│ ├── type_mat.hpp
│ ├── type_mat.inl
│ ├── type_mat2x2.hpp
│ ├── type_mat2x2.inl
│ ├── type_mat2x3.hpp
│ ├── type_mat2x3.inl
│ ├── type_mat2x4.hpp
│ ├── type_mat2x4.inl
│ ├── type_mat3x2.hpp
│ ├── type_mat3x2.inl
│ ├── type_mat3x3.hpp
│ ├── type_mat3x3.inl
│ ├── type_mat3x4.hpp
│ ├── type_mat3x4.inl
│ ├── type_mat4x2.hpp
│ ├── type_mat4x2.inl
│ ├── type_mat4x3.hpp
│ ├── type_mat4x3.inl
│ ├── type_mat4x4.hpp
│ ├── type_mat4x4.inl
│ ├── type_mat4x4_simd.inl
│ ├── type_vec.hpp
│ ├── type_vec.inl
│ ├── type_vec1.hpp
│ ├── type_vec1.inl
│ ├── type_vec2.hpp
│ ├── type_vec2.inl
│ ├── type_vec3.hpp
│ ├── type_vec3.inl
│ ├── type_vec4.hpp
│ ├── type_vec4.inl
│ └── type_vec4_simd.inl
│ ├── exponential.hpp
│ ├── ext.hpp
│ ├── ext
│ ├── vec1.hpp
│ ├── vec1.inl
│ ├── vector_relational.hpp
│ └── vector_relational.inl
│ ├── fwd.hpp
│ ├── geometric.hpp
│ ├── glm.hpp
│ ├── gtc
│ ├── bitfield.hpp
│ ├── bitfield.inl
│ ├── color_space.hpp
│ ├── color_space.inl
│ ├── constants.hpp
│ ├── constants.inl
│ ├── epsilon.hpp
│ ├── epsilon.inl
│ ├── integer.hpp
│ ├── integer.inl
│ ├── matrix_access.hpp
│ ├── matrix_access.inl
│ ├── matrix_integer.hpp
│ ├── matrix_inverse.hpp
│ ├── matrix_inverse.inl
│ ├── matrix_transform.hpp
│ ├── matrix_transform.inl
│ ├── noise.hpp
│ ├── noise.inl
│ ├── packing.hpp
│ ├── packing.inl
│ ├── quaternion.hpp
│ ├── quaternion.inl
│ ├── quaternion_simd.inl
│ ├── random.hpp
│ ├── random.inl
│ ├── reciprocal.hpp
│ ├── reciprocal.inl
│ ├── round.hpp
│ ├── round.inl
│ ├── type_aligned.hpp
│ ├── type_precision.hpp
│ ├── type_precision.inl
│ ├── type_ptr.hpp
│ ├── type_ptr.inl
│ ├── ulp.hpp
│ ├── ulp.inl
│ ├── vec1.hpp
│ └── vec1.inl
│ ├── gtx
│ ├── associated_min_max.hpp
│ ├── associated_min_max.inl
│ ├── bit.hpp
│ ├── bit.inl
│ ├── closest_point.hpp
│ ├── closest_point.inl
│ ├── color_encoding.hpp
│ ├── color_encoding.inl
│ ├── color_space.hpp
│ ├── color_space.inl
│ ├── color_space_YCoCg.hpp
│ ├── color_space_YCoCg.inl
│ ├── common.hpp
│ ├── common.inl
│ ├── compatibility.hpp
│ ├── compatibility.inl
│ ├── component_wise.hpp
│ ├── component_wise.inl
│ ├── dual_quaternion.hpp
│ ├── dual_quaternion.inl
│ ├── easing.hpp
│ ├── easing.inl
│ ├── euler_angles.hpp
│ ├── euler_angles.inl
│ ├── extend.hpp
│ ├── extend.inl
│ ├── extended_min_max.hpp
│ ├── extended_min_max.inl
│ ├── exterior_product.hpp
│ ├── exterior_product.inl
│ ├── fast_exponential.hpp
│ ├── fast_exponential.inl
│ ├── fast_square_root.hpp
│ ├── fast_square_root.inl
│ ├── fast_trigonometry.hpp
│ ├── fast_trigonometry.inl
│ ├── float_notmalize.inl
│ ├── functions.hpp
│ ├── functions.inl
│ ├── gradient_paint.hpp
│ ├── gradient_paint.inl
│ ├── handed_coordinate_space.hpp
│ ├── handed_coordinate_space.inl
│ ├── hash.hpp
│ ├── hash.inl
│ ├── integer.hpp
│ ├── integer.inl
│ ├── intersect.hpp
│ ├── intersect.inl
│ ├── io.hpp
│ ├── io.inl
│ ├── log_base.hpp
│ ├── log_base.inl
│ ├── matrix_cross_product.hpp
│ ├── matrix_cross_product.inl
│ ├── matrix_decompose.hpp
│ ├── matrix_decompose.inl
│ ├── matrix_factorisation.hpp
│ ├── matrix_factorisation.inl
│ ├── matrix_interpolation.hpp
│ ├── matrix_interpolation.inl
│ ├── matrix_major_storage.hpp
│ ├── matrix_major_storage.inl
│ ├── matrix_operation.hpp
│ ├── matrix_operation.inl
│ ├── matrix_query.hpp
│ ├── matrix_query.inl
│ ├── matrix_transform_2d.hpp
│ ├── matrix_transform_2d.inl
│ ├── mixed_product.hpp
│ ├── mixed_product.inl
│ ├── norm.hpp
│ ├── norm.inl
│ ├── normal.hpp
│ ├── normal.inl
│ ├── normalize_dot.hpp
│ ├── normalize_dot.inl
│ ├── number_precision.hpp
│ ├── number_precision.inl
│ ├── optimum_pow.hpp
│ ├── optimum_pow.inl
│ ├── orthonormalize.hpp
│ ├── orthonormalize.inl
│ ├── perpendicular.hpp
│ ├── perpendicular.inl
│ ├── polar_coordinates.hpp
│ ├── polar_coordinates.inl
│ ├── projection.hpp
│ ├── projection.inl
│ ├── quaternion.hpp
│ ├── quaternion.inl
│ ├── range.hpp
│ ├── raw_data.hpp
│ ├── raw_data.inl
│ ├── rotate_normalized_axis.hpp
│ ├── rotate_normalized_axis.inl
│ ├── rotate_vector.hpp
│ ├── rotate_vector.inl
│ ├── scalar_multiplication.hpp
│ ├── scalar_relational.hpp
│ ├── scalar_relational.inl
│ ├── spline.hpp
│ ├── spline.inl
│ ├── std_based_type.hpp
│ ├── std_based_type.inl
│ ├── string_cast.hpp
│ ├── string_cast.inl
│ ├── texture.hpp
│ ├── texture.inl
│ ├── transform.hpp
│ ├── transform.inl
│ ├── transform2.hpp
│ ├── transform2.inl
│ ├── type_aligned.hpp
│ ├── type_aligned.inl
│ ├── type_trait.hpp
│ ├── type_trait.inl
│ ├── vec_swizzle.hpp
│ ├── vector_angle.hpp
│ ├── vector_angle.inl
│ ├── vector_query.hpp
│ ├── vector_query.inl
│ ├── wrap.hpp
│ └── wrap.inl
│ ├── integer.hpp
│ ├── mat2x2.hpp
│ ├── mat2x3.hpp
│ ├── mat2x4.hpp
│ ├── mat3x2.hpp
│ ├── mat3x3.hpp
│ ├── mat3x4.hpp
│ ├── mat4x2.hpp
│ ├── mat4x3.hpp
│ ├── mat4x4.hpp
│ ├── matrix.hpp
│ ├── packing.hpp
│ ├── simd
│ ├── common.h
│ ├── exponential.h
│ ├── geometric.h
│ ├── integer.h
│ ├── matrix.h
│ ├── packing.h
│ ├── platform.h
│ ├── trigonometric.h
│ └── vector_relational.h
│ ├── trigonometric.hpp
│ ├── vec2.hpp
│ ├── vec3.hpp
│ ├── vec4.hpp
│ └── vector_relational.hpp
├── lib64
├── SDL2.lib
└── glew32.lib
└── libsrc
├── example
├── glUtil.cxx
├── glUtil.h
└── main.cxx
└── glWebKit
├── glWebKit.cpp
├── glWebkitClient.cpp
├── glWebkitClient.h
├── glWebkitRenderer.cpp
├── glWebkitRenderer.h
├── glWebkitThreading.cpp
├── glWebkitThreading.h
├── glWebkitUtils.cpp
└── glWebkitUtils.h
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Bob Holcomb
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # glWebKit
2 | EAWebKit example using OpenGL and SDL
3 |
--------------------------------------------------------------------------------
/bin64/EAWebKit.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/bin64/EAWebKit.dll
--------------------------------------------------------------------------------
/bin64/EAWebKitd.7z:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/bin64/EAWebKitd.7z
--------------------------------------------------------------------------------
/bin64/SDL2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/bin64/SDL2.dll
--------------------------------------------------------------------------------
/bin64/UI/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/bin64/UI/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/bin64/UI/actionMenu.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
45 |
46 |
52 |
53 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/bin64/UI/styleTest.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
24 | CSS test
25 |
26 |
27 |
28 |
29 | Text test
30 | Hello world!
31 |
32 |
33 | SVG Test
34 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/bin64/UI/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
43 |
44 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/bin64/glew32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/bin64/glew32.dll
--------------------------------------------------------------------------------
/bin64/times.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/bin64/times.ttf
--------------------------------------------------------------------------------
/build/premake5.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/build/premake5.exe
--------------------------------------------------------------------------------
/build/premake5.lua:
--------------------------------------------------------------------------------
1 | solution ("WebkitTest")
2 | configurations { "Debug", "Release" }
3 | location("..")
4 | platforms { 'x64' }
5 | symbols "On"
6 | startproject ("glWebkit")
7 |
8 | filter "platforms:x64"
9 | architecture "x86_64"
10 |
11 | filter {"platforms:x64", "kind:ConsoleApp or WindowedApp or SharedLib"}
12 | targetdir ('../bin64')
13 |
14 | configuration { "Debug" }
15 | defines { "DEBUG", "TRACE"}
16 | optimize "Off"
17 |
18 | configuration { "Release" }
19 | optimize "Speed"
20 | -------------------------------------------------------------------------------
21 | -- Projects
22 |
23 | project ("glWebkit")
24 | kind "SharedLib"
25 | location("glWebKit")
26 | language "C++"
27 | debugdir("../bin64")
28 | targetdir("../bin64")
29 | links {
30 | 'OpenGL32.lib',
31 | 'ws2_32.lib',
32 | 'glew32.lib',
33 | 'bcrypt.lib'
34 | }
35 |
36 | defines {
37 | GL_WEBKIT_EXPORTS
38 | }
39 |
40 | includedirs {
41 | '../include',
42 | '../libsrc/glWebKit'
43 | }
44 |
45 | libdirs {
46 | '../lib64'
47 | }
48 |
49 | files {
50 | "../include/glWebKit/**h",
51 | "../libsrc/glWebKit/**.h",
52 | "../libsrc/glWebKit/**.cxx",
53 | "../libsrc/glWebKit/**.cpp"
54 | }
55 |
56 | vpaths {
57 | ["Public"] = {"../include/glWebKit/**.h"},
58 | ["Headers"] = {"../libsrc/glWebKit/**.h"},
59 | ["Sources"] = {"../libsrc/glWebKit/**.cxx", "../libsrc/glWebKit/**.cpp"},
60 | }
61 |
62 | project ("glWebkitExample")
63 | kind "ConsoleApp"
64 | location("glWebKitExample")
65 | language "C++"
66 | debugdir("../bin64")
67 | targetdir("../bin64")
68 | links {
69 | 'SDL2.lib',
70 | 'OpenGL32.lib',
71 | 'glew32.lib',
72 | 'glWebkit'
73 | }
74 |
75 | defines {
76 | }
77 |
78 | includedirs {
79 | '../include',
80 | '../libsrc'
81 | }
82 |
83 | libdirs {
84 | '../lib64'
85 | }
86 |
87 | files {
88 | "../libsrc/example/**.h",
89 | "../libsrc/example/**.cxx",
90 | "../libsrc/example/**.cpp"
91 | }
92 |
93 | vpaths {
94 | ["Headers"] = {"../libsrc/example/**.h"},
95 | ["Sources"] = {"../libsrc/example/**.cxx", "../libsrc/example/**.cpp"},
96 | }
97 |
98 |
--------------------------------------------------------------------------------
/include/EABase/earesult.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2002-2015 Electronic Arts, Inc. All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions
6 | are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | 2. Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in the
12 | documentation and/or other materials provided with the distribution.
13 | 3. Neither the name of Electronic Arts, Inc. ("EA") nor the names of
14 | its contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY ELECTRONIC ARTS AND ITS CONTRIBUTORS "AS IS" AND ANY
18 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 | DISCLAIMED. IN NO EVENT SHALL ELECTRONIC ARTS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #ifndef INCLUDED_earesult_H
30 | #define INCLUDED_earesult_H
31 |
32 |
33 | #include
34 |
35 | #if defined(EA_PRAGMA_ONCE_SUPPORTED)
36 | #pragma once /* Some compilers (e.g. VC++) benefit significantly from using this. We've measured 3-4% build speed improvements in apps as a result. */
37 | #endif
38 |
39 |
40 |
41 | /* This result type is width-compatible with most systems. */
42 | typedef int32_t ea_result_type;
43 |
44 |
45 | namespace EA
46 | {
47 | typedef int32_t result_type;
48 |
49 | enum
50 | {
51 | SUCCESS = 0,
52 | FAILURE = -1
53 | };
54 | }
55 |
56 |
57 | /* Macro to simplify testing for success. */
58 | #ifndef EA_SUCCEEDED
59 | #define EA_SUCCEEDED(result) ((result) >= 0)
60 | #endif
61 |
62 | /* Macro to simplfify testing for general failure. */
63 | #ifndef EA_FAILED
64 | #define EA_FAILED(result) ((result) < 0)
65 | #endif
66 |
67 |
68 | #endif
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/include/EAWebKit/EAWebKit:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2012, 2013 Electronic Arts, Inc. All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions
6 | are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | 2. Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in the
12 | documentation and/or other materials provided with the distribution.
13 | 3. Neither the name of Electronic Arts, Inc. ("EA") nor the names of
14 | its contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY ELECTRONIC ARTS AND ITS CONTRIBUTORS "AS IS" AND ANY
18 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 | DISCLAIMED. IN NO EVENT SHALL ELECTRONIC ARTS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #ifndef EAWEBKIT_ALL_HEADERS_H
30 | #define EAWEBKIT_ALL_HEADERS_H
31 |
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include
46 | #include
47 | #include
48 | #include
49 |
50 | #endif // EAWEBKIT_ALL_HEADERS_H
--------------------------------------------------------------------------------
/include/EAWebKit/EAWebKit.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/include/EAWebKit/EAWebKit.h
--------------------------------------------------------------------------------
/include/EAWebKit/EAWebKitInput.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/include/EAWebKit/EAWebKitInput.h
--------------------------------------------------------------------------------
/include/SDL/SDL_clipboard.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_copying.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2017 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_error.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_gesture.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_name.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_opengles.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 | #include "SDL_config.h"
28 |
29 | #ifdef __IPHONEOS__
30 | #include
31 | #include
32 | #else
33 | #include
34 | #include
35 | #endif
36 |
37 | #ifndef APIENTRY
38 | #define APIENTRY
39 | #endif
40 |
--------------------------------------------------------------------------------
/include/SDL/SDL_opengles2.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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_opengles2.h
24 | *
25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
26 | */
27 | #include "SDL_config.h"
28 |
29 | #ifndef _MSC_VER
30 |
31 | #ifdef __IPHONEOS__
32 | #include
33 | #include
34 | #else
35 | #include
36 | #include
37 | #include
38 | #endif
39 |
40 | #else /* _MSC_VER */
41 |
42 | /* OpenGL ES2 headers for Visual Studio */
43 | #include "SDL_opengles2_khrplatform.h"
44 | #include "SDL_opengles2_gl2platform.h"
45 | #include "SDL_opengles2_gl2.h"
46 | #include "SDL_opengles2_gl2ext.h"
47 |
48 | #endif /* _MSC_VER */
49 |
50 | #ifndef APIENTRY
51 | #define APIENTRY GL_APIENTRY
52 | #endif
53 |
--------------------------------------------------------------------------------
/include/SDL/SDL_opengles2_gl2platform.h:
--------------------------------------------------------------------------------
1 | #ifndef __gl2platform_h_
2 | #define __gl2platform_h_
3 |
4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
5 |
6 | /*
7 | * This document is licensed under the SGI Free Software B License Version
8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
9 | */
10 |
11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
12 | *
13 | * Adopters may modify khrplatform.h and this file to suit their platform.
14 | * You are encouraged to submit all modifications to the Khronos group so that
15 | * they can be included in future versions of this file. Please submit changes
16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
17 | * by filing a bug against product "OpenGL-ES" component "Registry".
18 | */
19 |
20 | /*#include */
21 |
22 | #ifndef GL_APICALL
23 | #define GL_APICALL KHRONOS_APICALL
24 | #endif
25 |
26 | #ifndef GL_APIENTRY
27 | #define GL_APIENTRY KHRONOS_APIENTRY
28 | #endif
29 |
30 | #endif /* __gl2platform_h_ */
31 |
--------------------------------------------------------------------------------
/include/SDL/SDL_quit.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_revision.h:
--------------------------------------------------------------------------------
1 | #define SDL_REVISION "hg-11914:f1084c419f33"
2 | #define SDL_REVISION_NUMBER 11914
3 |
--------------------------------------------------------------------------------
/include/SDL/SDL_test.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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_assert.h"
35 | #include "SDL_test_common.h"
36 | #include "SDL_test_compare.h"
37 | #include "SDL_test_crc32.h"
38 | #include "SDL_test_font.h"
39 | #include "SDL_test_fuzzer.h"
40 | #include "SDL_test_harness.h"
41 | #include "SDL_test_images.h"
42 | #include "SDL_test_log.h"
43 | #include "SDL_test_md5.h"
44 | #include "SDL_test_memory.h"
45 | #include "SDL_test_random.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 | /* Global definitions */
54 |
55 | /*
56 | * Note: Maximum size of SDLTest log message is less than SDL's limit
57 | * to ensure we can fit additional information such as the timestamp.
58 | */
59 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
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_h_ */
68 |
69 | /* vi: set ts=4 sw=4 expandtab: */
70 |
--------------------------------------------------------------------------------
/include/SDL/SDL_test_compare.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 (=sum of squared difference for each RGB component) in blending accuracy.
55 | *
56 | * \returns 0 if comparison succeeded, >0 (=number of pixels for which the 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_test_images.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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(void);
59 | SDL_Surface *SDLTest_ImageBlitColor(void);
60 | SDL_Surface *SDLTest_ImageBlitAlpha(void);
61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(void);
62 | SDL_Surface *SDLTest_ImageBlitBlend(void);
63 | SDL_Surface *SDLTest_ImageBlitBlendMod(void);
64 | SDL_Surface *SDLTest_ImageBlitBlendNone(void);
65 | SDL_Surface *SDLTest_ImageBlitBlendAll(void);
66 | SDL_Surface *SDLTest_ImageFace(void);
67 | SDL_Surface *SDLTest_ImagePrimitives(void);
68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(void);
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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_test_log.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
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(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_test_memory.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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_memory.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_memory_h_
31 | #define SDL_test_memory_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 | /**
41 | * \brief Start tracking SDL memory allocations
42 | *
43 | * \note This should be called before any other SDL functions for complete tracking coverage
44 | */
45 | int SDLTest_TrackAllocations();
46 |
47 | /**
48 | * \brief Print a log of any outstanding allocations
49 | *
50 | * \note This can be called after SDL_Quit()
51 | */
52 | void SDLTest_LogAllocations();
53 |
54 |
55 | /* Ends C function definitions when using C++ */
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 | #include "close_code.h"
60 |
61 | #endif /* SDL_test_memory_h_ */
62 |
63 | /* vi: set ts=4 sw=4 expandtab: */
64 |
--------------------------------------------------------------------------------
/include/SDL/SDL_touch.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 |
--------------------------------------------------------------------------------
/include/SDL/SDL_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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 |
--------------------------------------------------------------------------------
/include/SDL/close_code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2018 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(__BORLANDC__)
33 | #ifdef __BORLANDC__
34 | #pragma nopackwarning
35 | #endif
36 | #pragma pack(pop)
37 | #endif /* Compiler needs structure packing set */
38 |
--------------------------------------------------------------------------------
/include/glWebKit/glWebKit.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma once
3 |
4 | #pragma once
5 | #ifdef _WIN32
6 | # ifdef GL_WEBKIT_EXPORTS
7 | # define GLWEBKIT_API __declspec ( dllexport )
8 | # else
9 | # define GLWEBKIT_API __declspec ( dllimport )
10 | # endif
11 | #else
12 | # define GLWEBKIT_API
13 | #endif
14 |
15 |
16 | namespace EA
17 | {
18 | namespace WebKit
19 | {
20 | class View;
21 | class JavascriptValue;
22 | class IJSBoundObject;
23 | }
24 | }
25 |
26 |
27 |
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif
32 |
33 | //WebKitLib API
34 | GLWEBKIT_API bool initWebkit();
35 | GLWEBKIT_API EA::WebKit::View* createView(int x, int y);
36 | GLWEBKIT_API void destroyView(EA::WebKit::View* v);
37 | GLWEBKIT_API void updateWebkit();
38 | GLWEBKIT_API bool shutdownWebKit();
39 |
40 |
41 |
42 | //View API
43 | GLWEBKIT_API void setViewUrl(EA::WebKit::View* v, const char* url);
44 | GLWEBKIT_API void updateView(EA::WebKit::View* v);
45 | GLWEBKIT_API void resize(EA::WebKit::View* v, int width, int height);
46 | GLWEBKIT_API void mousemove(EA::WebKit::View* v, int x, int y);
47 | GLWEBKIT_API void mousebutton(EA::WebKit::View* v, int x, int y, int btn, bool depressed);
48 | GLWEBKIT_API void mousewheel(EA::WebKit::View* v, int x, int y, int keys, int delta);
49 | GLWEBKIT_API void keyboard(EA::WebKit::View* v, int id, bool ischar, bool depressed);
50 | GLWEBKIT_API void reload(EA::WebKit::View* v);
51 | GLWEBKIT_API void updateGLTexture(EA::WebKit::View* v, unsigned int id);
52 | GLWEBKIT_API bool evaluateJavaScript(EA::WebKit::View* v, const char* src, EA::WebKit::JavascriptValue* result = 0);
53 | GLWEBKIT_API void bindJavascriptObject(EA::WebKit::View* v, const char* name, EA::WebKit::IJSBoundObject* obj);
54 |
55 | //Javascript API
56 |
57 |
58 | #ifdef __cplusplus
59 | }
60 | #endif
--------------------------------------------------------------------------------
/include/glm/detail/_fixes.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/_fixes.hpp
3 |
4 | #include
5 |
6 | //! Workaround for compatibility with other libraries
7 | #ifdef max
8 | #undef max
9 | #endif
10 |
11 | //! Workaround for compatibility with other libraries
12 | #ifdef min
13 | #undef min
14 | #endif
15 |
16 | //! Workaround for Android
17 | #ifdef isnan
18 | #undef isnan
19 | #endif
20 |
21 | //! Workaround for Android
22 | #ifdef isinf
23 | #undef isinf
24 | #endif
25 |
26 | //! Workaround for Chrone Native Client
27 | #ifdef log2
28 | #undef log2
29 | #endif
30 |
31 |
--------------------------------------------------------------------------------
/include/glm/detail/_noise.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/_noise.hpp
3 |
4 | #pragma once
5 |
6 | #include "../vec2.hpp"
7 | #include "../vec3.hpp"
8 | #include "../vec4.hpp"
9 | #include "../common.hpp"
10 |
11 | namespace glm{
12 | namespace detail
13 | {
14 | template
15 | GLM_FUNC_QUALIFIER T mod289(T const& x)
16 | {
17 | return x - floor(x * (static_cast(1.0) / static_cast(289.0))) * static_cast(289.0);
18 | }
19 |
20 | template
21 | GLM_FUNC_QUALIFIER T permute(T const& x)
22 | {
23 | return mod289(((x * static_cast(34)) + static_cast(1)) * x);
24 | }
25 |
26 | template
27 | GLM_FUNC_QUALIFIER vec<2, T, Q> permute(vec<2, T, Q> const& x)
28 | {
29 | return mod289(((x * static_cast(34)) + static_cast(1)) * x);
30 | }
31 |
32 | template
33 | GLM_FUNC_QUALIFIER vec<3, T, Q> permute(vec<3, T, Q> const& x)
34 | {
35 | return mod289(((x * static_cast(34)) + static_cast(1)) * x);
36 | }
37 |
38 | template
39 | GLM_FUNC_QUALIFIER vec<4, T, Q> permute(vec<4, T, Q> const& x)
40 | {
41 | return mod289(((x * static_cast(34)) + static_cast(1)) * x);
42 | }
43 |
44 | template
45 | GLM_FUNC_QUALIFIER T taylorInvSqrt(T const& r)
46 | {
47 | return T(1.79284291400159) - T(0.85373472095314) * r;
48 | }
49 |
50 | template
51 | GLM_FUNC_QUALIFIER vec<2, T, Q> taylorInvSqrt(vec<2, T, Q> const& r)
52 | {
53 | return T(1.79284291400159) - T(0.85373472095314) * r;
54 | }
55 |
56 | template
57 | GLM_FUNC_QUALIFIER vec<3, T, Q> taylorInvSqrt(vec<3, T, Q> const& r)
58 | {
59 | return T(1.79284291400159) - T(0.85373472095314) * r;
60 | }
61 |
62 | template
63 | GLM_FUNC_QUALIFIER vec<4, T, Q> taylorInvSqrt(vec<4, T, Q> const& r)
64 | {
65 | return T(1.79284291400159) - T(0.85373472095314) * r;
66 | }
67 |
68 | template
69 | GLM_FUNC_QUALIFIER vec<2, T, Q> fade(vec<2, T, Q> const& t)
70 | {
71 | return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
72 | }
73 |
74 | template
75 | GLM_FUNC_QUALIFIER vec<3, T, Q> fade(vec<3, T, Q> const& t)
76 | {
77 | return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
78 | }
79 |
80 | template
81 | GLM_FUNC_QUALIFIER vec<4, T, Q> fade(vec<4, T, Q> const& t)
82 | {
83 | return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
84 | }
85 | }//namespace detail
86 | }//namespace glm
87 |
88 |
--------------------------------------------------------------------------------
/include/glm/detail/compute_vector_relational.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "setup.hpp"
4 | #include
5 | #include
6 |
7 | namespace glm{
8 | namespace detail
9 | {
10 | template ::is_iec559>
11 | struct compute_equal
12 | {
13 | GLM_FUNC_QUALIFIER static bool call(T a, T b)
14 | {
15 | return a == b;
16 | }
17 | };
18 |
19 | template
20 | struct compute_equal
21 | {
22 | GLM_FUNC_QUALIFIER static bool call(T a, T b)
23 | {
24 | return std::memcmp(&a, &b, sizeof(T)) == 0;
25 | }
26 | };
27 | }//namespace detail
28 | }//namespace glm
29 |
--------------------------------------------------------------------------------
/include/glm/detail/func_exponential_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_exponential_simd.inl
3 |
4 | #include "../simd/exponential.h"
5 |
6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | template
12 | struct compute_sqrt<4, float, Q, true>
13 | {
14 | GLM_FUNC_QUALIFIER static vec<4, float, Q> call(vec<4, float, Q> const& v)
15 | {
16 | vec<4, float, Q> Result;
17 | Result.data = _mm_sqrt_ps(v.data);
18 | return Result;
19 | }
20 | };
21 |
22 | template<>
23 | struct compute_sqrt<4, float, aligned_lowp, true>
24 | {
25 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v)
26 | {
27 | vec<4, float, aligned_lowp> Result;
28 | Result.data = glm_vec4_sqrt_lowp(v.data);
29 | return Result;
30 | }
31 | };
32 | }//namespace detail
33 | }//namespace glm
34 |
35 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
36 |
--------------------------------------------------------------------------------
/include/glm/detail/func_integer_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_integer_simd.inl
3 |
4 | #include "../simd/integer.h"
5 |
6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | template
12 | struct compute_bitfieldReverseStep<4, uint32, Q, true, true>
13 | {
14 | GLM_FUNC_QUALIFIER static vec<4, uint32, Q> call(vec<4, uint32, Q> const& v, uint32 Mask, uint32 Shift)
15 | {
16 | __m128i const set0 = v.data;
17 |
18 | __m128i const set1 = _mm_set1_epi32(static_cast(Mask));
19 | __m128i const and1 = _mm_and_si128(set0, set1);
20 | __m128i const sft1 = _mm_slli_epi32(and1, Shift);
21 |
22 | __m128i const set2 = _mm_andnot_si128(set0, _mm_set1_epi32(-1));
23 | __m128i const and2 = _mm_and_si128(set0, set2);
24 | __m128i const sft2 = _mm_srai_epi32(and2, Shift);
25 |
26 | __m128i const or0 = _mm_or_si128(sft1, sft2);
27 |
28 | return or0;
29 | }
30 | };
31 |
32 | template
33 | struct compute_bitfieldBitCountStep<4, uint32, Q, true, true>
34 | {
35 | GLM_FUNC_QUALIFIER static vec<4, uint32, Q> call(vec<4, uint32, Q> const& v, uint32 Mask, uint32 Shift)
36 | {
37 | __m128i const set0 = v.data;
38 |
39 | __m128i const set1 = _mm_set1_epi32(static_cast(Mask));
40 | __m128i const and0 = _mm_and_si128(set0, set1);
41 | __m128i const sft0 = _mm_slli_epi32(set0, Shift);
42 | __m128i const and1 = _mm_and_si128(sft0, set1);
43 | __m128i const add0 = _mm_add_epi32(and0, and1);
44 |
45 | return add0;
46 | }
47 | };
48 | }//namespace detail
49 |
50 | # if GLM_ARCH & GLM_ARCH_AVX_BIT
51 | template<>
52 | GLM_FUNC_QUALIFIER int bitCount(uint32 x)
53 | {
54 | return _mm_popcnt_u32(x);
55 | }
56 |
57 | # if(GLM_MODEL == GLM_MODEL_64)
58 | template<>
59 | GLM_FUNC_QUALIFIER int bitCount(uint64 x)
60 | {
61 | return static_cast(_mm_popcnt_u64(x));
62 | }
63 | # endif//GLM_MODEL
64 | # endif//GLM_ARCH
65 |
66 | }//namespace glm
67 |
68 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
69 |
--------------------------------------------------------------------------------
/include/glm/detail/func_packing_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_packing_simd.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 |
8 | }//namespace detail
9 | }//namespace glm
10 |
--------------------------------------------------------------------------------
/include/glm/detail/func_trigonometric_simd.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/include/glm/detail/func_trigonometric_simd.inl
--------------------------------------------------------------------------------
/include/glm/detail/func_vector_relational_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_vector_relational_simd.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 |
8 | }//namespace detail
9 | }//namespace glm
10 |
--------------------------------------------------------------------------------
/include/glm/detail/qualifier.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/qualifier.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm
9 | {
10 | /// Qualify GLM types in term of alignment (packed, aligned) and precision in term of ULPs (lowp, mediump, highp)
11 | enum qualifier
12 | {
13 | packed_highp, ///< Typed data is tightly packed in memory and operations are executed with high precision in term of ULPs
14 | packed_mediump, ///< Typed data is tightly packed in memory and operations are executed with medium precision in term of ULPs for higher performance
15 | packed_lowp, ///< Typed data is tightly packed in memory and operations are executed with low precision in term of ULPs to maximize performance
16 |
17 | # if GLM_HAS_ALIGNED_TYPE
18 | aligned_highp, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs
19 | aligned_mediump, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs for higher performance
20 | aligned_lowp, // ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs to maximize performance
21 | aligned = aligned_highp, ///< By default aligned qualifier is also high precision
22 | # endif
23 |
24 | highp = packed_highp, ///< By default highp qualifier is also packed
25 | mediump = packed_mediump, ///< By default mediump qualifier is also packed
26 | lowp = packed_lowp, ///< By default lowp qualifier is also packed
27 | packed = packed_highp, ///< By default packed qualifier is also high precision
28 |
29 | # if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED)
30 | defaultp = aligned_highp
31 | # else
32 | defaultp = highp
33 | # endif
34 | };
35 |
36 | typedef qualifier precision;
37 |
38 | template struct vec;
39 | template struct mat;
40 |
41 | namespace detail
42 | {
43 | template
44 | struct is_aligned
45 | {
46 | static const bool value = false;
47 | };
48 |
49 | # if GLM_HAS_ALIGNED_TYPE
50 | template<>
51 | struct is_aligned
52 | {
53 | static const bool value = true;
54 | };
55 |
56 | template<>
57 | struct is_aligned
58 | {
59 | static const bool value = true;
60 | };
61 |
62 | template<>
63 | struct is_aligned
64 | {
65 | static const bool value = true;
66 | };
67 | # endif
68 | }//namespace detail
69 | }//namespace glm
70 |
--------------------------------------------------------------------------------
/include/glm/detail/type_half.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_half.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | typedef short hdata;
12 |
13 | GLM_FUNC_DECL float toFloat32(hdata value);
14 | GLM_FUNC_DECL hdata toFloat16(float const& value);
15 |
16 | }//namespace detail
17 | }//namespace glm
18 |
19 | #include "type_half.inl"
20 |
--------------------------------------------------------------------------------
/include/glm/detail/type_mat.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_mat.inl
3 |
4 |
--------------------------------------------------------------------------------
/include/glm/detail/type_mat4x4_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_mat4x4_sse2.inl
3 |
4 | namespace glm
5 | {
6 |
7 | }//namespace glm
8 |
--------------------------------------------------------------------------------
/include/glm/detail/type_vec.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_vec.inl
3 |
--------------------------------------------------------------------------------
/include/glm/detail/type_vec1.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/include/glm/detail/type_vec1.hpp
--------------------------------------------------------------------------------
/include/glm/ext/vec1.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bholcomb/glWebKit/776116a20a94e545ea8617d13139987c4b035541/include/glm/ext/vec1.inl
--------------------------------------------------------------------------------
/include/glm/ext/vector_relational.inl:
--------------------------------------------------------------------------------
1 | /// @ref ext_vector_relational
2 | /// @file glm/ext/vector_relational.inl
3 |
4 | // Dependency:
5 | #include "../vector_relational.hpp"
6 | #include "../common.hpp"
7 | #include "../detail/type_vec.hpp"
8 |
9 | namespace glm
10 | {
11 | template
12 | GLM_FUNC_QUALIFIER bool equal(genType const& x, genType const& y, genType const& epsilon)
13 | {
14 | return abs(x - y) < epsilon;
15 | }
16 |
17 | template
18 | GLM_FUNC_QUALIFIER vec equal(vec const& x, vec const& y, T const& epsilon)
19 | {
20 | return lessThan(abs(x - y), vec(epsilon));
21 | }
22 |
23 | template
24 | GLM_FUNC_QUALIFIER vec equal(vec const& x, vec const& y, vec const& epsilon)
25 | {
26 | return lessThan(abs(x - y), epsilon);
27 | }
28 |
29 | template
30 | GLM_FUNC_QUALIFIER bool notEqual(genType const& x, genType const& y, genType const& epsilon)
31 | {
32 | return abs(x - y) >= epsilon;
33 | }
34 |
35 | template
36 | GLM_FUNC_QUALIFIER vec notEqual(vec const& x, vec const& y, T const& epsilon)
37 | {
38 | return greaterThanEqual(abs(x - y), vec(epsilon));
39 | }
40 |
41 | template
42 | GLM_FUNC_QUALIFIER vec notEqual(vec const& x, vec const& y, vec const& epsilon)
43 | {
44 | return greaterThanEqual(abs(x - y), epsilon);
45 | }
46 | }//namespace glm
47 |
--------------------------------------------------------------------------------
/include/glm/gtc/color_space.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_color_space
2 | /// @file glm/gtc/color_space.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_color_space (dependence)
6 | ///
7 | /// @defgroup gtc_color_space GLM_GTC_color_space
8 | /// @ingroup gtc
9 | ///
10 | /// Include to use the features of this extension.
11 | ///
12 | /// Allow to perform bit operations on integer values
13 |
14 | #pragma once
15 |
16 | // Dependencies
17 | #include "../detail/setup.hpp"
18 | #include "../detail/qualifier.hpp"
19 | #include "../exponential.hpp"
20 | #include "../vec3.hpp"
21 | #include "../vec4.hpp"
22 | #include
23 |
24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 | # pragma message("GLM: GLM_GTC_color_space extension included")
26 | #endif
27 |
28 | namespace glm
29 | {
30 | /// @addtogroup gtc_color_space
31 | /// @{
32 |
33 | /// Convert a linear color to sRGB color using a standard gamma correction.
34 | /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
35 | template
36 | GLM_FUNC_DECL vec convertLinearToSRGB(vec const& ColorLinear);
37 |
38 | /// Convert a linear color to sRGB color using a custom gamma correction.
39 | /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
40 | template
41 | GLM_FUNC_DECL vec convertLinearToSRGB(vec const& ColorLinear, T Gamma);
42 |
43 | /// Convert a sRGB color to linear color using a standard gamma correction.
44 | /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
45 | template
46 | GLM_FUNC_DECL vec convertSRGBToLinear(vec const& ColorSRGB);
47 |
48 | /// Convert a sRGB color to linear color using a custom gamma correction.
49 | // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
50 | template
51 | GLM_FUNC_DECL vec convertSRGBToLinear(vec const& ColorSRGB, T Gamma);
52 |
53 | /// @}
54 | } //namespace glm
55 |
56 | #include "color_space.inl"
57 |
--------------------------------------------------------------------------------
/include/glm/gtc/epsilon.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_epsilon
2 | /// @file glm/gtc/epsilon.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_quaternion (dependence)
6 | ///
7 | /// @defgroup gtc_epsilon GLM_GTC_epsilon
8 | /// @ingroup gtc
9 | ///
10 | /// Include to use the features of this extension.
11 | ///
12 | /// Comparison functions for a user defined epsilon values.
13 |
14 | #pragma once
15 |
16 | // Dependencies
17 | #include "../detail/setup.hpp"
18 | #include "../detail/qualifier.hpp"
19 |
20 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
21 | # pragma message("GLM: GLM_GTC_epsilon extension included")
22 | #endif
23 |
24 | namespace glm
25 | {
26 | /// @addtogroup gtc_epsilon
27 | /// @{
28 |
29 | /// Returns the component-wise comparison of |x - y| < epsilon.
30 | /// True if this expression is satisfied.
31 | ///
32 | /// @see gtc_epsilon
33 | template
34 | GLM_FUNC_DECL vec epsilonEqual(vec const& x, vec const& y, T const& epsilon);
35 |
36 | /// Returns the component-wise comparison of |x - y| < epsilon.
37 | /// True if this expression is satisfied.
38 | ///
39 | /// @see gtc_epsilon
40 | template
41 | GLM_FUNC_DECL bool epsilonEqual(genType const& x, genType const& y, genType const& epsilon);
42 |
43 | /// Returns the component-wise comparison of |x - y| < epsilon.
44 | /// True if this expression is not satisfied.
45 | ///
46 | /// @see gtc_epsilon
47 | template
48 | GLM_FUNC_DECL vec epsilonNotEqual(vec const& x, vec const& y, T const& epsilon);
49 |
50 | /// Returns the component-wise comparison of |x - y| >= epsilon.
51 | /// True if this expression is not satisfied.
52 | ///
53 | /// @see gtc_epsilon
54 | template
55 | GLM_FUNC_DECL bool epsilonNotEqual(genType const& x, genType const& y, genType const& epsilon);
56 |
57 | /// @}
58 | }//namespace glm
59 |
60 | #include "epsilon.inl"
61 |
--------------------------------------------------------------------------------
/include/glm/gtc/epsilon.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_epsilon
2 | /// @file glm/gtc/epsilon.inl
3 |
4 | // Dependency:
5 | #include "quaternion.hpp"
6 | #include "../vector_relational.hpp"
7 | #include "../common.hpp"
8 | #include "../detail/type_vec.hpp"
9 |
10 | namespace glm
11 | {
12 | template<>
13 | GLM_FUNC_QUALIFIER bool epsilonEqual
14 | (
15 | float const& x,
16 | float const& y,
17 | float const& epsilon
18 | )
19 | {
20 | return abs(x - y) < epsilon;
21 | }
22 |
23 | template<>
24 | GLM_FUNC_QUALIFIER bool epsilonEqual
25 | (
26 | double const& x,
27 | double const& y,
28 | double const& epsilon
29 | )
30 | {
31 | return abs(x - y) < epsilon;
32 | }
33 |
34 | template
35 | GLM_FUNC_QUALIFIER vec epsilonEqual(vec const& x, vec const& y, T const& epsilon)
36 | {
37 | return lessThan(abs(x - y), vec(epsilon));
38 | }
39 |
40 | template
41 | GLM_FUNC_QUALIFIER vec epsilonEqual(vec const& x, vec const& y, vec const& epsilon)
42 | {
43 | return lessThan(abs(x - y), vec(epsilon));
44 | }
45 |
46 | template<>
47 | GLM_FUNC_QUALIFIER bool epsilonNotEqual(float const& x, float const& y, float const& epsilon)
48 | {
49 | return abs(x - y) >= epsilon;
50 | }
51 |
52 | template<>
53 | GLM_FUNC_QUALIFIER bool epsilonNotEqual(double const& x, double const& y, double const& epsilon)
54 | {
55 | return abs(x - y) >= epsilon;
56 | }
57 |
58 | template
59 | GLM_FUNC_QUALIFIER vec epsilonNotEqual(vec const& x, vec const& y, T const& epsilon)
60 | {
61 | return greaterThanEqual(abs(x - y), vec(epsilon));
62 | }
63 |
64 | template
65 | GLM_FUNC_QUALIFIER vec epsilonNotEqual(vec const& x, vec const& y, vec const& epsilon)
66 | {
67 | return greaterThanEqual(abs(x - y), vec(epsilon));
68 | }
69 |
70 | template
71 | GLM_FUNC_QUALIFIER vec<4, bool, Q> epsilonEqual(tquat const& x, tquat const& y, T const& epsilon)
72 | {
73 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
74 | return lessThan(abs(v), vec<4, T, Q>(epsilon));
75 | }
76 |
77 | template
78 | GLM_FUNC_QUALIFIER vec<4, bool, Q> epsilonNotEqual(tquat const& x, tquat const& y, T const& epsilon)
79 | {
80 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
81 | return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon));
82 | }
83 | }//namespace glm
84 |
--------------------------------------------------------------------------------
/include/glm/gtc/integer.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_integer
2 | /// @file glm/gtc/integer.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_integer (dependence)
6 | ///
7 | /// @defgroup gtc_integer GLM_GTC_integer
8 | /// @ingroup gtc
9 | ///
10 | /// Include to use the features of this extension.
11 | ///
12 | /// @brief Allow to perform bit operations on integer values
13 |
14 | #pragma once
15 |
16 | // Dependencies
17 | #include "../detail/setup.hpp"
18 | #include "../detail/qualifier.hpp"
19 | #include "../common.hpp"
20 | #include "../integer.hpp"
21 | #include "../exponential.hpp"
22 | #include
23 |
24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 | # pragma message("GLM: GLM_GTC_integer extension included")
26 | #endif
27 |
28 | namespace glm
29 | {
30 | /// @addtogroup gtc_integer
31 | /// @{
32 |
33 | /// Returns the log2 of x for integer values. Can be reliably using to compute mipmap count from the texture size.
34 | /// @see gtc_integer
35 | template
36 | GLM_FUNC_DECL genIUType log2(genIUType x);
37 |
38 | /// Returns a value equal to the nearest integer to x.
39 | /// The fraction 0.5 will round in a direction chosen by the
40 | /// implementation, presumably the direction that is fastest.
41 | ///
42 | /// @param x The values of the argument must be greater or equal to zero.
43 | /// @tparam T floating point scalar types.
44 | ///
45 | /// @see GLSL round man page
46 | /// @see gtc_integer
47 | template
48 | GLM_FUNC_DECL vec iround(vec const& x);
49 |
50 | /// Returns a value equal to the nearest integer to x.
51 | /// The fraction 0.5 will round in a direction chosen by the
52 | /// implementation, presumably the direction that is fastest.
53 | ///
54 | /// @param x The values of the argument must be greater or equal to zero.
55 | /// @tparam T floating point scalar types.
56 | ///
57 | /// @see GLSL round man page
58 | /// @see gtc_integer
59 | template
60 | GLM_FUNC_DECL vec uround(vec const& x);
61 |
62 | /// @}
63 | } //namespace glm
64 |
65 | #include "integer.inl"
66 |
--------------------------------------------------------------------------------
/include/glm/gtc/integer.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_integer
2 | /// @file glm/gtc/integer.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 | template
8 | struct compute_log2
9 | {
10 | GLM_FUNC_QUALIFIER static vec call(vec const& v)
11 | {
12 | //Equivalent to return findMSB(vec); but save one function call in ASM with VC
13 | //return findMSB(vec);
14 | return vec(detail::compute_findMSB_vec::call(v));
15 | }
16 | };
17 |
18 | # if GLM_HAS_BITSCAN_WINDOWS
19 | template
20 | struct compute_log2<4, int, Q, false, Aligned>
21 | {
22 | GLM_FUNC_QUALIFIER static vec<4, int, Q> call(vec<4, int, Q> const& v)
23 | {
24 | vec<4, int, Q> Result;
25 | _BitScanReverse(reinterpret_cast(&Result.x), v.x);
26 | _BitScanReverse(reinterpret_cast(&Result.y), v.y);
27 | _BitScanReverse(reinterpret_cast(&Result.z), v.z);
28 | _BitScanReverse(reinterpret_cast(&Result.w), v.w);
29 | return Result;
30 | }
31 | };
32 | # endif//GLM_HAS_BITSCAN_WINDOWS
33 | }//namespace detail
34 | template
35 | GLM_FUNC_QUALIFIER int iround(genType x)
36 | {
37 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'iround' only accept floating-point inputs");
38 | assert(static_cast(0.0) <= x);
39 |
40 | return static_cast(x + static_cast(0.5));
41 | }
42 |
43 | template
44 | GLM_FUNC_QUALIFIER vec iround(vec const& x)
45 | {
46 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'iround' only accept floating-point inputs");
47 | assert(all(lessThanEqual(vec(0), x)));
48 |
49 | return vec(x + static_cast(0.5));
50 | }
51 |
52 | template
53 | GLM_FUNC_QUALIFIER uint uround(genType x)
54 | {
55 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'uround' only accept floating-point inputs");
56 | assert(static_cast(0.0) <= x);
57 |
58 | return static_cast(x + static_cast(0.5));
59 | }
60 |
61 | template
62 | GLM_FUNC_QUALIFIER vec uround(vec const& x)
63 | {
64 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'uround' only accept floating-point inputs");
65 | assert(all(lessThanEqual(vec(0), x)));
66 |
67 | return vec(x + static_cast(0.5));
68 | }
69 | }//namespace glm
70 |
--------------------------------------------------------------------------------
/include/glm/gtc/matrix_access.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_matrix_access
2 | /// @file glm/gtc/matrix_access.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_matrix_access GLM_GTC_matrix_access
7 | /// @ingroup gtc
8 | ///
9 | /// Include to use the features of this extension.
10 | ///
11 | /// Defines functions to access rows or columns of a matrix easily.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../detail/setup.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTC_matrix_access extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtc_matrix_access
25 | /// @{
26 |
27 | /// Get a specific row of a matrix.
28 | /// @see gtc_matrix_access
29 | template
30 | GLM_FUNC_DECL typename genType::row_type row(
31 | genType const& m,
32 | length_t index);
33 |
34 | /// Set a specific row to a matrix.
35 | /// @see gtc_matrix_access
36 | template
37 | GLM_FUNC_DECL genType row(
38 | genType const& m,
39 | length_t index,
40 | typename genType::row_type const& x);
41 |
42 | /// Get a specific column of a matrix.
43 | /// @see gtc_matrix_access
44 | template
45 | GLM_FUNC_DECL typename genType::col_type column(
46 | genType const& m,
47 | length_t index);
48 |
49 | /// Set a specific column to a matrix.
50 | /// @see gtc_matrix_access
51 | template
52 | GLM_FUNC_DECL genType column(
53 | genType const& m,
54 | length_t index,
55 | typename genType::col_type const& x);
56 |
57 | /// @}
58 | }//namespace glm
59 |
60 | #include "matrix_access.inl"
61 |
--------------------------------------------------------------------------------
/include/glm/gtc/matrix_access.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_matrix_access
2 | /// @file glm/gtc/matrix_access.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER genType row
8 | (
9 | genType const& m,
10 | length_t index,
11 | typename genType::row_type const& x
12 | )
13 | {
14 | assert(index >= 0 && index < m[0].length());
15 |
16 | genType Result = m;
17 | for(length_t i = 0; i < m.length(); ++i)
18 | Result[i][index] = x[i];
19 | return Result;
20 | }
21 |
22 | template
23 | GLM_FUNC_QUALIFIER typename genType::row_type row
24 | (
25 | genType const& m,
26 | length_t index
27 | )
28 | {
29 | assert(index >= 0 && index < m[0].length());
30 |
31 | typename genType::row_type Result(0);
32 | for(length_t i = 0; i < m.length(); ++i)
33 | Result[i] = m[i][index];
34 | return Result;
35 | }
36 |
37 | template
38 | GLM_FUNC_QUALIFIER genType column
39 | (
40 | genType const& m,
41 | length_t index,
42 | typename genType::col_type const& x
43 | )
44 | {
45 | assert(index >= 0 && index < m.length());
46 |
47 | genType Result = m;
48 | Result[index] = x;
49 | return Result;
50 | }
51 |
52 | template
53 | GLM_FUNC_QUALIFIER typename genType::col_type column
54 | (
55 | genType const& m,
56 | length_t index
57 | )
58 | {
59 | assert(index >= 0 && index < m.length());
60 |
61 | return m[index];
62 | }
63 | }//namespace glm
64 |
--------------------------------------------------------------------------------
/include/glm/gtc/matrix_inverse.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_matrix_inverse
2 | /// @file glm/gtc/matrix_inverse.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse
7 | /// @ingroup gtc
8 | ///
9 | /// Include to use the features of this extension.
10 | ///
11 | /// Defines additional matrix inverting functions.
12 |
13 | #pragma once
14 |
15 | // Dependencies
16 | #include "../detail/setup.hpp"
17 | #include "../matrix.hpp"
18 | #include "../mat2x2.hpp"
19 | #include "../mat3x3.hpp"
20 | #include "../mat4x4.hpp"
21 |
22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
23 | # pragma message("GLM: GLM_GTC_matrix_inverse extension included")
24 | #endif
25 |
26 | namespace glm
27 | {
28 | /// @addtogroup gtc_matrix_inverse
29 | /// @{
30 |
31 | /// Fast matrix inverse for affine matrix.
32 | ///
33 | /// @param m Input matrix to invert.
34 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate.
35 | /// @see gtc_matrix_inverse
36 | template
37 | GLM_FUNC_DECL genType affineInverse(genType const& m);
38 |
39 | /// Compute the inverse transpose of a matrix.
40 | ///
41 | /// @param m Input matrix to invert transpose.
42 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate.
43 | /// @see gtc_matrix_inverse
44 | template
45 | GLM_FUNC_DECL genType inverseTranspose(genType const& m);
46 |
47 | /// @}
48 | }//namespace glm
49 |
50 | #include "matrix_inverse.inl"
51 |
--------------------------------------------------------------------------------
/include/glm/gtc/noise.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_noise
2 | /// @file glm/gtc/noise.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_noise GLM_GTC_noise
7 | /// @ingroup gtc
8 | ///
9 | /// Include to use the features of this extension.
10 | ///
11 | /// Defines 2D, 3D and 4D procedural noise functions
12 | /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
13 | /// https://github.com/ashima/webgl-noise
14 | /// Following Stefan Gustavson's paper "Simplex noise demystified":
15 | /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
16 |
17 | #pragma once
18 |
19 | // Dependencies
20 | #include "../detail/setup.hpp"
21 | #include "../detail/qualifier.hpp"
22 | #include "../detail/_noise.hpp"
23 | #include "../geometric.hpp"
24 | #include "../common.hpp"
25 | #include "../vector_relational.hpp"
26 | #include "../vec2.hpp"
27 | #include "../vec3.hpp"
28 | #include "../vec4.hpp"
29 |
30 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
31 | # pragma message("GLM: GLM_GTC_noise extension included")
32 | #endif
33 |
34 | namespace glm
35 | {
36 | /// @addtogroup gtc_noise
37 | /// @{
38 |
39 | /// Classic perlin noise.
40 | /// @see gtc_noise
41 | template
42 | GLM_FUNC_DECL T perlin(
43 | vec const& p);
44 |
45 | /// Periodic perlin noise.
46 | /// @see gtc_noise
47 | template
48 | GLM_FUNC_DECL T perlin(
49 | vec const& p,
50 | vec const& rep);
51 |
52 | /// Simplex noise.
53 | /// @see gtc_noise
54 | template
55 | GLM_FUNC_DECL T simplex(
56 | vec const& p);
57 |
58 | /// @}
59 | }//namespace glm
60 |
61 | #include "noise.inl"
62 |
--------------------------------------------------------------------------------
/include/glm/gtc/type_precision.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_swizzle
2 | /// @file glm/gtc/swizzle.inl
3 |
4 | namespace glm
5 | {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/include/glm/gtc/ulp.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_ulp
2 | /// @file glm/gtc/ulp.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_ulp GLM_GTC_ulp
7 | /// @ingroup gtc
8 | ///
9 | /// Include to use the features of this extension.
10 | ///
11 | /// Allow the measurement of the accuracy of a function against a reference
12 | /// implementation. This extension works on floating-point data and provide results
13 | /// in ULP.
14 |
15 | #pragma once
16 |
17 | // Dependencies
18 | #include "../detail/setup.hpp"
19 | #include "../detail/qualifier.hpp"
20 | #include "../detail/type_int.hpp"
21 | #include "../detail/compute_vector_relational.hpp"
22 |
23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
24 | # pragma message("GLM: GLM_GTC_ulp extension included")
25 | #endif
26 |
27 | namespace glm
28 | {
29 | /// @addtogroup gtc_ulp
30 | /// @{
31 |
32 | /// Return the next ULP value(s) after the input value(s).
33 | /// @see gtc_ulp
34 | template
35 | GLM_FUNC_DECL genType next_float(genType const& x);
36 |
37 | /// Return the previous ULP value(s) before the input value(s).
38 | /// @see gtc_ulp
39 | template
40 | GLM_FUNC_DECL genType prev_float(genType const& x);
41 |
42 | /// Return the value(s) ULP distance after the input value(s).
43 | /// @see gtc_ulp
44 | template
45 | GLM_FUNC_DECL genType next_float(genType const& x, uint const& Distance);
46 |
47 | /// Return the value(s) ULP distance before the input value(s).
48 | /// @see gtc_ulp
49 | template
50 | GLM_FUNC_DECL genType prev_float(genType const& x, uint const& Distance);
51 |
52 | /// Return the distance in the number of ULP between 2 scalars.
53 | /// @see gtc_ulp
54 | template
55 | GLM_FUNC_DECL uint float_distance(T const& x, T const& y);
56 |
57 | /// Return the distance in the number of ULP between 2 vectors.
58 | /// @see gtc_ulp
59 | template
60 | GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const& x, vec<2, T, Q> const& y);
61 |
62 | /// @}
63 | }// namespace glm
64 |
65 | #include "ulp.inl"
66 |
--------------------------------------------------------------------------------
/include/glm/gtc/vec1.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_vec1
2 | /// @file glm/gtc/vec1.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_vec1 GLM_GTC_vec1
7 | /// @ingroup gtc
8 | ///
9 | /// Include to use the features of this extension.
10 | ///
11 | /// Add vec1, ivec1, uvec1 and bvec1 types.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../ext/vec1.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTC_vec1 extension included")
20 | #endif
21 |
22 | #include "vec1.inl"
23 |
--------------------------------------------------------------------------------
/include/glm/gtc/vec1.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_vec1
2 | /// @file glm/gtc/vec1.inl
3 |
--------------------------------------------------------------------------------
/include/glm/gtx/bit.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_bit
2 | /// @file glm/gtx/bit.inl
3 |
4 | namespace glm
5 | {
6 | ///////////////////
7 | // highestBitValue
8 |
9 | template
10 | GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value)
11 | {
12 | genIUType tmp = Value;
13 | genIUType result = genIUType(0);
14 | while(tmp)
15 | {
16 | result = (tmp & (~tmp + 1)); // grab lowest bit
17 | tmp &= ~result; // clear lowest bit
18 | }
19 | return result;
20 | }
21 |
22 | template
23 | GLM_FUNC_QUALIFIER vec highestBitValue(vec const& v)
24 | {
25 | return detail::functor1::call(highestBitValue, v);
26 | }
27 |
28 | ///////////////////
29 | // lowestBitValue
30 |
31 | template
32 | GLM_FUNC_QUALIFIER genIUType lowestBitValue(genIUType Value)
33 | {
34 | return (Value & (~Value + 1));
35 | }
36 |
37 | template
38 | GLM_FUNC_QUALIFIER vec lowestBitValue(vec const& v)
39 | {
40 | return detail::functor1::call(lowestBitValue, v);
41 | }
42 |
43 | ///////////////////
44 | // powerOfTwoAbove
45 |
46 | template
47 | GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType value)
48 | {
49 | return isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
50 | }
51 |
52 | template
53 | GLM_FUNC_QUALIFIER vec powerOfTwoAbove(vec const& v)
54 | {
55 | return detail::functor1::call(powerOfTwoAbove, v);
56 | }
57 |
58 | ///////////////////
59 | // powerOfTwoBelow
60 |
61 | template
62 | GLM_FUNC_QUALIFIER genType powerOfTwoBelow(genType value)
63 | {
64 | return isPowerOfTwo(value) ? value : highestBitValue(value);
65 | }
66 |
67 | template
68 | GLM_FUNC_QUALIFIER vec powerOfTwoBelow(vec const& v)
69 | {
70 | return detail::functor1::call(powerOfTwoBelow, v);
71 | }
72 |
73 | /////////////////////
74 | // powerOfTwoNearest
75 |
76 | template
77 | GLM_FUNC_QUALIFIER genType powerOfTwoNearest(genType value)
78 | {
79 | if(isPowerOfTwo(value))
80 | return value;
81 |
82 | genType const prev = highestBitValue(value);
83 | genType const next = prev << 1;
84 | return (next - value) < (value - prev) ? next : prev;
85 | }
86 |
87 | template