├── .gitattributes ├── .gitignore ├── Docs ├── AnselHack.md ├── CameraTransform.md └── README.md ├── LICENSE ├── LaunchOpenGameCamera ├── App.config ├── App.xaml ├── App.xaml.cs ├── BuildTimestamp.txt ├── Fonts │ └── Poppins-Medium.ttf ├── LaunchOpenGameCamera.csproj ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ └── favicon.ico └── Themes │ ├── DarkTheme.xaml │ └── DarkTheme.xaml.cs ├── OpenGameCamera.sln ├── OpenGameCamera ├── BasicTypes.hpp ├── Candy.hpp ├── Debug │ ├── OpenGameCamera.log │ ├── OpenGameCamera.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── OpenGameCamera.lastbuildstate │ │ └── unsuccessfulbuild │ ├── vc142.idb │ └── vc142.pdb ├── Globals.cpp ├── Globals.hpp ├── MouseManager.hpp ├── OpenGameCamera.vcxproj ├── OpenGameCamera.vcxproj.filters ├── OpenGameCamera.vcxproj.user ├── Release │ ├── OpenGameCamera.log │ ├── OpenGameCamera.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── OpenGameCamera.lastbuildstate │ │ └── unsuccessfulbuild │ └── vc142.pdb ├── SigScan │ ├── SigScan.cpp │ ├── SigScan.h │ └── StaticOffsets.h ├── Source.cpp ├── Typedefs.hpp ├── camerawindow.cpp ├── camerawindow.h ├── customdraw.cpp ├── customdraw.h ├── dofwindow.cpp ├── dofwindow.h ├── fonts │ └── Poppins-Medium.cpp ├── imgui │ ├── .editorconfig │ ├── .gitattributes │ ├── .github │ │ ├── issue_template.md │ │ ├── pull_request_template.md │ │ └── workflows │ │ │ └── build.yml │ ├── .gitignore │ ├── LICENSE.txt │ ├── docs │ │ ├── CHANGELOG.txt │ │ ├── FAQ.md │ │ ├── FONTS.md │ │ ├── README.md │ │ └── TODO.txt │ ├── examples │ │ ├── README.txt │ │ ├── example_allegro5 │ │ │ ├── README.md │ │ │ ├── example_allegro5.vcxproj │ │ │ ├── example_allegro5.vcxproj.filters │ │ │ ├── imconfig_allegro5.h │ │ │ └── main.cpp │ │ ├── example_apple_metal │ │ │ ├── README.md │ │ │ ├── Shared │ │ │ │ ├── AppDelegate.h │ │ │ │ ├── AppDelegate.m │ │ │ │ ├── Renderer.h │ │ │ │ ├── Renderer.mm │ │ │ │ ├── ViewController.h │ │ │ │ ├── ViewController.mm │ │ │ │ └── main.m │ │ │ ├── example_apple_metal.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ ├── iOS │ │ │ │ ├── Base.lproj │ │ │ │ │ └── Main.storyboard │ │ │ │ ├── Default-568h@2x.png │ │ │ │ ├── Info-iOS.plist │ │ │ │ └── Launch Screen.storyboard │ │ │ └── macOS │ │ │ │ ├── Base.lproj │ │ │ │ └── Main.storyboard │ │ │ │ └── Info-macOS.plist │ │ ├── example_apple_opengl2 │ │ │ ├── example_apple_opengl2.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ └── main.mm │ │ ├── example_emscripten │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── main.cpp │ │ │ └── shell_minimal.html │ │ ├── example_glfw_metal │ │ │ ├── Makefile │ │ │ └── main.mm │ │ ├── example_glfw_opengl2 │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ ├── example_glfw_opengl2.vcxproj │ │ │ ├── example_glfw_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_opengl3 │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ ├── example_glfw_opengl3.vcxproj │ │ │ ├── example_glfw_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_glfw_vulkan │ │ │ ├── CMakeLists.txt │ │ │ ├── build_win32.bat │ │ │ ├── build_win64.bat │ │ │ ├── example_glfw_vulkan.vcxproj │ │ │ ├── example_glfw_vulkan.vcxproj.filters │ │ │ ├── gen_spv.sh │ │ │ ├── glsl_shader.frag │ │ │ ├── glsl_shader.vert │ │ │ └── main.cpp │ │ ├── example_glut_opengl2 │ │ │ ├── Makefile │ │ │ ├── example_glut_opengl2.vcxproj │ │ │ ├── example_glut_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_marmalade │ │ │ ├── data │ │ │ │ └── app.icf │ │ │ ├── main.cpp │ │ │ └── marmalade_example.mkb │ │ ├── example_null │ │ │ ├── Makefile │ │ │ ├── build_win32.bat │ │ │ └── main.cpp │ │ ├── example_sdl_directx11 │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl_directx11.vcxproj │ │ │ ├── example_sdl_directx11.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl_metal │ │ │ ├── Makefile │ │ │ └── main.mm │ │ ├── example_sdl_opengl2 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl_opengl2.vcxproj │ │ │ ├── example_sdl_opengl2.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl_opengl3 │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── build_win32.bat │ │ │ ├── example_sdl_opengl3.vcxproj │ │ │ ├── example_sdl_opengl3.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_sdl_vulkan │ │ │ ├── example_sdl_vulkan.vcxproj │ │ │ ├── example_sdl_vulkan.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx10 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx10.vcxproj │ │ │ ├── example_win32_directx10.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx11 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx11.vcxproj │ │ │ ├── example_win32_directx11.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx12 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx12.vcxproj │ │ │ ├── example_win32_directx12.vcxproj.filters │ │ │ └── main.cpp │ │ ├── example_win32_directx9 │ │ │ ├── build_win32.bat │ │ │ ├── example_win32_directx9.vcxproj │ │ │ ├── example_win32_directx9.vcxproj.filters │ │ │ └── main.cpp │ │ ├── imgui_examples.sln │ │ ├── imgui_impl_allegro5.cpp │ │ ├── imgui_impl_allegro5.h │ │ ├── imgui_impl_dx10.cpp │ │ ├── imgui_impl_dx10.h │ │ ├── imgui_impl_dx11.cpp │ │ ├── imgui_impl_dx11.h │ │ ├── imgui_impl_dx12.cpp │ │ ├── imgui_impl_dx12.h │ │ ├── imgui_impl_dx9.cpp │ │ ├── imgui_impl_dx9.h │ │ ├── imgui_impl_glfw.cpp │ │ ├── imgui_impl_glfw.h │ │ ├── imgui_impl_glut.cpp │ │ ├── imgui_impl_glut.h │ │ ├── imgui_impl_marmalade.cpp │ │ ├── imgui_impl_marmalade.h │ │ ├── imgui_impl_metal.h │ │ ├── imgui_impl_metal.mm │ │ ├── imgui_impl_opengl2.cpp │ │ ├── imgui_impl_opengl2.h │ │ ├── imgui_impl_opengl3.cpp │ │ ├── imgui_impl_opengl3.h │ │ ├── imgui_impl_osx.h │ │ ├── imgui_impl_osx.mm │ │ ├── imgui_impl_sdl.cpp │ │ ├── imgui_impl_sdl.h │ │ ├── imgui_impl_vulkan.cpp │ │ ├── imgui_impl_vulkan.h │ │ ├── imgui_impl_win32.cpp │ │ ├── imgui_impl_win32.h │ │ └── libs │ │ │ ├── gl3w │ │ │ └── GL │ │ │ │ ├── gl3w.c │ │ │ │ ├── gl3w.h │ │ │ │ └── glcorearb.h │ │ │ ├── glfw │ │ │ ├── COPYING.txt │ │ │ └── include │ │ │ │ └── GLFW │ │ │ │ ├── glfw3.h │ │ │ │ └── glfw3native.h │ │ │ └── usynergy │ │ │ ├── README.txt │ │ │ ├── uSynergy.c │ │ │ └── uSynergy.h │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_internal.h │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ ├── imstb_truetype.h │ └── misc │ │ ├── README.txt │ │ ├── cpp │ │ ├── README.txt │ │ ├── imgui_stdlib.cpp │ │ └── imgui_stdlib.h │ │ ├── fonts │ │ ├── Cousine-Regular.ttf │ │ ├── DroidSans.ttf │ │ ├── Karla-Regular.ttf │ │ ├── ProggyClean.ttf │ │ ├── ProggyTiny.ttf │ │ ├── Roboto-Medium.ttf │ │ └── binary_to_compressed_c.cpp │ │ ├── freetype │ │ ├── README.md │ │ ├── imgui_freetype.cpp │ │ └── imgui_freetype.h │ │ ├── natvis │ │ ├── README.txt │ │ └── imgui.natvis │ │ └── single_file │ │ └── imgui_single_file.h ├── mainwindow.cpp ├── mainwindow.h ├── matchinfowindow.cpp ├── matchinfowindow.h ├── minhook │ ├── MinHook.h │ ├── buffer.c │ ├── buffer.h │ ├── hde │ │ ├── hde32.c │ │ ├── hde32.h │ │ ├── hde64.c │ │ ├── hde64.h │ │ ├── pstdint.h │ │ ├── table32.h │ │ └── table64.h │ ├── hook.c │ ├── trampoline.c │ └── trampoline.h ├── postwindow.cpp ├── postwindow.h ├── renderer.cpp ├── renderer.h ├── sdk.hpp ├── window.cpp └── window.h └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # User settings 30 | *.user 31 | 32 | # Executables 33 | *.exe 34 | *.out 35 | *.app 36 | *.aps 37 | 38 | # OpenGameCamera build directories 39 | .vs/ 40 | x64/ 41 | OpenGameCamera/x64 42 | LaunchOpenGameCamera/bin/ 43 | LaunchOpenGameCamera/obj/ 44 | LaunchOpenGameCamera/BuildTimestamp.txt -------------------------------------------------------------------------------- /Docs/CameraTransform.md: -------------------------------------------------------------------------------- 1 | # Camera Transform 2 | 3 | So the camera matrix is a 4x4 array of floats, that describes the current camera location, pitch, yaw, and roll. But it's not expressed in Euler angles, like you're probably used to seeing instead, it's formatted where the first row is a relative coordinate to where the camera is on the X axis in the game at +1 meters. The second row is the same for Y, third is the same for Z, and the fourth row is the absolute location for the camera in the world-space. So when it comes to writing these locations based on keyboard input, there's virtually no math involved. 4 | 5 | ![](https://i.imgur.com/mvpsJW8.png) 6 | 7 | All we have to do is take any given row, and multiply it by our movement modifier (so instead of 1 meter, change it to however many meters you want to move at once), then add it to our absolute camera location in game as a visual, ![](https://i.imgur.com/XlS6C7o.png) 8 | 9 | The second row is the height axis (y axis in world coordinates) 10 | since it shows the relative position of +1 meters in it's axis, this tells us that the camera is pretty much vertical. The x value is perfectly aligned, the y value isn't quite 1.0, so we're leaned towards the z axis a little bit, as shown in the z value of that vector hopefully this helps you understand how these camera matrixes work in game, and why it makes sense to use a system like this rather than a vector of it's location in combination of pitch/yaw/roll values. -------------------------------------------------------------------------------- /Docs/README.md: -------------------------------------------------------------------------------- 1 | # Explanations 2 | Guides from our _Explanations_ channel on Discord 3 | 4 | | File | Topic | 5 | | --- | --- | 6 | | [CameraTransform.md](https://github.com/coltonon/OpenGameCamera/blob/master/Docs/CameraTransform.md) | Breaking down how a LinearTransform works with in-game cameras | 7 | | [AnselHack.md](https://github.com/coltonon/OpenGameCamera/blob/master/Docs/AnselHack.md) | Reverse Engineering the distance limitations put on Ansel, and figuring out how to remove them | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 coltonon 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. -------------------------------------------------------------------------------- /LaunchOpenGameCamera/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace LaunchOpenGameCamera 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/BuildTimestamp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/LaunchOpenGameCamera/BuildTimestamp.txt -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Fonts/Poppins-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/LaunchOpenGameCamera/Fonts/Poppins-Medium.ttf -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("LaunchOpenGameCamera")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("LaunchOpenGameCamera")] 15 | [assembly: AssemblyCopyright("Copyright © 2020")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace OpenGameCamera.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenGameCamera.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace OpenGameCamera.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/LaunchOpenGameCamera/Resources/favicon.ico -------------------------------------------------------------------------------- /LaunchOpenGameCamera/Themes/DarkTheme.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Windows; 3 | 4 | namespace LaunchOpenGameCamera.Themes 5 | { 6 | public partial class DarkTheme 7 | { 8 | private void CloseWindow_Event(object sender, RoutedEventArgs e) 9 | { 10 | if (e.Source != null) 11 | try { CloseWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { } 12 | } 13 | private void AutoMinimize_Event(object sender, RoutedEventArgs e) 14 | { 15 | if (e.Source != null) 16 | try { MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)); } catch { } 17 | } 18 | private void Minimize_Event(object sender, RoutedEventArgs e) 19 | { 20 | if (e.Source != null) 21 | try { MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { } 22 | } 23 | 24 | public void CloseWind(Window window) { 25 | if (window.Title == "OpenGameCamera") { 26 | //Environment.Exit(0); 27 | //Process.GetCurrentProcess().Kill(); 28 | Application.Current.Shutdown(); 29 | } 30 | else window.Hide(); 31 | } 32 | 33 | public void MaximizeRestore(Window window) 34 | { 35 | if (window.WindowState == WindowState.Maximized) { 36 | window.WindowState = WindowState.Normal; 37 | } 38 | 39 | else if (window.WindowState == WindowState.Normal) { 40 | window.WindowState = WindowState.Maximized; 41 | } 42 | 43 | } 44 | 45 | public const string WrapperGridName = "WrapperGrid"; 46 | 47 | public void MinimizeWind(Window window) => window.WindowState = WindowState.Minimized; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /OpenGameCamera.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29411.108 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenGameCamera", "OpenGameCamera\OpenGameCamera.vcxproj", "{5851B990-B78F-4652-ABF9-4C0A8F3D5D41}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchOpenGameCamera", "LaunchOpenGameCamera\LaunchOpenGameCamera.csproj", "{BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41} = {5851B990-B78F-4652-ABF9-4C0A8F3D5D41} 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Debug|x64 = Debug|x64 17 | Debug|x86 = Debug|x86 18 | Release|Any CPU = Release|Any CPU 19 | Release|x64 = Release|x64 20 | Release|x86 = Release|x86 21 | EndGlobalSection 22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 23 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Debug|Any CPU.ActiveCfg = Release|x64 24 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Debug|Any CPU.Build.0 = Release|x64 25 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Debug|x64.ActiveCfg = Debug|x64 26 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Debug|x64.Build.0 = Debug|x64 27 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Debug|x86.ActiveCfg = Debug|Win32 28 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Debug|x86.Build.0 = Debug|Win32 29 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Release|Any CPU.ActiveCfg = Release|x64 30 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Release|Any CPU.Build.0 = Release|x64 31 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Release|x64.ActiveCfg = Release|x64 32 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Release|x64.Build.0 = Release|x64 33 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Release|x86.ActiveCfg = Release|Win32 34 | {5851B990-B78F-4652-ABF9-4C0A8F3D5D41}.Release|x86.Build.0 = Release|Win32 35 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Debug|Any CPU.ActiveCfg = Release|Any CPU 36 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Debug|Any CPU.Build.0 = Release|Any CPU 37 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Debug|x64.ActiveCfg = Debug|Any CPU 38 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Debug|x64.Build.0 = Debug|Any CPU 39 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Debug|x86.ActiveCfg = Debug|Any CPU 40 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Debug|x86.Build.0 = Debug|Any CPU 41 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Release|Any CPU.ActiveCfg = Release|Any CPU 42 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Release|Any CPU.Build.0 = Release|Any CPU 43 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Release|x64.ActiveCfg = Release|x64 44 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Release|x64.Build.0 = Release|x64 45 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Release|x86.ActiveCfg = Release|Any CPU 46 | {BEC8C38A-27FC-4AD0-A0E2-AB050BC36110}.Release|x86.Build.0 = Release|Any CPU 47 | EndGlobalSection 48 | GlobalSection(SolutionProperties) = preSolution 49 | HideSolutionNode = FALSE 50 | EndGlobalSection 51 | GlobalSection(ExtensibilityGlobals) = postSolution 52 | SolutionGuid = {91D5B50D-6E21-49C0-8B5A-D701AA9B7D41} 53 | EndGlobalSection 54 | EndGlobal 55 | -------------------------------------------------------------------------------- /OpenGameCamera/BasicTypes.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // this file serves to basically replace everything we'd need from DirectX 3 | 4 | // 32-bit color structure, broken down to RGBA 5 | struct Color32 { 6 | byte r; 7 | byte g; 8 | byte b; 9 | byte a; 10 | }; 11 | 12 | // basic Vector 2 13 | struct Vec2 { 14 | float x; 15 | float y; 16 | }; 17 | 18 | // basic Vector3 19 | struct Vec3 { 20 | float x; 21 | float y; 22 | float z; 23 | }; 24 | 25 | // Vector 4 26 | struct Vec4 { 27 | float x; 28 | float y; 29 | float z; 30 | float w; 31 | 32 | // we need multiplication, addition, and subtraction operators 33 | Vec4 operator* (float value) { 34 | return { this->x * value, this->y * value, this->z * value, this->w * value }; 35 | } 36 | Vec4 operator+ (Vec4 value) { 37 | return { this->x + value.x, this->y + value.y, this->z + value.z, this->w + value.w }; 38 | } 39 | Vec4 operator- (Vec4 value) { 40 | return { this->x - value.x, this->y - value.y, this->z - value.z, this->w - value.w }; 41 | } 42 | }; 43 | 44 | // a Matrix4x4, just 4 vector4s 45 | struct Matrix4x4 { 46 | Vec4 x; 47 | Vec4 y; 48 | Vec4 z; 49 | Vec4 o; 50 | }; -------------------------------------------------------------------------------- /OpenGameCamera/Candy.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "Typedefs.hpp" 5 | #include "minhook/MinHook.h" 6 | 7 | // candy is our hooking library, basically just a wrapper for MinHook 8 | class Candy { 9 | public: 10 | // templated function for VTAble Hooking, creds to Speedi 11 | template 12 | static void CreateVTableHook(void* pVTable, void* pHook, T& t, uint32_t iIndex) { 13 | DWORD64** ppVTable = (DWORD64**)pVTable; 14 | // get the VTable address, call VirtualProtect so we can write to it 15 | DWORD dwOld = 0; 16 | VirtualProtect((void*)((*ppVTable) + iIndex), sizeof(PDWORD64), PAGE_EXECUTE_READWRITE, &dwOld); 17 | // read the original pointer at our supplied index 18 | PBYTE pOrig = ((PBYTE)(*ppVTable)[iIndex]); 19 | // change the pointer to whatever we wanteded it to be 20 | (*ppVTable)[iIndex] = (DWORD64)pHook; 21 | // set the protection status back to how it was before 22 | VirtualProtect((void*)((*ppVTable) + iIndex), sizeof(PDWORD64), dwOld, &dwOld); 23 | // cast the original function pointer to our templated typedef 24 | t = (T)pOrig; 25 | } 26 | 27 | // create a standard hook 28 | static void CreateHook(DWORD64 address, void* pHook, void* original) { 29 | // if this is the first hook, initialize minhook 30 | static bool firstTime = true; 31 | if (firstTime) { 32 | MH_Initialize(); 33 | } 34 | // then create the hook, and enable it 35 | MH_CreateHook((LPVOID)address, pHook, (LPVOID*)original); 36 | MH_EnableHook((LPVOID)address); 37 | } 38 | static void DestroyHook(DWORD64 address) { 39 | MH_DisableHook((LPVOID)address); 40 | MH_RemoveHook((LPVOID)address); 41 | } 42 | }; 43 | 44 | 45 | 46 | //template void Candy::CreateVTableHook(void*, void*, tEndFrame&, uint32_t); 47 | -------------------------------------------------------------------------------- /OpenGameCamera/Debug/OpenGameCamera.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Debug/OpenGameCamera.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /OpenGameCamera/Debug/OpenGameCamera.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Debug/OpenGameCamera.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /OpenGameCamera/Debug/OpenGameCamera.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Debug/OpenGameCamera.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /OpenGameCamera/Debug/OpenGameCamera.tlog/OpenGameCamera.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0 2 | Debug|Win32|D:\Downloads\OpenGameCamera-master (11)\OpenGameCamera-master\| 3 | -------------------------------------------------------------------------------- /OpenGameCamera/Debug/OpenGameCamera.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Debug/OpenGameCamera.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /OpenGameCamera/Debug/vc142.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Debug/vc142.idb -------------------------------------------------------------------------------- /OpenGameCamera/Debug/vc142.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Debug/vc142.pdb -------------------------------------------------------------------------------- /OpenGameCamera/Globals.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include "BasicTypes.hpp" 6 | // keyboard manager 7 | 8 | // config data. Change in Globals.cpp if you want different defaults 9 | class Settings { 10 | public: 11 | static bool updateMouseState; 12 | static bool informationMenu; 13 | static bool enableFreeCam; 14 | static bool disableUi; 15 | static bool homeMenu; 16 | static bool cameraMenu; 17 | static bool dofMenu; 18 | static bool postMenu; 19 | static bool matchInfoMenu; 20 | // Camera Settings 21 | static bool forceEv; 22 | static float evControl; 23 | static float camSens; 24 | static bool lockFreeCam; 25 | static float fov; 26 | static float resScale; 27 | static bool enableResScale; 28 | static float mainSpeed; 29 | static float slowSpeed; 30 | static float fastSpeed; 31 | static float mouseSensitivity; 32 | static bool freezeTime; 33 | static float timeScale; 34 | static bool freezePlayer; 35 | static bool ssrEnable; 36 | static bool ssrFullResEnable; 37 | // DOF Settings 38 | static bool enableDof; 39 | static float focusDistance; 40 | static bool spriteHalfResolution; 41 | static float dofBlurMax; 42 | static float dofFarStart; 43 | static float dofFarEnd; 44 | static bool dofEnableForeground; 45 | static float dofNearStart; 46 | static float dofNearEnd; 47 | // Post Process Settings 48 | static bool enablePost; 49 | static bool forceBloomEnable; 50 | static bool VignetteEnable; 51 | static bool enableGrading; 52 | static bool FilmGrainEnable; 53 | static bool ChromaticAberrationAllowed; 54 | static bool LensDistortionAllowed; 55 | }; 56 | 57 | // a key definition. Has the name of the key, and it's keycode 58 | struct KeyDef { 59 | std::string name; 60 | unsigned int keyCode; 61 | }; 62 | 63 | // static key definitions, for preset keys we'll need 64 | class Keys { 65 | public: 66 | static KeyDef showMenuKey; 67 | static KeyDef enableFreeCam; 68 | static KeyDef freezePlayer; 69 | static KeyDef recordCameraTrack; 70 | static KeyDef speedUpCamera; 71 | static KeyDef slowDownCamera; 72 | static KeyDef cameraForward; 73 | static KeyDef cameraBack; 74 | static KeyDef cameraLeft; 75 | static KeyDef cameraRight; 76 | static KeyDef cameraUp; 77 | static KeyDef cameraDown; 78 | static KeyDef disableUi; 79 | static KeyDef freezeTime; 80 | static KeyDef fovIncrease; 81 | static KeyDef fovDecrease; 82 | static KeyDef enableResScale; 83 | static KeyDef enableDof; 84 | static KeyDef resetSettingsMenus; 85 | }; 86 | 87 | 88 | // Globals class, for reading keystates 89 | class Globals { 90 | private: 91 | 92 | // the last time a key was clicked 93 | static time_t lastTime; 94 | 95 | // check if the window is active 96 | static bool isWindowActive(); 97 | 98 | // function for getting the current game's window 99 | static BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam); 100 | public: 101 | static Vec4 g_CameraPosition; 102 | 103 | // read key with a minimum time between keypresses 104 | static bool ReadKeyOnce(unsigned int keyCode, unsigned int timer = 250); 105 | static bool ReadKeyOnce(KeyDef keyDef, unsigned int timer = 250); 106 | 107 | // read a key without the time delay 108 | static bool ReadKey(unsigned int keyCode); 109 | static bool ReadKey(KeyDef keyDef); 110 | 111 | // require the game window to be in the foreground 112 | static bool requireActive; 113 | 114 | // handle to the game window 115 | static HWND windowHandle; 116 | }; -------------------------------------------------------------------------------- /OpenGameCamera/MouseManager.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // code to manage our mouse hook, and set the mouse state 4 | 5 | class MouseManager { 6 | public: 7 | // arg 2 of the hooked function 8 | class MouseStateObject { 9 | public: 10 | char pad[8]; 11 | DWORD value; 12 | }; 13 | // typdef it 14 | typedef void(*__fastcall tSetMouseState)(__int64, MouseStateObject*); 15 | static tSetMouseState oSetMouseState; 16 | 17 | // we need to hook it to steal arg1 18 | static void __fastcall hkSetMouseState(__int64 a1, MouseStateObject* a2) 19 | { 20 | // set our arg1, then return the original 21 | MouseManager::arg1 = a1; 22 | oSetMouseState(a1, a2); 23 | } 24 | // the argument wee need to steal 25 | static __int64 arg1; 26 | public: 27 | // set the mouse state 28 | static bool SetMouseState(bool enableMouse) { 29 | // if arg 1 hasn't been stolen yet because the function hasn't been called, return false 30 | if (MouseManager::arg1 == NULL) return false; 31 | 32 | // setup our object 33 | MouseStateObject mso; 34 | 35 | // the two different mouse states, I pulled them from IDA 36 | const DWORD DISABLEMOUSE = 3652316602; 37 | const DWORD ENABLEMOUSE = 3325954792; 38 | 39 | // set the mouse state accordingly 40 | mso.value = enableMouse ? ENABLEMOUSE : DISABLEMOUSE; 41 | 42 | // call the original function for setting mouse state, then return true 43 | oSetMouseState(MouseManager::arg1, &mso); 44 | return true; 45 | } 46 | }; 47 | 48 | // make our arg NULL by default 49 | __int64 MouseManager::arg1 = NULL; 50 | MouseManager::tSetMouseState MouseManager::oSetMouseState = nullptr; -------------------------------------------------------------------------------- /OpenGameCamera/OpenGameCamera.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OpenGameCamera/Release/OpenGameCamera.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Release/OpenGameCamera.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /OpenGameCamera/Release/OpenGameCamera.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Release/OpenGameCamera.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /OpenGameCamera/Release/OpenGameCamera.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Release/OpenGameCamera.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /OpenGameCamera/Release/OpenGameCamera.tlog/OpenGameCamera.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0 2 | Release|Win32|D:\Downloads\OpenGameCamera-master (11)\OpenGameCamera-master\| 3 | -------------------------------------------------------------------------------- /OpenGameCamera/Release/OpenGameCamera.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Release/OpenGameCamera.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /OpenGameCamera/Release/vc142.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/Release/vc142.pdb -------------------------------------------------------------------------------- /OpenGameCamera/SigScan/SigScan.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | enum class PatternType 9 | { 10 | Address, 11 | Pointer, 12 | PointerBYTE, 13 | PointerWORD, 14 | PointerDWORD, 15 | PointerQWORD, 16 | RelativePointer, 17 | RelativePointerBYTE, 18 | RelativePointerWORD, 19 | RelativePointerDWORD, 20 | RelativePointerQWORD, 21 | }; 22 | 23 | typedef struct 24 | { 25 | const char *pattern; 26 | PatternType type; 27 | } Pattern; 28 | 29 | #ifdef _WIN64 30 | typedef DWORD64 XWORD; 31 | #else 32 | typedef DWORD XWORD 33 | #endif 34 | 35 | class PatternScanner 36 | { 37 | private: 38 | template static ret ResolveRelativePtr(void *Address) 39 | { 40 | if (!Address) 41 | return NULL; 42 | 43 | T offset = *(T*)Address; 44 | if (!offset) 45 | return NULL; 46 | 47 | return (ret)((XWORD)Address + offset + sizeof(T)); 48 | } 49 | 50 | template static void *ResolveRelativePtr(void *Address) 51 | { 52 | return ResolveRelativePtr(Address); 53 | } 54 | 55 | template static ret ResolvePtr(void *Address) 56 | { 57 | if (!Address) 58 | return NULL; 59 | 60 | return (ret)*(T*)Address; 61 | } 62 | 63 | template static void *ResolvePtr(void *Address) 64 | { 65 | return ResolvePtr(Address); 66 | } 67 | 68 | public: 69 | static void *FindPattern(void *startAddress, DWORD searchSize, const Pattern &pattern); 70 | static void *FindPattern(const std::string &ModuleName, const Pattern &pattern); 71 | static void *FindPattern(const Pattern &pattern); 72 | 73 | static std::vector FindPatterns(const std::string &ModuleName, const Pattern &pattern); 74 | static std::vector FindPatterns(void *startAddress, DWORD searchSize, const Pattern &pattern); 75 | 76 | static void *FindPattern(void *startAddress, DWORD searchSize, Pattern *patterns, float *ratio = nullptr); 77 | static void *FindPattern(const std::string &ModuleName, Pattern *patterns, float *ratio = nullptr); 78 | }; -------------------------------------------------------------------------------- /OpenGameCamera/SigScan/StaticOffsets.h: -------------------------------------------------------------------------------- 1 | #include "SigScan.h" 2 | 3 | // macro for lazily adding signatures to this sig list 4 | #define AddOffset(name, pattern, type) \ 5 | static DWORD64 Get_## name () {\ 6 | static DWORD64 name = NULL;\ 7 | if (name != NULL) return name; \ 8 | return name=(DWORD64)PatternScanner::FindPattern({pattern, type});\ 9 | } 10 | 11 | // macro for lazily adding offsets to the sig list 12 | #define AddStaticOffset(name, off) \ 13 | static DWORD64 Get_## name () {\ 14 | static DWORD64 name = NULL;\ 15 | if (name != NULL) return name; \ 16 | return name=(DWORD64)off;\ 17 | } 18 | 19 | // same but to resolve a call (call func) 20 | #define AddFuncCall(name, pattern, type) \ 21 | static DWORD64 Get_## name () {\ 22 | static DWORD64 name = NULL;\ 23 | if (name != NULL) return name; \ 24 | DWORD64 val = (DWORD64)PatternScanner::FindPattern({pattern, type}); \ 25 | return name = val + 5 + (*(int*)(val + 1)); \ 26 | } 27 | 28 | 29 | class StaticOffsets { 30 | public: 31 | AddOffset(OFFSET_GAMERENDERER, "48 8B 0D [?? ?? ?? ?? 48 85 C9 74 0E 48 8B 01 48 8D 15 ?? ?? ??", PatternType::RelativePointer) 32 | AddOffset(OFFSET_FIRSTTYPEINFO, "48 8B 05 [?? ?? ?? ?? 48 89 41 08 48 89 0D ?? ?? ?? ??", PatternType::RelativePointer) 33 | AddOffset(OFFSET_DXRENDERER, "48 8B 0D [?? ?? ?? ?? 44 89 74 24 50 44 89 74", PatternType::RelativePointer) 34 | AddOffset(OFFSET_UISETTINGS, "48 89 05 [?? ?? ?? ?? 48 8B 48 28 E8 ?? ?? ?? ?? 41 0F B6 D4", PatternType::RelativePointer) 35 | AddOffset(OFFSET_GAMETIMESETTINGS, "48 89 05 [?? ?? ?? ?? C7 40 ?? ?? ?? ?? ?? 8B 43 18", PatternType::RelativePointer) 36 | // Just making this a static offset for now, can't find a stable sig for whatever reason. Game probably won't update so I don't think it matters. 37 | AddStaticOffset(OFFSET_CLIENTGAMECONTEXT, 0x143DD7948) 38 | //AddOffset(OFFSET_CLIENTGAMECONTEXT, "90 00 87 ?? ?? ?? ?? 00 90 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 80", PatternType::Address) 39 | AddOffset(OFFSET_INPUTSETTINGS, "48 89 05 [?? ?? ?? ?? 80 B8 A5 00 00 00 00 F3 0F 10 35 ?? ?? ?? ?? 74 ??", PatternType::RelativePointer) 40 | AddOffset(OFFSET_KEYBOARDUPDATE, "[48 89 5C 24 08 57 48 83 EC 20 89 D7 48 89 CB 4D 85 C0 75 ?? E8 ?? ?? ?? ?? 48 89 C1 E8 ?? ?? ?? ?? 49 89 C0 83 BB B8 00 00 00 00 75 ?? 49 8B 00 4C 89 C1 40 0F B6 D7 FF 50 30 84 C0 74 ?? B8 01 00 00 00", PatternType::Address) 41 | AddOffset(OFFSET_SETMOUSESTATE, "[40 53 48 83 EC 20 48 89 CB 48 8B 0D ?? ?? ?? ?? 48 85 C9 74 ?? 8B 42 08", PatternType::Address) 42 | AddOffset(OFFSET_POSTPROCESSSUB, "[41 8B 80 88 00 00 00 89 81 88 00 00 00 41 8B 80 8C 00 00 00 89 81 8C 00 00 00 41 0F B6 80 14 02 00 00", PatternType::Address) 43 | 44 | AddFuncCall(OFFSET_DEBUGRENDERER2, "[E8 ?? ?? ?? ?? 48 8B 97 30 79 00 00", PatternType::Address) 45 | AddFuncCall(OFFSET_DRAWLINE, "[E8 ?? ?? ?? ?? FF C3 8B 0D ?? ?? ?? ?? FF C9", PatternType::Address) 46 | AddFuncCall(OFFSET_DRAWRECT2D, "[E8 ?? ?? ?? ?? C7 87 ?? ?? 00 00 37", PatternType::Address) 47 | AddFuncCall(OFFSET_DRAWTEXT, "[E8 ?? ?? ?? ?? 83 C7 14 48 8D 76 04 4D 8D 76 08 49 83 ED 01", PatternType::Address) 48 | AddFuncCall(OFFSET_CAMERAHOOK2, "[E8 ?? ?? ?? ?? 4C 8B 4C 24 28 41 0F B6 41 07", PatternType::Address) 49 | }; 50 | 51 | // to-do: generate signatures for these 52 | 53 | //#define OFFSET_CLIENTGAMECONTEXT 0x143DD7948 54 | // 90 00 87 ?? ?? ?? ?? 00 90 ?? ?? ?? ?? 00 00 00 00 00 00 00 00 00 80 55 | 56 | //#define OFFSET_INPUTSETTINGS 0x14446D680 57 | // 48 89 05 [?? ?? ?? ?? 80 B8 A5 00 00 00 00 F3 0F 10 35 ?? ?? ?? ?? 74 ?? 58 | 59 | //#define OFFSET_CAMERAHOOK2 0x140ACBA20 60 | // E8 [?? ?? ?? ?? 48 03 DE 48 8B D3 48 8D 8D A0 2D 00 00 61 | 62 | //#define OFFSET_KEYBOARDUPDATE 0x146937FA0 63 | // [48 89 5C 24 08 57 48 83 EC 20 89 D7 48 89 CB 4D 85 C0 75 ?? E8 ?? ?? ?? ?? 48 89 C1 E8 ?? ?? ?? ?? 49 89 C0 83 BB B8 00 00 00 00 75 ?? 49 8B 00 4C 89 C1 40 0F B6 D7 FF 50 30 84 C0 74 ?? B0 01 64 | 65 | //#define OFFSET_SETMOUSESTATE 0x14753ED00 66 | // [53 48 83 EC 20 48 89 CB 48 8B 0D ?? ?? ?? ?? 48 85 C9 0F 84 67 | 68 | //#define OFFSET_POSTPROCESSSUB 0x142E93F40 69 | // [41 8B 80 88 00 00 00 89 81 88 00 00 00 41 8B 80 8C 00 00 00 89 81 8C 00 00 00 41 0F B6 80 14 02 00 00 70 | 71 | 72 | #undef AddFuncCall 73 | #undef AddOffset 74 | #undef AddStaticOffset -------------------------------------------------------------------------------- /OpenGameCamera/Typedefs.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | typedef DWORD64(__fastcall* tEndFrame)(void*, DWORD64 a2, bool presentEnable); 6 | tEndFrame oEndFrame = nullptr; 7 | 8 | typedef __int64(*__fastcall tupdateCamera2)(class CameraObject*, class CameraObject*); 9 | tupdateCamera2 oupdateCamera2 = nullptr; 10 | 11 | typedef bool(*__fastcall tkeyboardUpdate)(__int64, unsigned __int8, __int64); 12 | tkeyboardUpdate okeyboardUpdate = nullptr; -------------------------------------------------------------------------------- /OpenGameCamera/camerawindow.cpp: -------------------------------------------------------------------------------- 1 | #define NOMINMAX 2 | #include "camerawindow.h" 3 | #include 4 | #include 5 | 6 | CameraWindow::CameraWindow() 7 | { 8 | printf("Initializing CameraWindow\n"); 9 | } 10 | 11 | bool CameraWindow::IsEnabled() 12 | { 13 | return Settings::homeMenu && Settings::cameraMenu; 14 | } 15 | 16 | void CameraWindow::SetEnabled(bool enabled) 17 | { 18 | Settings::cameraMenu = enabled; 19 | } 20 | 21 | void CameraWindow::Draw() 22 | { 23 | ImGui::Begin("Camera", NULL, ImGuiWindowFlags_AlwaysAutoResize); 24 | ImGui::Checkbox(std::string("Freeze Time [" + Keys::freezeTime.name + "]").c_str(), &Settings::freezeTime); 25 | ImGui::Checkbox(std::string("Freeze Player [" + Keys::freezePlayer.name + "]").c_str(), &Settings::freezePlayer); 26 | ImGui::Checkbox("Lock FreeCam Location", &Settings::lockFreeCam); 27 | ImGui::SliderFloat(std::string("FOV [" + Keys::fovDecrease.name + "] [" + Keys::fovIncrease.name + "]").c_str(), &Settings::fov, 0, 265, "%.3f", 1.0F); // Real max is 180, but forced it can go up to 265 before everything breaks and goes upside-down 28 | ImGui::SliderFloat(std::string("FreeCam Sensitivity").c_str(), &Settings::camSens, 0, 5, "%.3f", 1.0F); 29 | ImGui::SliderFloat("Time scale", &Settings::timeScale, 0.1, 1.f, "%.3f", 1.0F); 30 | ImGui::Checkbox("Force Exposure", &Settings::forceEv); 31 | ImGui::SliderFloat("Exposure Value", &Settings::evControl, 0, 18, "%.3f", 1.0F); 32 | ImGui::Checkbox("SSR Enable", &Settings::ssrEnable); 33 | ImGui::Checkbox("SSR Full Res Enable", &Settings::ssrFullResEnable); 34 | ImGui::Checkbox(std::string("Enable Resolution Scale [" + Keys::enableResScale.name + "]").c_str(), &Settings::enableResScale); 35 | ImGui::InputFloat("Resolution Scale", &Settings::resScale, 1.f, 0.25f, "%.3f", 1.0F); 36 | Settings::resScale = std::min(5.f, std::max(0.25f, Settings::resScale)); 37 | ImGui::End(); 38 | } -------------------------------------------------------------------------------- /OpenGameCamera/camerawindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "window.h" 4 | 5 | class CameraWindow : public Window 6 | { 7 | public: 8 | CameraWindow(); 9 | ~CameraWindow(); 10 | void Draw() override; 11 | bool IsEnabled() override; 12 | void SetEnabled(bool enabled) override; 13 | }; 14 | -------------------------------------------------------------------------------- /OpenGameCamera/customdraw.cpp: -------------------------------------------------------------------------------- 1 | #include "customdraw.h" 2 | 3 | const ImGuiWindowFlags WINDOW_FLAGS = ImGuiWindowFlags_NoFocusOnAppearing | 4 | ImGuiWindowFlags_AlwaysAutoResize | 5 | ImGuiWindowFlags_NoSavedSettings | 6 | ImGuiWindowFlags_NoDecoration | 7 | ImGuiWindowFlags_NoMove | 8 | ImGuiWindowFlags_NoNav; 9 | 10 | const int CORNER = 0; /* 11 | 0 = Top left 12 | 1 = Top right 13 | 2 = Bottom left 14 | 3 = Bottom right 15 | */ 16 | 17 | const float DISTANCE_TO_CORNER = 15.0f; 18 | 19 | CustomDraw::CustomDraw() 20 | { 21 | printf("Initializing CustomDraw\n"); 22 | } 23 | 24 | Renderer::tCustomDrawCallback hkCallback = NULL; 25 | 26 | void CustomDraw::Setup(Renderer::tCustomDrawCallback callback) 27 | { 28 | hkCallback = callback; 29 | } 30 | 31 | bool CustomDraw::IsEnabled() 32 | { 33 | return true; 34 | } 35 | 36 | void CustomDraw::Draw() 37 | { 38 | ImGuiIO& io = ImGui::GetIO(); 39 | 40 | ImGui::SetNextWindowBgAlpha(0.45); // Make window background invisible. 41 | 42 | // Position the window. 43 | ImVec2 window_pos = ImVec2((CORNER & 1) ? io.DisplaySize.x - DISTANCE_TO_CORNER : DISTANCE_TO_CORNER, (CORNER & 2) ? io.DisplaySize.y - DISTANCE_TO_CORNER : DISTANCE_TO_CORNER); 44 | ImVec2 window_pos_pivot = ImVec2((CORNER & 1) ? 1.0f : 0.0f, (CORNER & 2) ? 1.0f : 0.0f); 45 | ImGui::SetNextWindowPos(window_pos, ImGuiCond_Always, window_pos_pivot); 46 | 47 | if (Settings::informationMenu) { 48 | ImGui::Begin("Information", reinterpret_cast(true), WINDOW_FLAGS); 49 | { 50 | hkCallback(); 51 | ImGui::End(); 52 | } 53 | } 54 | else { 55 | hkCallback(); 56 | } 57 | } -------------------------------------------------------------------------------- /OpenGameCamera/customdraw.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "window.h" 4 | #include "renderer.h" 5 | 6 | class CustomDraw : public Window 7 | { 8 | public: 9 | CustomDraw(); 10 | ~CustomDraw(); 11 | void Setup(Renderer::tCustomDrawCallback callback); 12 | void Draw() override; 13 | bool IsEnabled() override; 14 | }; 15 | -------------------------------------------------------------------------------- /OpenGameCamera/dofwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "dofwindow.h" 2 | #include 3 | 4 | DofWindow::DofWindow() 5 | { 6 | printf("Initializing DofWindow\n"); 7 | } 8 | 9 | bool DofWindow::IsEnabled() 10 | { 11 | return Settings::homeMenu && Settings::dofMenu; 12 | } 13 | 14 | void DofWindow::SetEnabled(bool enabled) 15 | { 16 | Settings::dofMenu = enabled; 17 | } 18 | 19 | void DofWindow::Draw() 20 | { 21 | ImGui::Begin("Depth of Field", NULL, ImGuiWindowFlags_AlwaysAutoResize); 22 | ImGui::Checkbox(std::string("Enable Depth of Field [" + Keys::enableDof.name + "]").c_str(), &Settings::enableDof); 23 | ImGui::Checkbox("Enable Foreground Blur", &Settings::dofEnableForeground); 24 | ImGui::Checkbox("Blur Half Resolution", &Settings::spriteHalfResolution); 25 | ImGui::SliderFloat("Max Blur", &Settings::dofBlurMax, 0, 6, "%.3f", 1.0F); 26 | ImGui::SliderFloat("Near Start", &Settings::dofNearStart, 0, 32, "%.3f", 1.0F); 27 | ImGui::SliderFloat("Near End", &Settings::dofNearEnd, 0, 32, "%.3f", 1.0F); 28 | ImGui::SliderFloat("Focus Distance", &Settings::focusDistance, 0, 128, "%.3f", 1.0F); 29 | ImGui::SliderFloat("Far Start", &Settings::dofFarStart, 0, 32, "%.3f", 1.0F); 30 | ImGui::SliderFloat("Far End", &Settings::dofFarEnd, 0, 32, "%.3f", 1.0F); 31 | ImGui::End(); 32 | } -------------------------------------------------------------------------------- /OpenGameCamera/dofwindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "window.h" 4 | 5 | class DofWindow : public Window 6 | { 7 | public: 8 | DofWindow(); 9 | ~DofWindow(); 10 | void Draw() override; 11 | bool IsEnabled() override; 12 | void SetEnabled(bool enabled) override; 13 | }; 14 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/.editorconfig: -------------------------------------------------------------------------------- 1 | # See http://editorconfig.org to read about the EditorConfig format. 2 | # - Automatically supported by VS2017+ and most common IDE or text editors. 3 | # - For older VS2010 to VS2015, install https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig 4 | 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | # Default settings: 9 | # Use 4 spaces as indentation 10 | [*] 11 | indent_style = space 12 | indent_size = 4 13 | insert_final_newline = true 14 | trim_trailing_whitespace = true 15 | 16 | [imstb_*] 17 | indent_size = 3 18 | trim_trailing_whitespace = false 19 | 20 | [Makefile] 21 | indent_style = tab 22 | indent_size = 4 23 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.c text 4 | *.cpp text 5 | *.h text 6 | *.m text 7 | *.mm text 8 | *.md text 9 | *.txt text 10 | *.html text 11 | *.bat text 12 | *.frag text 13 | *.vert text 14 | *.mkb text 15 | *.icf text 16 | 17 | *.sln text eol=crlf 18 | *.vcxproj text eol=crlf 19 | *.vcxproj.filters text eol=crlf 20 | *.natvis text eol=crlf 21 | 22 | Makefile text eol=lf 23 | *.sh text eol=lf 24 | *.pbxproj text eol=lf 25 | *.storyboard text eol=lf 26 | *.plist text eol=lf 27 | 28 | *.png binary 29 | *.ttf binary 30 | *.lib binary 31 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/.github/issue_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" above ^ to turn URL into clickable links) 2 | 3 | 1. PLEASE CAREFULLY READ: [FAQ](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md) 4 | 5 | 2. PLEASE CAREFULLY READ: [Issue Submitting Guidelines](https://github.com/ocornut/imgui/issues/2261) 6 | 7 | 3. FOR FIRST-TIME USERS ISSUES COMPILING/LINKING/RUNNING/LOADING FONTS, please use the [Discord server](http://discord.dearimgui.org). 8 | 9 | 4. PLEASE MAKE SURE that you have: read the FAQ; explored the contents of `ShowDemoWindow()` including the Examples menu; searched among Issues; used your IDE to search for keywords in all sources and text files; and read the link provided in (1) (2). 10 | 11 | 5. Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users. 12 | 13 | 6. Delete points 1-6 and PLEASE FILL THE TEMPLATE BELOW before submitting your issue. 14 | 15 | Thank you! 16 | 17 | ---- 18 | 19 | _(you may also go to Demo>About Window, and click "Config/Build Information" to obtain a bunch of detailed information that you can paste here)_ 20 | 21 | **Version/Branch of Dear ImGui:** 22 | 23 | Version: XXX 24 | Branch: XXX _(master/viewport/docking/etc.)_ 25 | 26 | **Back-end/Renderer/Compiler/OS** 27 | 28 | Back-ends: imgui_impl_XXX.cpp + imgui_impl_XXX.cpp _(or specify if using a custom engine/back-end)_ 29 | Compiler: XXX _(if the question is related to building or platform specific features)_ 30 | Operating System: XXX 31 | 32 | **My Issue/Question:** 33 | 34 | XXX _(please provide as much context as possible)_ 35 | 36 | **Screenshots/Video** 37 | 38 | XXX _(you can drag files here)_ 39 | 40 | **Standalone, minimal, complete and verifiable example:** _(see https://github.com/ocornut/imgui/issues/2261)_ 41 | ``` 42 | // Here's some code anyone can copy and paste to reproduce your issue 43 | ImGui::Begin("Example Bug"); 44 | MoreCodeToExplainMyIssue(); 45 | ImGui::End(); 46 | ``` 47 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" to turn any http URL into a clickable link) 2 | 3 | PLEASE CAREFULLY READ: 4 | https://github.com/ocornut/imgui/issues/2261 5 | 6 | (Clear this template before submitting your PR) 7 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/.gitignore: -------------------------------------------------------------------------------- 1 | ## OSX artifacts 2 | .DS_Store 3 | 4 | ## Dear ImGui artifacts 5 | imgui.ini 6 | 7 | ## General build artifacts 8 | *.o 9 | *.obj 10 | *.exe 11 | examples/build/* 12 | examples/*/Debug/* 13 | examples/*/Release/* 14 | examples/*/x64/* 15 | 16 | ## Visual Studio artifacts 17 | .vs 18 | ipch 19 | *.opensdf 20 | *.log 21 | *.pdb 22 | *.ilk 23 | *.user 24 | *.sdf 25 | *.suo 26 | *.VC.db 27 | *.VC.VC.opendb 28 | 29 | ## Xcode artifacts 30 | project.xcworkspace 31 | xcuserdata 32 | 33 | ## Emscripten artifacts 34 | examples/*.o.tmp 35 | examples/*.out.js 36 | examples/*.out.wasm 37 | examples/example_emscripten/example_emscripten.* 38 | 39 | ## JetBrains IDE artifacts 40 | .idea 41 | cmake-build-* 42 | 43 | ## Unix executables from our example Makefiles 44 | examples/example_glfw_opengl2/example_glfw_opengl2 45 | examples/example_glfw_opengl3/example_glfw_opengl3 46 | examples/example_glut_opengl2/example_glut_opengl2 47 | examples/example_null/example_null 48 | examples/example_sdl_opengl2/example_sdl_opengl2 49 | examples/example_sdl_opengl3/example_sdl_opengl3 50 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2020 Omar Cornut 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 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_allegro5/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Configuration 3 | 4 | Dear ImGui outputs 16-bit vertex indices by default. 5 | Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile dear imgui with 32-bit indices. 6 | You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename. 7 | We are providing `imconfig_allegro5.h` that enables 32-bit indices. 8 | Note that the back-end supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion. 9 | 10 | # How to Build 11 | 12 | ### On Ubuntu 14.04+ and macOS 13 | 14 | ```bash 15 | g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ../imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_main -lallegro_primitives -o allegro5_example 16 | ``` 17 | 18 | On macOS, install Allegro with homebrew: `brew install allegro`. 19 | 20 | ### On Windows with Visual Studio's CLI 21 | 22 | You may install Allegro using vcpkg: 23 | ``` 24 | git clone https://github.com/Microsoft/vcpkg 25 | cd vcpkg 26 | .\bootstrap-vcpkg.bat 27 | .\vcpkg install allegro5 28 | .\vcpkg integrate install ; optional, automatically register include/libs in Visual Studio 29 | ``` 30 | 31 | Build: 32 | ``` 33 | set ALLEGRODIR=path_to_your_allegro5_folder 34 | cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib 35 | ``` 36 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | 50 | 51 | 52 | sources 53 | 54 | 55 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_allegro5/imconfig_allegro5.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE 3 | // See imconfig.h for the full template 4 | // Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices 5 | //----------------------------------------------------------------------------- 6 | 7 | #pragma once 8 | 9 | // Use 32-bit vertex indices because Allegro doesn't support 16-bit ones 10 | // This allows us to avoid converting vertices format at runtime 11 | #define ImDrawIdx int 12 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/README.md: -------------------------------------------------------------------------------- 1 | # iOS / OSX Metal example 2 | 3 | ## Introduction 4 | 5 | This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9. 6 | 7 | (NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.) 8 | 9 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/Shared/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | 5 | #import 6 | 7 | @interface AppDelegate : UIResponder 8 | @property (strong, nonatomic) UIWindow *window; 9 | @end 10 | 11 | #else 12 | 13 | #import 14 | 15 | @interface AppDelegate : NSObject 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/Shared/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | @implementation AppDelegate 4 | 5 | #if TARGET_OS_OSX 6 | - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { 7 | return YES; 8 | } 9 | #endif 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/Shared/Renderer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Renderer : NSObject 4 | 5 | -(nonnull instancetype)initWithView:(nonnull MTKView *)view; 6 | 7 | @end 8 | 9 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/Shared/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "Renderer.h" 4 | 5 | #if TARGET_OS_IPHONE 6 | 7 | #import 8 | 9 | @interface ViewController : UIViewController 10 | @end 11 | 12 | #else 13 | 14 | #import 15 | 16 | @interface ViewController : NSViewController 17 | @end 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/Shared/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | 5 | #import 6 | #import "AppDelegate.h" 7 | 8 | int main(int argc, char * argv[]) { 9 | @autoreleasepool { 10 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 11 | } 12 | } 13 | 14 | #else 15 | 16 | #import 17 | 18 | int main(int argc, const char * argv[]) { 19 | return NSApplicationMain(argc, argv); 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/iOS/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/iOS/Info-iOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | imgui 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | Launch Screen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | metal 31 | 32 | UIRequiresFullScreen 33 | 34 | UIStatusBarHidden 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | UIInterfaceOrientationPortraitUpsideDown 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/iOS/Launch Screen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_apple_metal/macOS/Info-macOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | imgui 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2018 Warren Moore. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_emscripten/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to use with emscripten 3 | # See https://emscripten.org/docs/getting_started/downloads.html 4 | # for installation instructions. 5 | # 6 | # This Makefile assumes you have loaded emscripten's environment. 7 | # (On Windows, you may need to execute emsdk_env.bat or encmdprompt.bat ahead) 8 | # 9 | # Running `make` will produce three files: 10 | # - example_emscripten.html 11 | # - example_emscripten.js 12 | # - example_emscripten.wasm 13 | # 14 | # All three are needed to run the demo. 15 | 16 | CC = emcc 17 | CXX = em++ 18 | EXE = example_emscripten.html 19 | SOURCES = main.cpp 20 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp 21 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 22 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 23 | UNAME_S := $(shell uname -s) 24 | 25 | ##--------------------------------------------------------------------- 26 | ## EMSCRIPTEN OPTIONS 27 | ##--------------------------------------------------------------------- 28 | 29 | EMS += -s USE_SDL=2 -s WASM=1 30 | EMS += -s ALLOW_MEMORY_GROWTH=1 31 | EMS += -s DISABLE_EXCEPTION_CATCHING=1 -s NO_EXIT_RUNTIME=0 32 | EMS += -s ASSERTIONS=1 33 | 34 | # Uncomment next line to fix possible rendering bugs with Emscripten version older then 1.39.0 (https://github.com/ocornut/imgui/issues/2877) 35 | #EMS += -s BINARYEN_TRAP_MODE=clamp 36 | #EMS += -s SAFE_HEAP=1 ## Adds overhead 37 | 38 | # Emscripten allows preloading a file or folder to be accessible at runtime. 39 | # The Makefile for this example project suggests embedding the misc/fonts/ folder into our application, it will then be accessible as "/fonts" 40 | # See documentation for more details: https://emscripten.org/docs/porting/files/packaging_files.html 41 | # (Default value is 0. Set to 1 to enable file-system and include the misc/fonts/ folder as part of the build.) 42 | USE_FILE_SYSTEM ?= 0 43 | ifeq ($(USE_FILE_SYSTEM), 0) 44 | EMS += -s NO_FILESYSTEM=1 -DIMGUI_DISABLE_FILE_FUNCTIONS 45 | endif 46 | ifeq ($(USE_FILE_SYSTEM), 1) 47 | LDFLAGS += --no-heap-copy --preload-file ../../misc/fonts@/fonts 48 | endif 49 | 50 | ##--------------------------------------------------------------------- 51 | ## FINAL BUILD FLAGS 52 | ##--------------------------------------------------------------------- 53 | 54 | CPPFLAGS += -I../ -I../../ 55 | #CPPFLAGS += -g 56 | CPPFLAGS += -Wall -Wformat -Os 57 | CPPFLAGS += $(EMS) 58 | LIBS += $(EMS) 59 | LDFLAGS += --shell-file shell_minimal.html 60 | 61 | ##--------------------------------------------------------------------- 62 | ## BUILD RULES 63 | ##--------------------------------------------------------------------- 64 | 65 | %.o:%.cpp 66 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< 67 | 68 | %.o:../%.cpp 69 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< 70 | 71 | %.o:../../%.cpp 72 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< 73 | 74 | %.o:../libs/gl3w/GL/%.c 75 | $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< 76 | 77 | all: $(EXE) 78 | @echo Build complete for $(EXE) 79 | 80 | $(EXE): $(OBJS) 81 | $(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) 82 | 83 | clean: 84 | rm -f $(EXE) $(OBJS) *.js *.wasm *.wasm.pre 85 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_emscripten/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions 5 | 6 | - Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools. 7 | 8 | - Then build using `make` while in the `example_emscripten/` directory. 9 | 10 | - Note that Emscripten 1.39.0 (October 2019) obsoleted the `BINARYEN_TRAP_MODE=clamp` compilation flag which was required with version older than 1.39.0 to avoid rendering artefacts. See [#2877](https://github.com/ocornut/imgui/issues/2877) for details. If you use an older version, uncomment this line in the Makefile: 11 | 12 | `#EMS += -s BINARYEN_TRAP_MODE=clamp` 13 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_emscripten/shell_minimal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dear ImGui Emscripten example 7 | 29 | 30 | 31 | 32 | 62 | {{{ SCRIPT }}} 63 | 64 | 65 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need GLFW (http://www.glfw.org): 3 | # brew install glfw 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_glfw_metal 10 | SOURCES = main.mm 11 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_metal.mm 12 | SOURCES += ../../imgui.cpp ../../imgui_widgets.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 13 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 14 | 15 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 16 | LIBS += -L/usr/local/lib -lglfw 17 | 18 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 19 | CXXFLAGS += -Wall -Wformat 20 | CFLAGS = $(CXXFLAGS) 21 | 22 | %.o:%.cpp 23 | $(CXX) $(CXXFLAGS) -c -o $@ $< 24 | 25 | %.o:../%.cpp 26 | $(CXX) $(CXXFLAGS) -c -o $@ $< 27 | 28 | %.o:../../%.cpp 29 | $(CXX) $(CXXFLAGS) -c -o $@ $< 30 | 31 | %.o:../%.mm 32 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 33 | 34 | %.o:%.mm 35 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 36 | 37 | all: $(EXE) 38 | @echo Build complete 39 | 40 | $(EXE): $(OBJS) 41 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 42 | 43 | clean: 44 | rm -f $(EXE) $(OBJS) 45 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need GLFW (http://www.glfw.org): 6 | # Linux: 7 | # apt-get install libglfw-dev 8 | # Mac OS X: 9 | # brew install glfw 10 | # MSYS2: 11 | # pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_glfw_opengl2 18 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_opengl2.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 21 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 22 | UNAME_S := $(shell uname -s) 23 | 24 | CXXFLAGS = -I../ -I../../ 25 | CXXFLAGS += -g -Wall -Wformat 26 | LIBS = 27 | 28 | ##--------------------------------------------------------------------- 29 | ## BUILD FLAGS PER PLATFORM 30 | ##--------------------------------------------------------------------- 31 | 32 | ifeq ($(UNAME_S), Linux) #LINUX 33 | ECHO_MESSAGE = "Linux" 34 | LIBS += -lGL `pkg-config --static --libs glfw3` 35 | 36 | CXXFLAGS += `pkg-config --cflags glfw3` 37 | CFLAGS = $(CXXFLAGS) 38 | endif 39 | 40 | ifeq ($(UNAME_S), Darwin) #APPLE 41 | ECHO_MESSAGE = "Mac OS X" 42 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo 43 | LIBS += -L/usr/local/lib -L/opt/local/lib 44 | #LIBS += -lglfw3 45 | LIBS += -lglfw 46 | 47 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 48 | CFLAGS = $(CXXFLAGS) 49 | endif 50 | 51 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 52 | ECHO_MESSAGE = "MinGW" 53 | LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32 54 | 55 | CXXFLAGS += `pkg-config --cflags glfw3` 56 | CFLAGS = $(CXXFLAGS) 57 | endif 58 | 59 | ##--------------------------------------------------------------------- 60 | ## BUILD RULES 61 | ##--------------------------------------------------------------------- 62 | 63 | %.o:%.cpp 64 | $(CXX) $(CXXFLAGS) -c -o $@ $< 65 | 66 | %.o:../%.cpp 67 | $(CXX) $(CXXFLAGS) -c -o $@ $< 68 | 69 | %.o:../../%.cpp 70 | $(CXX) $(CXXFLAGS) -c -o $@ $< 71 | 72 | all: $(EXE) 73 | @echo Build complete for $(ECHO_MESSAGE) 74 | 75 | $(EXE): $(OBJS) 76 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 77 | 78 | clean: 79 | rm -f $(EXE) $(OBJS) 80 | 81 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_opengl2.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222} 6 | 7 | 8 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | sources 56 | 57 | 58 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_opengl3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need GLFW (http://www.glfw.org): 6 | # Linux: 7 | # apt-get install libglfw-dev 8 | # Mac OS X: 9 | # brew install glfw 10 | # MSYS2: 11 | # pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_glfw_opengl3 18 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_opengl3.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 21 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 22 | UNAME_S := $(shell uname -s) 23 | 24 | CXXFLAGS = -I../ -I../../ 25 | CXXFLAGS += -g -Wall -Wformat 26 | LIBS = 27 | 28 | ##--------------------------------------------------------------------- 29 | ## OPENGL LOADER 30 | ##--------------------------------------------------------------------- 31 | 32 | ## Using OpenGL loader: gl3w [default] 33 | SOURCES += ../libs/gl3w/GL/gl3w.c 34 | CXXFLAGS += -I../libs/gl3w -DIMGUI_IMPL_OPENGL_LOADER_GL3W 35 | 36 | ## Using OpenGL loader: glew 37 | ## (This assumes a system-wide installation) 38 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLEW 39 | # LIBS += -lGLEW 40 | 41 | ## Using OpenGL loader: glad 42 | # SOURCES += ../libs/glad/src/glad.c 43 | # CXXFLAGS += -I../libs/glad/include -DIMGUI_IMPL_OPENGL_LOADER_GLAD 44 | 45 | ## Using OpenGL loader: glad2 46 | # SOURCES += ../libs/glad/src/gl.c 47 | # CXXFLAGS += -I../libs/glad/include -DIMGUI_IMPL_OPENGL_LOADER_GLAD2 48 | 49 | ## Using OpenGL loader: glbinding 50 | ## This assumes a system-wide installation 51 | ## of either version 3.0.0 (or newer) 52 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLBINDING3 53 | # LIBS += -lglbinding 54 | ## or the older version 2.x 55 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLBINDING2 56 | # LIBS += -lglbinding 57 | 58 | ##--------------------------------------------------------------------- 59 | ## BUILD FLAGS PER PLATFORM 60 | ##--------------------------------------------------------------------- 61 | 62 | ifeq ($(UNAME_S), Linux) #LINUX 63 | ECHO_MESSAGE = "Linux" 64 | LIBS += -lGL `pkg-config --static --libs glfw3` 65 | 66 | CXXFLAGS += `pkg-config --cflags glfw3` 67 | CFLAGS = $(CXXFLAGS) 68 | endif 69 | 70 | ifeq ($(UNAME_S), Darwin) #APPLE 71 | ECHO_MESSAGE = "Mac OS X" 72 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo 73 | LIBS += -L/usr/local/lib -L/opt/local/lib 74 | #LIBS += -lglfw3 75 | LIBS += -lglfw 76 | 77 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 78 | CFLAGS = $(CXXFLAGS) 79 | endif 80 | 81 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 82 | ECHO_MESSAGE = "MinGW" 83 | LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32 84 | 85 | CXXFLAGS += `pkg-config --cflags glfw3` 86 | CFLAGS = $(CXXFLAGS) 87 | endif 88 | 89 | ##--------------------------------------------------------------------- 90 | ## BUILD RULES 91 | ##--------------------------------------------------------------------- 92 | 93 | %.o:%.cpp 94 | $(CXX) $(CXXFLAGS) -c -o $@ $< 95 | 96 | %.o:../%.cpp 97 | $(CXX) $(CXXFLAGS) -c -o $@ $< 98 | 99 | %.o:../../%.cpp 100 | $(CXX) $(CXXFLAGS) -c -o $@ $< 101 | 102 | %.o:../libs/gl3w/GL/%.c 103 | $(CC) $(CFLAGS) -c -o $@ $< 104 | 105 | %.o:../libs/glad/src/%.c 106 | $(CC) $(CFLAGS) -c -o $@ $< 107 | 108 | all: $(EXE) 109 | @echo Build complete for $(ECHO_MESSAGE) 110 | 111 | $(EXE): $(OBJS) 112 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 113 | 114 | clean: 115 | rm -f $(EXE) $(OBJS) 116 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | {42f99867-3108-43b8-99d0-fabefaf1f2e3} 13 | 14 | 15 | 16 | 17 | sources 18 | 19 | 20 | imgui 21 | 22 | 23 | gl3w 24 | 25 | 26 | imgui 27 | 28 | 29 | imgui 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | imgui 39 | 40 | 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | gl3w 50 | 51 | 52 | gl3w 53 | 54 | 55 | imgui 56 | 57 | 58 | sources 59 | 60 | 61 | sources 62 | 63 | 64 | 65 | 66 | 67 | sources 68 | 69 | 70 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Example usage: 2 | # mkdir build 3 | # cd build 4 | # cmake -g "Visual Studio 14 2015" .. 5 | 6 | cmake_minimum_required(VERSION 2.8) 7 | project(imgui_example_glfw_vulkan C CXX) 8 | 9 | if(NOT CMAKE_BUILD_TYPE) 10 | set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) 11 | endif() 12 | 13 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") 14 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") 15 | 16 | # GLFW 17 | set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo 18 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) 19 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) 20 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) 21 | option(GLFW_INSTALL "Generate installation target" OFF) 22 | option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) 23 | add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) 24 | include_directories(${GLFW_DIR}/include) 25 | 26 | # Dear ImGui 27 | set(IMGUI_DIR ../../) 28 | include_directories(${IMGUI_DIR} ..) 29 | 30 | # Libraries 31 | find_library(VULKAN_LIBRARY 32 | NAMES vulkan vulkan-1) 33 | set(LIBRARIES "glfw;${VULKAN_LIBRARY}") 34 | 35 | # Use vulkan headers from glfw: 36 | include_directories(${GLFW_DIR}/deps) 37 | 38 | file(GLOB sources *.cpp) 39 | 40 | add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/examples/imgui_impl_glfw.cpp ${IMGUI_DIR}/examples/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_widgets.cpp) 41 | target_link_libraries(example_glfw_vulkan ${LIBRARIES}) 42 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of amd64/vcvars32.bat to setup 64-bit command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | sources 56 | 57 | 58 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/gen_spv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag 3 | glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert 4 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/glsl_shader.frag: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) out vec4 fColor; 3 | 4 | layout(set=0, binding=0) uniform sampler2D sTexture; 5 | 6 | layout(location = 0) in struct { 7 | vec4 Color; 8 | vec2 UV; 9 | } In; 10 | 11 | void main() 12 | { 13 | fColor = In.Color * texture(sTexture, In.UV.st); 14 | } 15 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glfw_vulkan/glsl_shader.vert: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) in vec2 aPos; 3 | layout(location = 1) in vec2 aUV; 4 | layout(location = 2) in vec4 aColor; 5 | 6 | layout(push_constant) uniform uPushConstant { 7 | vec2 uScale; 8 | vec2 uTranslate; 9 | } pc; 10 | 11 | out gl_PerVertex { 12 | vec4 gl_Position; 13 | }; 14 | 15 | layout(location = 0) out struct { 16 | vec4 Color; 17 | vec2 UV; 18 | } Out; 19 | 20 | void main() 21 | { 22 | Out.Color = aColor; 23 | Out.UV = aUV; 24 | gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); 25 | } 26 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glut_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # Linux: 6 | # apt-get install freeglut3-dev 7 | # 8 | 9 | #CXX = g++ 10 | #CXX = clang++ 11 | 12 | EXE = example_glut_opengl2 13 | SOURCES = main.cpp 14 | SOURCES += ../imgui_impl_glut.cpp ../imgui_impl_opengl2.cpp 15 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 16 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 17 | UNAME_S := $(shell uname -s) 18 | 19 | CXXFLAGS = -I../ -I../../ 20 | CXXFLAGS += -g -Wall -Wformat 21 | LIBS = 22 | 23 | ##--------------------------------------------------------------------- 24 | ## BUILD FLAGS PER PLATFORM 25 | ##--------------------------------------------------------------------- 26 | 27 | ifeq ($(UNAME_S), Linux) #LINUX 28 | ECHO_MESSAGE = "Linux" 29 | LIBS += -lGL -lglut 30 | CFLAGS = $(CXXFLAGS) 31 | endif 32 | 33 | ifeq ($(UNAME_S), Darwin) #APPLE 34 | ECHO_MESSAGE = "Mac OS X" 35 | LIBS += -framework OpenGL -framework GLUT 36 | LIBS += -L/usr/local/lib -L/opt/local/lib 37 | 38 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 39 | CFLAGS = $(CXXFLAGS) 40 | endif 41 | 42 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 43 | ECHO_MESSAGE = "MinGW" 44 | LIBS += -lgdi32 -lopengl32 -limm32 45 | ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes) 46 | CXXFLAGS += $(shell pkg-config freeglut --cflags) 47 | LIBS += $(shell pkg-config freeglut --libs) 48 | else 49 | LIBS += -lglut 50 | endif 51 | CFLAGS = $(CXXFLAGS) 52 | endif 53 | 54 | ##--------------------------------------------------------------------- 55 | ## BUILD RULES 56 | ##--------------------------------------------------------------------- 57 | 58 | %.o:%.cpp 59 | $(CXX) $(CXXFLAGS) -c -o $@ $< 60 | 61 | %.o:../%.cpp 62 | $(CXX) $(CXXFLAGS) -c -o $@ $< 63 | 64 | %.o:../../%.cpp 65 | $(CXX) $(CXXFLAGS) -c -o $@ $< 66 | 67 | all: $(EXE) 68 | @echo Build complete for $(ECHO_MESSAGE) 69 | 70 | $(EXE): $(OBJS) 71 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 72 | 73 | clean: 74 | rm -f $(EXE) $(OBJS) 75 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222} 6 | 7 | 8 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | sources 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_marmalade/data/app.icf: -------------------------------------------------------------------------------- 1 | # This file is for configuration settings for your 2 | # application. 3 | # 4 | # The syntax is similar to windows .ini files ie 5 | # 6 | # [GroupName] 7 | # Setting = Value 8 | # 9 | # Which can be read by your application using 10 | # e.g s3eConfigGetString("GroupName", "Setting", string) 11 | # 12 | # All settings must be documented in .config.txt files. 13 | # New settings specific to this application should be 14 | # documented in app.config.txt 15 | # 16 | # Some conditional operations are also permitted, see the 17 | # S3E documentation for details. 18 | 19 | [S3E] 20 | MemSize=6000000 21 | MemSizeDebug=6000000 22 | DispFixRot=FixedLandscape 23 | 24 | # emulate iphone 5 resolution, change these settings to emulate other display resolution 25 | WinWidth=1136 26 | WinHeight=640 27 | 28 | [GX] 29 | DataCacheSize=131070 30 | 31 | [Util] 32 | #MemoryBreakpoint=1282 33 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_marmalade/marmalade_example.mkb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env mkb 2 | 3 | # ImGui - standalone example application for Marmalade 4 | # Copyright (C) 2015 by Giovanni Zito 5 | # This file is part of ImGui 6 | # https://github.com/ocornut/imgui 7 | 8 | define IMGUI_DISABLE_INCLUDE_IMCONFIG_H 9 | define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS 10 | define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS 11 | define _snprintf=snprintf 12 | 13 | options 14 | { 15 | optimise-speed=1 16 | } 17 | 18 | includepaths 19 | { 20 | .. 21 | ../.. 22 | } 23 | 24 | subprojects 25 | { 26 | iwgx 27 | } 28 | 29 | files 30 | { 31 | (.) 32 | ["imgui"] 33 | ../../imgui.cpp 34 | ../../imgui_demo.cpp 35 | ../../imgui_draw.cpp 36 | ../../imgui_widgets.cpp 37 | ../../imconfig.h 38 | ../../imgui.h 39 | ../../imgui_internal.h 40 | 41 | ["imgui","Marmalade binding"] 42 | ../imgui_impl_marmalade.h 43 | ../imgui_impl_marmalade.cpp 44 | main.cpp 45 | 46 | } 47 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_null/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # Important: This is a "null back-end" application, with no visible output or interaction! 6 | # This is used for testing purpose and continuous integration, and has little use for end-user. 7 | # 8 | 9 | # Options 10 | WITH_EXTRA_WARNINGS ?= 0 11 | WITH_FREETYPE ?= 0 12 | 13 | EXE = example_null 14 | SOURCES = main.cpp 15 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 16 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 17 | UNAME_S := $(shell uname -s) 18 | 19 | CXXFLAGS += -I../ -I../../ 20 | CXXFLAGS += -g -Wall -Wformat 21 | LIBS = 22 | 23 | # We use the WITH_EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings 24 | ifeq ($(WITH_EXTRA_WARNINGS), 1) 25 | CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros 26 | endif 27 | 28 | # We use the WITH_FREETYPE flag on our CI setup to test compiling misc/freetype/imgui_freetype.cpp 29 | # (only supported on Linux, and note that the imgui_freetype code currently won't be executed) 30 | ifeq ($(WITH_FREETYPE), 1) 31 | SOURCES += ../../misc/freetype/imgui_freetype.cpp 32 | CXXFLAGS += $(shell pkg-config --cflags freetype2) 33 | LIBS += $(shell pkg-config --libs freetype2) 34 | endif 35 | 36 | ##--------------------------------------------------------------------- 37 | ## BUILD FLAGS PER PLATFORM 38 | ##--------------------------------------------------------------------- 39 | 40 | ifeq ($(UNAME_S), Linux) #LINUX 41 | ECHO_MESSAGE = "Linux" 42 | ifneq ($(WITH_EXTRA_WARNINGS), 0) 43 | CXXFLAGS += -Wextra -Wpedantic 44 | ifeq ($(shell $(CXX) -v 2>&1 | grep -c "clang version"), 1) 45 | CXXFLAGS += -Wshadow -Wsign-conversion 46 | endif 47 | endif 48 | CFLAGS = $(CXXFLAGS) 49 | endif 50 | 51 | ifeq ($(UNAME_S), Darwin) #APPLE 52 | ECHO_MESSAGE = "Mac OS X" 53 | ifneq ($(WITH_EXTRA_WARNINGS), 0) 54 | CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-c++11-long-long 55 | endif 56 | CFLAGS = $(CXXFLAGS) 57 | endif 58 | 59 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 60 | ECHO_MESSAGE = "MinGW" 61 | ifneq ($(WITH_EXTRA_WARNINGS), 0) 62 | CXXFLAGS += -Wextra -Wpedantic 63 | endif 64 | CFLAGS = $(CXXFLAGS) 65 | endif 66 | 67 | ##--------------------------------------------------------------------- 68 | ## BUILD RULES 69 | ##--------------------------------------------------------------------- 70 | 71 | %.o:%.cpp 72 | $(CXX) $(CXXFLAGS) -c -o $@ $< 73 | 74 | %.o:../%.cpp 75 | $(CXX) $(CXXFLAGS) -c -o $@ $< 76 | 77 | %.o:../../%.cpp 78 | $(CXX) $(CXXFLAGS) -c -o $@ $< 79 | 80 | %.o:../../misc/freetype/%.cpp 81 | $(CXX) $(CXXFLAGS) -c -o $@ $< 82 | 83 | all: $(EXE) 84 | @echo Build complete for $(ECHO_MESSAGE) 85 | 86 | $(EXE): $(OBJS) 87 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 88 | 89 | clean: 90 | rm -f $(EXE) $(OBJS) 91 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_null/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_null/main.cpp: -------------------------------------------------------------------------------- 1 | // dear imgui: "null" example application 2 | // (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT) 3 | // This is useful to test building, but you cannot interact with anything here! 4 | #include "imgui.h" 5 | #include 6 | 7 | int main(int, char**) 8 | { 9 | IMGUI_CHECKVERSION(); 10 | ImGui::CreateContext(); 11 | ImGuiIO& io = ImGui::GetIO(); 12 | 13 | // Build atlas 14 | unsigned char* tex_pixels = NULL; 15 | int tex_w, tex_h; 16 | io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); 17 | 18 | for (int n = 0; n < 20; n++) 19 | { 20 | printf("NewFrame() %d\n", n); 21 | io.DisplaySize = ImVec2(1920, 1080); 22 | io.DeltaTime = 1.0f / 60.0f; 23 | ImGui::NewFrame(); 24 | 25 | static float f = 0.0f; 26 | ImGui::Text("Hello, world!"); 27 | ImGui::SliderFloat("float", &f, 0.0f, 1.0f); 28 | ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); 29 | ImGui::ShowDemoWindow(NULL); 30 | 31 | ImGui::Render(); 32 | } 33 | 34 | printf("DestroyContext()\n"); 35 | ImGui::DestroyContext(); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_directx11 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_dx11.cpp ..\..\imgui*.cpp 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_directx11/example_sdl_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | imgui 46 | 47 | 48 | sources 49 | 50 | 51 | 52 | 53 | 54 | sources 55 | 56 | 57 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need SDL2 (http://www.libsdl.org): 3 | # brew install sdl2 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_sdl_metal 10 | SOURCES = main.mm 11 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_metal.mm 12 | SOURCES += ../../imgui.cpp ../../imgui_widgets.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 13 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 14 | 15 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 16 | LIBS += `sdl2-config --libs` 17 | LIBS += -L/usr/local/lib 18 | 19 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 20 | CXXFLAGS += `sdl2-config --cflags` 21 | CXXFLAGS += -Wall -Wformat 22 | CFLAGS = $(CXXFLAGS) 23 | 24 | %.o:%.cpp 25 | $(CXX) $(CXXFLAGS) -c -o $@ $< 26 | 27 | %.o:../%.cpp 28 | $(CXX) $(CXXFLAGS) -c -o $@ $< 29 | 30 | %.o:../../%.cpp 31 | $(CXX) $(CXXFLAGS) -c -o $@ $< 32 | 33 | %.o:../%.mm 34 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 35 | 36 | %.o:%.mm 37 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 38 | 39 | all: $(EXE) 40 | @echo Build complete 41 | 42 | $(EXE): $(OBJS) 43 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 44 | 45 | clean: 46 | rm -f $(EXE) $(OBJS) 47 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL2 (http://www.libsdl.org): 6 | # Linux: 7 | # apt-get install libsdl2-dev 8 | # Mac OS X: 9 | # brew install sdl2 10 | # MSYS2: 11 | # pacman -S mingw-w64-i686-SDL2 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_sdl_opengl2 18 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 21 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 22 | UNAME_S := $(shell uname -s) 23 | 24 | CXXFLAGS = -I../ -I../../ 25 | CXXFLAGS += -g -Wall -Wformat 26 | LIBS = 27 | 28 | ##--------------------------------------------------------------------- 29 | ## BUILD FLAGS PER PLATFORM 30 | ##--------------------------------------------------------------------- 31 | 32 | ifeq ($(UNAME_S), Linux) #LINUX 33 | ECHO_MESSAGE = "Linux" 34 | LIBS += -lGL -ldl `sdl2-config --libs` 35 | 36 | CXXFLAGS += `sdl2-config --cflags` 37 | CFLAGS = $(CXXFLAGS) 38 | endif 39 | 40 | ifeq ($(UNAME_S), Darwin) #APPLE 41 | ECHO_MESSAGE = "Mac OS X" 42 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs` 43 | LIBS += -L/usr/local/lib -L/opt/local/lib 44 | 45 | CXXFLAGS += `sdl2-config --cflags` 46 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 47 | CFLAGS = $(CXXFLAGS) 48 | endif 49 | 50 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 51 | ECHO_MESSAGE = "MinGW" 52 | LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2` 53 | 54 | CXXFLAGS += `pkg-config --cflags sdl2` 55 | CFLAGS = $(CXXFLAGS) 56 | endif 57 | 58 | ##--------------------------------------------------------------------- 59 | ## BUILD RULES 60 | ##--------------------------------------------------------------------- 61 | 62 | %.o:%.cpp 63 | $(CXX) $(CXXFLAGS) -c -o $@ $< 64 | 65 | %.o:../%.cpp 66 | $(CXX) $(CXXFLAGS) -c -o $@ $< 67 | 68 | %.o:../../%.cpp 69 | $(CXX) $(CXXFLAGS) -c -o $@ $< 70 | 71 | all: $(EXE) 72 | @echo Build complete for $(ECHO_MESSAGE) 73 | 74 | $(EXE): $(OBJS) 75 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 76 | 77 | clean: 78 | rm -f $(EXE) $(OBJS) 79 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 25 | ``` 26 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_opengl2 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | sources 56 | 57 | 58 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Cross Platform Makefile 3 | # Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X 4 | # 5 | # You will need SDL2 (http://www.libsdl.org): 6 | # Linux: 7 | # apt-get install libsdl2-dev 8 | # Mac OS X: 9 | # brew install sdl2 10 | # MSYS2: 11 | # pacman -S mingw-w64-i686-SDL2 12 | # 13 | 14 | #CXX = g++ 15 | #CXX = clang++ 16 | 17 | EXE = example_sdl_opengl3 18 | SOURCES = main.cpp 19 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp 20 | SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp 21 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 22 | UNAME_S := $(shell uname -s) 23 | 24 | CXXFLAGS = -I../ -I../../ 25 | CXXFLAGS += -g -Wall -Wformat 26 | LIBS = 27 | 28 | ##--------------------------------------------------------------------- 29 | ## OPENGL LOADER 30 | ##--------------------------------------------------------------------- 31 | 32 | ## Using OpenGL loader: gl3w [default] 33 | SOURCES += ../libs/gl3w/GL/gl3w.c 34 | CXXFLAGS += -I../libs/gl3w -DIMGUI_IMPL_OPENGL_LOADER_GL3W 35 | 36 | ## Using OpenGL loader: glew 37 | ## (This assumes a system-wide installation) 38 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLEW 39 | # LIBS += -lGLEW 40 | 41 | ## Using OpenGL loader: glad 42 | # SOURCES += ../libs/glad/src/glad.c 43 | # CXXFLAGS += -I../libs/glad/include -DIMGUI_IMPL_OPENGL_LOADER_GLAD 44 | 45 | ## Using OpenGL loader: glad2 46 | # SOURCES += ../libs/glad/src/gl.c 47 | # CXXFLAGS += -I../libs/glad/include -DIMGUI_IMPL_OPENGL_LOADER_GLAD2 48 | 49 | ## Using OpenGL loader: glbinding 50 | ## This assumes a system-wide installation 51 | ## of either version 3.0.0 (or newer) 52 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLBINDING3 53 | # LIBS += -lglbinding 54 | ## or the older version 2.x 55 | # CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLBINDING2 56 | # LIBS += -lglbinding 57 | 58 | ##--------------------------------------------------------------------- 59 | ## BUILD FLAGS PER PLATFORM 60 | ##--------------------------------------------------------------------- 61 | 62 | ifeq ($(UNAME_S), Linux) #LINUX 63 | ECHO_MESSAGE = "Linux" 64 | LIBS += -lGL -ldl `sdl2-config --libs` 65 | 66 | CXXFLAGS += `sdl2-config --cflags` 67 | CFLAGS = $(CXXFLAGS) 68 | endif 69 | 70 | ifeq ($(UNAME_S), Darwin) #APPLE 71 | ECHO_MESSAGE = "Mac OS X" 72 | LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs` 73 | LIBS += -L/usr/local/lib -L/opt/local/lib 74 | 75 | CXXFLAGS += `sdl2-config --cflags` 76 | CXXFLAGS += -I/usr/local/include -I/opt/local/include 77 | CFLAGS = $(CXXFLAGS) 78 | endif 79 | 80 | ifeq ($(findstring MINGW,$(UNAME_S)),MINGW) 81 | ECHO_MESSAGE = "MinGW" 82 | LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2` 83 | 84 | CXXFLAGS += `pkg-config --cflags sdl2` 85 | CFLAGS = $(CXXFLAGS) 86 | endif 87 | 88 | ##--------------------------------------------------------------------- 89 | ## BUILD RULES 90 | ##--------------------------------------------------------------------- 91 | 92 | %.o:%.cpp 93 | $(CXX) $(CXXFLAGS) -c -o $@ $< 94 | 95 | %.o:../%.cpp 96 | $(CXX) $(CXXFLAGS) -c -o $@ $< 97 | 98 | %.o:../../%.cpp 99 | $(CXX) $(CXXFLAGS) -c -o $@ $< 100 | 101 | %.o:../libs/gl3w/GL/%.c 102 | $(CC) $(CFLAGS) -c -o $@ $< 103 | 104 | %.o:../libs/glad/src/%.c 105 | $(CC) $(CFLAGS) -c -o $@ $< 106 | 107 | all: $(EXE) 108 | @echo Build complete for $(ECHO_MESSAGE) 109 | 110 | $(EXE): $(OBJS) 111 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 112 | 113 | clean: 114 | rm -f $(EXE) $(OBJS) 115 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl3/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -lGL -ldl 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -framework OpenGl -framework CoreFoundation 25 | ``` 26 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_opengl3 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | {f9997b32-5479-4756-9ffc-77793ad3764f} 13 | 14 | 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | sources 27 | 28 | 29 | gl3w 30 | 31 | 32 | sources 33 | 34 | 35 | sources 36 | 37 | 38 | imgui 39 | 40 | 41 | 42 | 43 | imgui 44 | 45 | 46 | imgui 47 | 48 | 49 | imgui 50 | 51 | 52 | gl3w 53 | 54 | 55 | gl3w 56 | 57 | 58 | sources 59 | 60 | 61 | sources 62 | 63 | 64 | 65 | 66 | 67 | sources 68 | 69 | 70 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {20b90ce4-7fcb-4731-b9a0-075f875de82d} 6 | 7 | 8 | {f18ab499-84e1-499f-8eff-9754361e0e52} 9 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 10 | 11 | 12 | 13 | 14 | imgui 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | sources 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | sources 56 | 57 | 58 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx10/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_win32.cpp ..\imgui_impl_dx10.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx10.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | imgui 49 | 50 | 51 | 52 | 53 | 54 | sources 55 | 56 | 57 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx11.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx11.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6} 6 | 7 | 8 | {08e36723-ce4f-4cff-9662-c40801cf1acf} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | imgui 49 | 50 | 51 | 52 | 53 | 54 | sources 55 | 56 | 57 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx12/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx12.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx12.exe /FoDebug/ /link d3d12.lib d3dcompiler.lib dxgi.lib 4 | 5 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {fb3d294f-51ec-478e-a627-25831c80fefd} 6 | 7 | 8 | {4f33ddea-9910-456d-b868-4267eb3c2b19} 9 | 10 | 11 | 12 | 13 | imgui 14 | 15 | 16 | imgui 17 | 18 | 19 | imgui 20 | 21 | 22 | sources 23 | 24 | 25 | sources 26 | 27 | 28 | 29 | 30 | imgui 31 | 32 | 33 | sources 34 | 35 | 36 | imgui 37 | 38 | 39 | imgui 40 | 41 | 42 | sources 43 | 44 | 45 | sources 46 | 47 | 48 | imgui 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx9/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%DXSDK_DIR%/Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx9.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx9.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib 4 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {a82cba23-9de0-45c2-b1e3-2eb1666702de} 10 | 11 | 12 | 13 | 14 | sources 15 | 16 | 17 | imgui 18 | 19 | 20 | imgui 21 | 22 | 23 | imgui 24 | 25 | 26 | sources 27 | 28 | 29 | sources 30 | 31 | 32 | imgui 33 | 34 | 35 | 36 | 37 | imgui 38 | 39 | 40 | imgui 41 | 42 | 43 | imgui 44 | 45 | 46 | sources 47 | 48 | 49 | sources 50 | 51 | 52 | 53 | 54 | 55 | sources 56 | 57 | 58 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_examples.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx9", "example_win32_directx9\example_win32_directx9.vcxproj", "{4165A294-21F2-44CA-9B38-E3F935ABADF5}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx10", "example_win32_directx10\example_win32_directx10.vcxproj", "{345A953E-A004-4648-B442-DC5F9F11068C}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx11", "example_win32_directx11\example_win32_directx11.vcxproj", "{9F316E83-5AE5-4939-A723-305A94F48005}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl2", "example_glfw_opengl2\example_glfw_opengl2.vcxproj", "{9CDA7840-B7A5-496D-A527-E95571496D18}" 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl3", "example_glfw_opengl3\example_glfw_opengl3.vcxproj", "{4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Win32 = Debug|Win32 19 | Debug|x64 = Debug|x64 20 | Release|Win32 = Release|Win32 21 | Release|x64 = Release|x64 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.Build.0 = Debug|Win32 26 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.ActiveCfg = Debug|x64 27 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.Build.0 = Debug|x64 28 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.ActiveCfg = Release|Win32 29 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.Build.0 = Release|Win32 30 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.ActiveCfg = Release|x64 31 | {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.Build.0 = Release|x64 32 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.ActiveCfg = Debug|Win32 33 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.Build.0 = Debug|Win32 34 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.ActiveCfg = Debug|x64 35 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.Build.0 = Debug|x64 36 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.ActiveCfg = Release|Win32 37 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.Build.0 = Release|Win32 38 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.ActiveCfg = Release|x64 39 | {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.Build.0 = Release|x64 40 | {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.ActiveCfg = Debug|Win32 41 | {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.Build.0 = Debug|Win32 42 | {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.ActiveCfg = Debug|x64 43 | {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.Build.0 = Debug|x64 44 | {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.ActiveCfg = Release|Win32 45 | {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.Build.0 = Release|Win32 46 | {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.ActiveCfg = Release|x64 47 | {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.Build.0 = Release|x64 48 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.ActiveCfg = Debug|Win32 49 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.Build.0 = Debug|Win32 50 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.ActiveCfg = Debug|x64 51 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.Build.0 = Debug|x64 52 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.ActiveCfg = Release|Win32 53 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.Build.0 = Release|Win32 54 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.ActiveCfg = Release|x64 55 | {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.Build.0 = Release|x64 56 | {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.ActiveCfg = Debug|Win32 57 | {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.Build.0 = Debug|Win32 58 | {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.ActiveCfg = Debug|x64 59 | {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.Build.0 = Debug|x64 60 | {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.ActiveCfg = Release|Win32 61 | {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.Build.0 = Release|Win32 62 | {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.ActiveCfg = Release|x64 63 | {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.Build.0 = Release|x64 64 | EndGlobalSection 65 | GlobalSection(SolutionProperties) = preSolution 66 | HideSolutionNode = FALSE 67 | EndGlobalSection 68 | EndGlobal 69 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_allegro5.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Binding for Allegro 5 2 | // (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Platform: Clipboard support (from Allegro 5.1.12) 7 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 8 | // Issues: 9 | // [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually. 10 | // [ ] Platform: Missing gamepad support. 11 | 12 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 13 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 14 | // https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd 15 | 16 | #pragma once 17 | #include "imgui.h" // IMGUI_IMPL_API 18 | 19 | struct ALLEGRO_DISPLAY; 20 | union ALLEGRO_EVENT; 21 | 22 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display); 23 | IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown(); 24 | IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame(); 25 | IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data); 26 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event); 27 | 28 | // Use if you want to reset your rendering device without losing Dear ImGui state. 29 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects(); 30 | IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects(); 31 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_dx10.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX10 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | #include "imgui.h" // IMGUI_IMPL_API 14 | 15 | struct ID3D10Device; 16 | 17 | IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device); 18 | IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown(); 19 | IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame(); 20 | IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data); 21 | 22 | // Use if you want to reset your rendering device without losing Dear ImGui state. 23 | IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects(); 24 | IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects(); 25 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_dx11.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX11 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | #include "../imgui.h" // IMGUI_IMPL_API 14 | 15 | struct ID3D11Device; 16 | struct ID3D11DeviceContext; 17 | 18 | IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); 19 | IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); 20 | IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); 21 | IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); 22 | 23 | // Use if you want to reset your rendering device without losing Dear ImGui state. 24 | IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects(); 25 | IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects(); 26 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_dx12.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX12 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | // Issues: 8 | // [ ] 64-bit only for now! (Because sizeof(ImTextureId) == sizeof(void*)). See github.com/ocornut/imgui/pull/301 9 | 10 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 11 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 12 | // https://github.com/ocornut/imgui 13 | 14 | #pragma once 15 | #include "imgui.h" // IMGUI_IMPL_API 16 | 17 | enum DXGI_FORMAT; 18 | struct ID3D12Device; 19 | struct ID3D12DescriptorHeap; 20 | struct ID3D12GraphicsCommandList; 21 | struct D3D12_CPU_DESCRIPTOR_HANDLE; 22 | struct D3D12_GPU_DESCRIPTOR_HANDLE; 23 | 24 | // cmd_list is the command list that the implementation will use to render imgui draw lists. 25 | // Before calling the render function, caller must prepare cmd_list by resetting it and setting the appropriate 26 | // render target and descriptor heap that contains font_srv_cpu_desc_handle/font_srv_gpu_desc_handle. 27 | // font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal font texture. 28 | IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format, ID3D12DescriptorHeap* cbv_srv_heap, 29 | D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle); 30 | IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown(); 31 | IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame(); 32 | IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* graphics_command_list); 33 | 34 | // Use if you want to reset your rendering device without losing Dear ImGui state. 35 | IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects(); 36 | IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects(); 37 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX9 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | #include "imgui.h" // IMGUI_IMPL_API 14 | 15 | struct IDirect3DDevice9; 16 | 17 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 18 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 19 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 20 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 21 | 22 | // Use if you want to reset your rendering device without losing Dear ImGui state. 23 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 24 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 25 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_glfw.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for GLFW 2 | // This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..) 3 | // (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Clipboard support. 7 | // [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 8 | // [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: 3 cursors types are missing from GLFW. 9 | // [X] Platform: Keyboard arrays indexed using GLFW_KEY_* codes, e.g. ImGui::IsKeyPressed(GLFW_KEY_SPACE). 10 | 11 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 12 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 13 | // https://github.com/ocornut/imgui 14 | 15 | // About GLSL version: 16 | // The 'glsl_version' initialization parameter defaults to "#version 150" if NULL. 17 | // Only override if your GL version doesn't handle this GLSL version. Keep NULL if unsure! 18 | 19 | #pragma once 20 | #include "imgui.h" // IMGUI_IMPL_API 21 | 22 | struct GLFWwindow; 23 | 24 | IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks); 25 | IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks); 26 | IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown(); 27 | IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame(); 28 | 29 | // GLFW callbacks 30 | // - When calling Init with 'install_callbacks=true': GLFW callbacks will be installed for you. They will call user's previously installed callbacks, if any. 31 | // - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call those function yourself from your own GLFW callbacks. 32 | IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods); 33 | IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset); 34 | IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods); 35 | IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c); 36 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_glut.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for GLUT/FreeGLUT 2 | // This needs to be used along with a Renderer (e.g. OpenGL2) 3 | 4 | // !!! GLUT/FreeGLUT IS OBSOLETE SOFTWARE. Using GLUT is not recommended unless you really miss the 90's. !!! 5 | // !!! If someone or something is teaching you GLUT in 2020, you are being abused. Please show some resistance. !!! 6 | // !!! Nowadays, prefer using GLFW or SDL instead! 7 | 8 | // Issues: 9 | // [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I 10 | // [ ] Platform: Missing mouse cursor shape/visibility support. 11 | // [ ] Platform: Missing clipboard support (not supported by Glut). 12 | // [ ] Platform: Missing gamepad support. 13 | 14 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 15 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 16 | // https://github.com/ocornut/imgui 17 | 18 | #pragma once 19 | #include "imgui.h" // IMGUI_IMPL_API 20 | 21 | IMGUI_IMPL_API bool ImGui_ImplGLUT_Init(); 22 | IMGUI_IMPL_API void ImGui_ImplGLUT_InstallFuncs(); 23 | IMGUI_IMPL_API void ImGui_ImplGLUT_Shutdown(); 24 | IMGUI_IMPL_API void ImGui_ImplGLUT_NewFrame(); 25 | 26 | // You can call ImGui_ImplGLUT_InstallFuncs() to get all those functions installed automatically, 27 | // or call them yourself from your own GLUT handlers. We are using the same weird names as GLUT for consistency.. 28 | //---------------------------------------- GLUT name --------------------------------------------- Decent Name --------- 29 | IMGUI_IMPL_API void ImGui_ImplGLUT_ReshapeFunc(int w, int h); // ~ ResizeFunc 30 | IMGUI_IMPL_API void ImGui_ImplGLUT_MotionFunc(int x, int y); // ~ MouseMoveFunc 31 | IMGUI_IMPL_API void ImGui_ImplGLUT_MouseFunc(int button, int state, int x, int y); // ~ MouseButtonFunc 32 | IMGUI_IMPL_API void ImGui_ImplGLUT_MouseWheelFunc(int button, int dir, int x, int y); // ~ MouseWheelFunc 33 | IMGUI_IMPL_API void ImGui_ImplGLUT_KeyboardFunc(unsigned char c, int x, int y); // ~ CharPressedFunc 34 | IMGUI_IMPL_API void ImGui_ImplGLUT_KeyboardUpFunc(unsigned char c, int x, int y); // ~ CharReleasedFunc 35 | IMGUI_IMPL_API void ImGui_ImplGLUT_SpecialFunc(int key, int x, int y); // ~ KeyPressedFunc 36 | IMGUI_IMPL_API void ImGui_ImplGLUT_SpecialUpFunc(int key, int x, int y); // ~ KeyReleasedFunc 37 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_marmalade.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Binding for Marmalade + IwGx 2 | // Marmalade code: Copyright (C) 2015 by Giovanni Zito (this file is part of Dear ImGui) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID! 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | #pragma once 12 | #include "imgui.h" // IMGUI_IMPL_API 13 | 14 | IMGUI_IMPL_API bool ImGui_Marmalade_Init(bool install_callbacks); 15 | IMGUI_IMPL_API void ImGui_Marmalade_Shutdown(); 16 | IMGUI_IMPL_API void ImGui_Marmalade_NewFrame(); 17 | IMGUI_IMPL_API void ImGui_Marmalade_RenderDrawData(ImDrawData* draw_data); 18 | 19 | // Use if you want to reset your rendering device without losing Dear ImGui state. 20 | IMGUI_IMPL_API void ImGui_Marmalade_InvalidateDeviceObjects(); 21 | IMGUI_IMPL_API bool ImGui_Marmalade_CreateDeviceObjects(); 22 | 23 | // Callbacks (installed by default if you enable 'install_callbacks' during initialization) 24 | // You can also handle inputs yourself and use those as a reference. 25 | IMGUI_IMPL_API int32 ImGui_Marmalade_PointerButtonEventCallback(void* system_data, void* user_data); 26 | IMGUI_IMPL_API int32 ImGui_Marmalade_KeyCallback(void* system_data, void* user_data); 27 | IMGUI_IMPL_API int32 ImGui_Marmalade_CharCallback(void* system_data, void* user_data); 28 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_metal.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for Metal 2 | // This needs to be used along with a Platform Binding (e.g. OSX) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #include "imgui.h" // IMGUI_IMPL_API 13 | 14 | @class MTLRenderPassDescriptor; 15 | @protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder; 16 | 17 | IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id device); 18 | IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown(); 19 | IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor* renderPassDescriptor); 20 | IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, 21 | id commandBuffer, 22 | id commandEncoder); 23 | 24 | // Called by Init/NewFrame/Shutdown 25 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id device); 26 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture(); 27 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id device); 28 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects(); 29 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_opengl2.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for OpenGL2 (legacy OpenGL, fixed pipeline) 2 | // This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID! 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** 12 | // **Prefer using the code in imgui_impl_opengl3.cpp** 13 | // This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read. 14 | // If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more 15 | // complicated, will require your code to reset every single OpenGL attributes to their initial state, and might 16 | // confuse your GPU driver. 17 | // The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API. 18 | 19 | #pragma once 20 | #include "imgui.h" // IMGUI_IMPL_API 21 | 22 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init(); 23 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown(); 24 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame(); 25 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data); 26 | 27 | // Called by Init/NewFrame/Shutdown 28 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture(); 29 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture(); 30 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects(); 31 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects(); 32 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_opengl3.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for modern OpenGL with shaders / programmatic pipeline 2 | // - Desktop GL: 2.x 3.x 4.x 3 | // - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0) 4 | // This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..) 5 | 6 | // Implemented features: 7 | // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID! 8 | // [x] Renderer: Desktop GL only: Support for large meshes (64k+ vertices) with 16-bit indices. 9 | 10 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 11 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 12 | // https://github.com/ocornut/imgui 13 | 14 | // About Desktop OpenGL function loaders: 15 | // Modern Desktop OpenGL doesn't have a standard portable header file to load OpenGL function pointers. 16 | // Helper libraries are often used for this purpose! Here we are supporting a few common ones (gl3w, glew, glad). 17 | // You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own. 18 | 19 | // About GLSL version: 20 | // The 'glsl_version' initialization parameter should be NULL (default) or a "#version XXX" string. 21 | // On computer platform the GLSL version default to "#version 130". On OpenGL ES 3 platform it defaults to "#version 300 es" 22 | // Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp. 23 | 24 | #pragma once 25 | #include "imgui.h" // IMGUI_IMPL_API 26 | 27 | // Backend API 28 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL); 29 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown(); 30 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame(); 31 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data); 32 | 33 | // (Optional) Called by Init/NewFrame/Shutdown 34 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateFontsTexture(); 35 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyFontsTexture(); 36 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateDeviceObjects(); 37 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects(); 38 | 39 | // Specific OpenGL ES versions 40 | //#define IMGUI_IMPL_OPENGL_ES2 // Auto-detected on Emscripten 41 | //#define IMGUI_IMPL_OPENGL_ES3 // Auto-detected on iOS/Android 42 | 43 | // Attempt to auto-detect the default Desktop GL loader based on available header files. 44 | // If auto-detection fails or doesn't select the same GL loader file as used by your application, 45 | // you are likely to get a crash in ImGui_ImplOpenGL3_Init(). 46 | // You can explicitly select a loader by using one of the '#define IMGUI_IMPL_OPENGL_LOADER_XXX' in imconfig.h or compiler command-line. 47 | #if !defined(IMGUI_IMPL_OPENGL_ES2) \ 48 | && !defined(IMGUI_IMPL_OPENGL_ES3) \ 49 | && !defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) \ 50 | && !defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) \ 51 | && !defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) \ 52 | && !defined(IMGUI_IMPL_OPENGL_LOADER_GLAD2) \ 53 | && !defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING2) \ 54 | && !defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING3) \ 55 | && !defined(IMGUI_IMPL_OPENGL_LOADER_CUSTOM) 56 | 57 | // Try to detect GLES on matching platforms 58 | #if defined(__APPLE__) 59 | #include "TargetConditionals.h" 60 | #endif 61 | #if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__)) 62 | #define IMGUI_IMPL_OPENGL_ES3 // iOS, Android -> GL ES 3, "#version 300 es" 63 | #elif defined(__EMSCRIPTEN__) 64 | #define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100" 65 | 66 | // Otherwise try to detect supported Desktop OpenGL loaders.. 67 | #elif defined(__has_include) 68 | #if __has_include() 69 | #define IMGUI_IMPL_OPENGL_LOADER_GLEW 70 | #elif __has_include() 71 | #define IMGUI_IMPL_OPENGL_LOADER_GLAD 72 | #elif __has_include() 73 | #define IMGUI_IMPL_OPENGL_LOADER_GLAD2 74 | #elif __has_include() 75 | #define IMGUI_IMPL_OPENGL_LOADER_GL3W 76 | #elif __has_include() 77 | #define IMGUI_IMPL_OPENGL_LOADER_GLBINDING3 78 | #elif __has_include() 79 | #define IMGUI_IMPL_OPENGL_LOADER_GLBINDING2 80 | #else 81 | #error "Cannot detect OpenGL loader!" 82 | #endif 83 | #else 84 | #define IMGUI_IMPL_OPENGL_LOADER_GL3W // Default to GL3W embedded in our repository 85 | #endif 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_osx.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for OSX / Cocoa 2 | // This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..) 3 | // [ALPHA] Early bindings, not well tested. If you want a portable application, prefer using the GLFW or SDL platform bindings on Mac. 4 | 5 | // Implemented features: 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this back-end). 8 | // Issues: 9 | // [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters].. 10 | 11 | #include "imgui.h" // IMGUI_IMPL_API 12 | 13 | @class NSEvent; 14 | @class NSView; 15 | 16 | IMGUI_IMPL_API bool ImGui_ImplOSX_Init(); 17 | IMGUI_IMPL_API void ImGui_ImplOSX_Shutdown(); 18 | IMGUI_IMPL_API void ImGui_ImplOSX_NewFrame(NSView* _Nullable view); 19 | IMGUI_IMPL_API bool ImGui_ImplOSX_HandleEvent(NSEvent* _Nonnull event, NSView* _Nullable view); 20 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_sdl.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for SDL2 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | // (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: Clipboard support. 8 | // [X] Platform: Keyboard arrays indexed using SDL_SCANCODE_* codes, e.g. ImGui::IsKeyPressed(SDL_SCANCODE_SPACE). 9 | // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 10 | // Missing features: 11 | // [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME. 12 | 13 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 14 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 15 | // https://github.com/ocornut/imgui 16 | 17 | #pragma once 18 | #include "imgui.h" // IMGUI_IMPL_API 19 | 20 | struct SDL_Window; 21 | typedef union SDL_Event SDL_Event; 22 | 23 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); 24 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window); 25 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window); 26 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window); 27 | IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown(); 28 | IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(SDL_Window* window); 29 | IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); 30 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/imgui_impl_win32.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications) 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | 4 | // Implemented features: 5 | // [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui) 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: Keyboard arrays indexed using VK_* Virtual Key Codes, e.g. ImGui::IsKeyPressed(VK_SPACE). 8 | // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 9 | 10 | #pragma once 11 | #include "../imgui.h" // IMGUI_IMPL_API 12 | 13 | IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd); 14 | IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown(); 15 | IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame(); 16 | 17 | // Configuration 18 | // - Disable gamepad support or linking with xinput.lib 19 | //#define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD 20 | //#define IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT 21 | 22 | // Win32 message handler your application need to call. 23 | // - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on from this helper. 24 | // - You should COPY the line below into your .cpp code to forward declare the function and then you can call it. 25 | #if 0 26 | extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 27 | #endif 28 | 29 | // DPI-related helpers (optional) 30 | // - Use to enable DPI awareness without having to create an application manifest. 31 | // - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps. 32 | // - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc. 33 | // but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime, 34 | // neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies. 35 | IMGUI_IMPL_API void ImGui_ImplWin32_EnableDpiAwareness(); 36 | IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd); // HWND hwnd 37 | IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor); // HMONITOR monitor 38 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/libs/glfw/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/examples/libs/usynergy/README.txt: -------------------------------------------------------------------------------- 1 | 2 | uSynergy client -- Implementation for the embedded Synergy client library 3 | version 1.0.0, July 7th, 2012 4 | Copyright (c) 2012 Alex Evans 5 | 6 | This is a copy of the files once found at: 7 | https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro 8 | 9 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | misc/cpp/ 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | misc/fonts/ 7 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). 8 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. 9 | Suggested fonts and links. 10 | 11 | misc/freetype/ 12 | Font atlas builder/rasterizer using FreeType instead of stb_truetype. 13 | Benefit from better FreeType rasterization, in particular for small fonts. 14 | 15 | misc/natvis/ 16 | Natvis file to describe dear imgui types in the Visual Studio debugger. 17 | With this, types like ImVector<> will be displayed nicely in the debugger. 18 | You can include this file a Visual Studio project file, or install it in Visual Studio folder. 19 | 20 | misc/single_file/ 21 | Single-file header stub. 22 | We use this to validate compiling all *.cpp files in a same compilation unit. 23 | Users of that technique (also called "Unity builds") can generally provide this themselves, 24 | so we don't really recommend you use this in your projects. 25 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/cpp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | imgui_stdlib.h + imgui_stdlib.cpp 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | imgui_scoped.h 7 | [Experimental, not currently in main repository] 8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions. 9 | Try by merging: https://github.com/ocornut/imgui/pull/2197 10 | Discuss at: https://github.com/ocornut/imgui/issues/2096 11 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/cpp/imgui_stdlib.cpp: -------------------------------------------------------------------------------- 1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.) 2 | // This is also an example of how you may wrap your own similar types. 3 | 4 | // Compatibility: 5 | // - std::string support is only guaranteed to work from C++11. 6 | // If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture) 7 | 8 | // Changelog: 9 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 10 | 11 | #include "imgui.h" 12 | #include "imgui_stdlib.h" 13 | 14 | struct InputTextCallback_UserData 15 | { 16 | std::string* Str; 17 | ImGuiInputTextCallback ChainCallback; 18 | void* ChainCallbackUserData; 19 | }; 20 | 21 | static int InputTextCallback(ImGuiInputTextCallbackData* data) 22 | { 23 | InputTextCallback_UserData* user_data = (InputTextCallback_UserData*)data->UserData; 24 | if (data->EventFlag == ImGuiInputTextFlags_CallbackResize) 25 | { 26 | // Resize string callback 27 | // If for some reason we refuse the new length (BufTextLen) and/or capacity (BufSize) we need to set them back to what we want. 28 | std::string* str = user_data->Str; 29 | IM_ASSERT(data->Buf == str->c_str()); 30 | str->resize(data->BufTextLen); 31 | data->Buf = (char*)str->c_str(); 32 | } 33 | else if (user_data->ChainCallback) 34 | { 35 | // Forward to user callback, if any 36 | data->UserData = user_data->ChainCallbackUserData; 37 | return user_data->ChainCallback(data); 38 | } 39 | return 0; 40 | } 41 | 42 | bool ImGui::InputText(const char* label, std::string* str, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data) 43 | { 44 | IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); 45 | flags |= ImGuiInputTextFlags_CallbackResize; 46 | 47 | InputTextCallback_UserData cb_user_data; 48 | cb_user_data.Str = str; 49 | cb_user_data.ChainCallback = callback; 50 | cb_user_data.ChainCallbackUserData = user_data; 51 | return InputText(label, (char*)str->c_str(), str->capacity() + 1, flags, InputTextCallback, &cb_user_data); 52 | } 53 | 54 | bool ImGui::InputTextMultiline(const char* label, std::string* str, const ImVec2& size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data) 55 | { 56 | IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); 57 | flags |= ImGuiInputTextFlags_CallbackResize; 58 | 59 | InputTextCallback_UserData cb_user_data; 60 | cb_user_data.Str = str; 61 | cb_user_data.ChainCallback = callback; 62 | cb_user_data.ChainCallbackUserData = user_data; 63 | return InputTextMultiline(label, (char*)str->c_str(), str->capacity() + 1, size, flags, InputTextCallback, &cb_user_data); 64 | } 65 | 66 | bool ImGui::InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data) 67 | { 68 | IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); 69 | flags |= ImGuiInputTextFlags_CallbackResize; 70 | 71 | InputTextCallback_UserData cb_user_data; 72 | cb_user_data.Str = str; 73 | cb_user_data.ChainCallback = callback; 74 | cb_user_data.ChainCallbackUserData = user_data; 75 | return InputTextWithHint(label, hint, (char*)str->c_str(), str->capacity() + 1, flags, InputTextCallback, &cb_user_data); 76 | } 77 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/cpp/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.) 2 | // This is also an example of how you may wrap your own similar types. 3 | 4 | // Compatibility: 5 | // - std::string support is only guaranteed to work from C++11. 6 | // If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture) 7 | 8 | // Changelog: 9 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 10 | 11 | #pragma once 12 | 13 | #include 14 | 15 | namespace ImGui 16 | { 17 | // ImGui::InputText() with std::string 18 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 19 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 20 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 21 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 22 | } 23 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArmchairDevelopers/OpenGameCamera/832bd24c715f450c1ff8652205081337a4cc86ef/OpenGameCamera/imgui/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/freetype/imgui_freetype.h: -------------------------------------------------------------------------------- 1 | // dear imgui: wrapper to use FreeType (instead of stb_truetype) 2 | // Get latest version at https://github.com/ocornut/imgui/tree/master/misc/freetype 3 | // Original code by @Vuhdo (Aleksei Skriabin), maintained by @ocornut 4 | 5 | #pragma once 6 | 7 | #include "imgui.h" // IMGUI_API, ImFontAtlas 8 | 9 | namespace ImGuiFreeType 10 | { 11 | // Hinting greatly impacts visuals (and glyph sizes). 12 | // When disabled, FreeType generates blurrier glyphs, more or less matches the stb's output. 13 | // The Default hinting mode usually looks good, but may distort glyphs in an unusual way. 14 | // The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer. 15 | 16 | // You can set those flags on a per font basis in ImFontConfig::RasterizerFlags. 17 | // Use the 'extra_flags' parameter of BuildFontAtlas() to force a flag on all your fonts. 18 | enum RasterizerFlags 19 | { 20 | // By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter. 21 | NoHinting = 1 << 0, // Disable hinting. This generally generates 'blurrier' bitmap glyphs when the glyph are rendered in any of the anti-aliased modes. 22 | NoAutoHint = 1 << 1, // Disable auto-hinter. 23 | ForceAutoHint = 1 << 2, // Indicates that the auto-hinter is preferred over the font's native hinter. 24 | LightHinting = 1 << 3, // A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph spacing in horizontal text. 25 | MonoHinting = 1 << 4, // Strong hinting algorithm that should only be used for monochrome output. 26 | Bold = 1 << 5, // Styling: Should we artificially embolden the font? 27 | Oblique = 1 << 6, // Styling: Should we slant the font, emulating italic style? 28 | Monochrome = 1 << 7 // Disable anti-aliasing. Combine this with MonoHinting for best results! 29 | }; 30 | 31 | IMGUI_API bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int extra_flags = 0); 32 | 33 | // By default ImGuiFreeType will use IM_ALLOC()/IM_FREE(). 34 | // However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired: 35 | IMGUI_API void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = NULL); 36 | } 37 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/natvis/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Natvis file to describe dear imgui types in the Visual Studio debugger. 3 | With this, types like ImVector<> will be displayed nicely in the debugger. 4 | You can include this file a Visual Studio project file, or install it in Visual Studio folder. 5 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/natvis/imgui.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{Size={Size} Capacity={Capacity}}} 9 | 10 | 11 | Size 12 | Data 13 | 14 | 15 | 16 | 17 | 18 | {{x={x,g} y={y,g}}} 19 | 20 | 21 | 22 | {{x={x,g} y={y,g} z={z,g} w={w,g}}} 23 | 24 | 25 | 26 | {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}} 27 | 28 | Min 29 | Max 30 | Max.x - Min.x 31 | Max.y - Min.y 32 | 33 | 34 | 35 | 36 | {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}} 37 | 38 | 39 | -------------------------------------------------------------------------------- /OpenGameCamera/imgui/misc/single_file/imgui_single_file.h: -------------------------------------------------------------------------------- 1 | // dear imgui: single-file wrapper include 2 | // We use this to validate compiling all *.cpp files in a same compilation unit. 3 | // Users of that technique (also called "Unity builds") can generally provide this themselves, 4 | // so we don't really recommend you use this in your projects. 5 | 6 | // Do this: 7 | // #define IMGUI_IMPLEMENTATION 8 | // Before you include this file in *one* C++ file to create the implementation. 9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. 10 | #include "../../imgui.h" 11 | 12 | #ifdef IMGUI_IMPLEMENTATION 13 | #include "../../imgui.cpp" 14 | #include "../../imgui_demo.cpp" 15 | #include "../../imgui_draw.cpp" 16 | #include "../../imgui_widgets.cpp" 17 | #endif 18 | -------------------------------------------------------------------------------- /OpenGameCamera/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | #include "camerawindow.h" 4 | #include "dofwindow.h" 5 | #include "matchinfowindow.h" 6 | #include "postwindow.h" 7 | 8 | MainWindow::MainWindow() 9 | { 10 | if (gpMainWindow) 11 | { 12 | MessageBox(0, "MainWindow is already initialized.", "Error", MB_ICONERROR); 13 | ExitProcess(EXIT_FAILURE); 14 | } 15 | gpMainWindow = this; 16 | new CameraWindow(); 17 | new DofWindow(); 18 | new PostWindow(); 19 | new MatchInfoWindow(); 20 | } 21 | 22 | bool MainWindow::IsEnabled() 23 | { 24 | return Settings::homeMenu; 25 | } 26 | 27 | void MainWindow::SetEnabled(bool enabled) 28 | { 29 | Settings::homeMenu = enabled; 30 | } 31 | 32 | void MainWindow::Draw() 33 | { 34 | //ImGui::BeginMainMenuBar(); 35 | ImGui::Begin("OpenGameCamera", NULL, ImGuiWindowFlags_AlwaysAutoResize); 36 | if (ImGui::Checkbox(std::string("Show Menu [" + Keys::showMenuKey.name + "]").c_str(), &Settings::homeMenu)) { 37 | Settings::updateMouseState = true; 38 | } 39 | ImGui::Checkbox(std::string("Enable FreeCam [" + Keys::enableFreeCam.name + "]").c_str(), &Settings::enableFreeCam); 40 | ImGui::Checkbox(std::string("Disable UI [" + Keys::disableUi.name + "]").c_str(), &Settings::disableUi); 41 | ImGui::Checkbox("Show Camera Menu", &Settings::cameraMenu); 42 | ImGui::Checkbox("Show DoF Menu", &Settings::dofMenu); 43 | ImGui::Checkbox("Show Post Process Menu", &Settings::postMenu); 44 | ImGui::Checkbox("Show Information Menu", &Settings::informationMenu); 45 | ImGui::Checkbox("Show Match Info Menu", &Settings::matchInfoMenu); 46 | ImGui::End(); 47 | } -------------------------------------------------------------------------------- /OpenGameCamera/mainwindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "window.h" 4 | 5 | class MainWindow : public Window 6 | { 7 | public: 8 | MainWindow(); 9 | ~MainWindow(); 10 | void Draw() override; 11 | bool IsEnabled() override; 12 | void SetEnabled(bool enabled) override; 13 | }; 14 | 15 | static MainWindow* gpMainWindow; 16 | -------------------------------------------------------------------------------- /OpenGameCamera/matchinfowindow.cpp: -------------------------------------------------------------------------------- 1 | #include "matchinfowindow.h" 2 | #include 3 | #include "sdk.hpp" 4 | 5 | MatchInfoWindow::MatchInfoWindow() 6 | { 7 | printf("Initializing MatchInfoWindow\n"); 8 | } 9 | 10 | bool MatchInfoWindow::IsEnabled() 11 | { 12 | return Settings::homeMenu && Settings::matchInfoMenu; 13 | } 14 | 15 | void MatchInfoWindow::SetEnabled(bool enabled) 16 | { 17 | Settings::matchInfoMenu = enabled; 18 | } 19 | 20 | void MatchInfoWindow::Draw() 21 | { 22 | ImGui::Begin("Match Info", NULL, ImGuiWindowFlags_AlwaysAutoResize); 23 | GameContext* context = GameContext::GetInstance(); 24 | bool inLevel = context->GetPlayerManager()->GetLocalPlayer()->controlledControllable != nullptr; 25 | ImGui::Text("Level: %s", context->GetClientLevel()->GetLevelName()); 26 | if (inLevel) { 27 | ImGui::Text("Game Mode: %s", context->GetClientLevel()->GetMatchInfo()->GetMatchMode()); 28 | } 29 | ImGui::Text(""); 30 | ImGui::Text("Local Player Info:"); 31 | ImGui::Text("Name: %s", context->GetPlayerManager()->GetLocalPlayer()->GetName()); 32 | if (inLevel) { 33 | ImGui::Text("Class: %s", context->GetPlayerManager()->GetLocalPlayer()->GetPlayerClassName()); 34 | ImGui::Text(""); 35 | for (int i = 0; i < 64; i++) { 36 | ClientPlayer* player = context->GetPlayerManager()->GetmPPlayer()->PlayerArray[i]; 37 | if (player == nullptr || player->controlledControllable == nullptr) continue; 38 | 39 | Vec3 location = player->controlledControllable->clientSoldierPrediction->Location; 40 | 41 | ImGui::Text("%s (%.0f / %.0f / %.0f)", player->GetName(), location.x, location.y, location.z); 42 | const float ItemSpacing = ImGui::GetStyle().ItemSpacing.x; 43 | 44 | static float TeleportButtonWidth = 100.0f; 45 | float pos = TeleportButtonWidth + ItemSpacing; 46 | ImGui::SameLine(ImGui::GetWindowWidth() - pos); 47 | if (ImGui::SmallButton(std::string("Teleport##" + std::string(player->GetName())).c_str())) 48 | { 49 | Vec4 origin = GameRenderer::GetInstance()->renderView->transform.o; 50 | origin.x = location.x; 51 | origin.y = location.y; 52 | origin.z = location.z; 53 | origin.w = -1; // Hacky fix for resetting the camera position on drawLoop 54 | Globals::g_CameraPosition = origin; 55 | printf("Traveling to %s\n", player->GetName()); 56 | } 57 | TeleportButtonWidth = ImGui::GetItemRectSize().x; 58 | } 59 | } 60 | ImGui::End(); 61 | } -------------------------------------------------------------------------------- /OpenGameCamera/matchinfowindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "window.h" 4 | 5 | class MatchInfoWindow : public Window 6 | { 7 | public: 8 | MatchInfoWindow(); 9 | ~MatchInfoWindow(); 10 | void Draw() override; 11 | bool IsEnabled() override; 12 | void SetEnabled(bool enabled) override; 13 | }; 14 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 20 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #pragma once 30 | 31 | // Size of each memory slot. 32 | #if defined(_M_X64) || defined(__x86_64__) 33 | #define MEMORY_SLOT_SIZE 64 34 | #else 35 | #define MEMORY_SLOT_SIZE 32 36 | #endif 37 | 38 | VOID InitializeBuffer(VOID); 39 | VOID UninitializeBuffer(VOID); 40 | LPVOID AllocateBuffer(LPVOID pOrigin); 41 | VOID FreeBuffer(LPVOID pBuffer); 42 | BOOL IsExecutableAddress(LPVOID pAddress); 43 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/hde/hde32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 32 3 | * Copyright (c) 2006-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | * hde32.h: C/C++ header file 7 | * 8 | */ 9 | 10 | #ifndef _HDE32_H_ 11 | #define _HDE32_H_ 12 | 13 | /* stdint.h - C99 standard header 14 | * http://en.wikipedia.org/wiki/stdint.h 15 | * 16 | * if your compiler doesn't contain "stdint.h" header (for 17 | * example, Microsoft Visual C++), you can download file: 18 | * http://www.azillionmonkeys.com/qed/pstdint.h 19 | * and change next line to: 20 | * #include "pstdint.h" 21 | */ 22 | #include "pstdint.h" 23 | 24 | #define F_MODRM 0x00000001 25 | #define F_SIB 0x00000002 26 | #define F_IMM8 0x00000004 27 | #define F_IMM16 0x00000008 28 | #define F_IMM32 0x00000010 29 | #define F_DISP8 0x00000020 30 | #define F_DISP16 0x00000040 31 | #define F_DISP32 0x00000080 32 | #define F_RELATIVE 0x00000100 33 | #define F_2IMM16 0x00000800 34 | #define F_ERROR 0x00001000 35 | #define F_ERROR_OPCODE 0x00002000 36 | #define F_ERROR_LENGTH 0x00004000 37 | #define F_ERROR_LOCK 0x00008000 38 | #define F_ERROR_OPERAND 0x00010000 39 | #define F_PREFIX_REPNZ 0x01000000 40 | #define F_PREFIX_REPX 0x02000000 41 | #define F_PREFIX_REP 0x03000000 42 | #define F_PREFIX_66 0x04000000 43 | #define F_PREFIX_67 0x08000000 44 | #define F_PREFIX_LOCK 0x10000000 45 | #define F_PREFIX_SEG 0x20000000 46 | #define F_PREFIX_ANY 0x3f000000 47 | 48 | #define PREFIX_SEGMENT_CS 0x2e 49 | #define PREFIX_SEGMENT_SS 0x36 50 | #define PREFIX_SEGMENT_DS 0x3e 51 | #define PREFIX_SEGMENT_ES 0x26 52 | #define PREFIX_SEGMENT_FS 0x64 53 | #define PREFIX_SEGMENT_GS 0x65 54 | #define PREFIX_LOCK 0xf0 55 | #define PREFIX_REPNZ 0xf2 56 | #define PREFIX_REPX 0xf3 57 | #define PREFIX_OPERAND_SIZE 0x66 58 | #define PREFIX_ADDRESS_SIZE 0x67 59 | 60 | #pragma pack(push,1) 61 | 62 | typedef struct { 63 | uint8_t len; 64 | uint8_t p_rep; 65 | uint8_t p_lock; 66 | uint8_t p_seg; 67 | uint8_t p_66; 68 | uint8_t p_67; 69 | uint8_t opcode; 70 | uint8_t opcode2; 71 | uint8_t modrm; 72 | uint8_t modrm_mod; 73 | uint8_t modrm_reg; 74 | uint8_t modrm_rm; 75 | uint8_t sib; 76 | uint8_t sib_scale; 77 | uint8_t sib_index; 78 | uint8_t sib_base; 79 | union { 80 | uint8_t imm8; 81 | uint16_t imm16; 82 | uint32_t imm32; 83 | } imm; 84 | union { 85 | uint8_t disp8; 86 | uint16_t disp16; 87 | uint32_t disp32; 88 | } disp; 89 | uint32_t flags; 90 | } hde32s; 91 | 92 | #pragma pack(pop) 93 | 94 | #ifdef __cplusplus 95 | extern "C" { 96 | #endif 97 | 98 | /* __cdecl */ 99 | unsigned int hde32_disasm(const void *code, hde32s *hs); 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* _HDE32_H_ */ 106 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/hde/hde64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 64 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | * hde64.h: C/C++ header file 7 | * 8 | */ 9 | 10 | #ifndef _HDE64_H_ 11 | #define _HDE64_H_ 12 | 13 | /* stdint.h - C99 standard header 14 | * http://en.wikipedia.org/wiki/stdint.h 15 | * 16 | * if your compiler doesn't contain "stdint.h" header (for 17 | * example, Microsoft Visual C++), you can download file: 18 | * http://www.azillionmonkeys.com/qed/pstdint.h 19 | * and change next line to: 20 | * #include "pstdint.h" 21 | */ 22 | #include "pstdint.h" 23 | 24 | #define F_MODRM 0x00000001 25 | #define F_SIB 0x00000002 26 | #define F_IMM8 0x00000004 27 | #define F_IMM16 0x00000008 28 | #define F_IMM32 0x00000010 29 | #define F_IMM64 0x00000020 30 | #define F_DISP8 0x00000040 31 | #define F_DISP16 0x00000080 32 | #define F_DISP32 0x00000100 33 | #define F_RELATIVE 0x00000200 34 | #define F_ERROR 0x00001000 35 | #define F_ERROR_OPCODE 0x00002000 36 | #define F_ERROR_LENGTH 0x00004000 37 | #define F_ERROR_LOCK 0x00008000 38 | #define F_ERROR_OPERAND 0x00010000 39 | #define F_PREFIX_REPNZ 0x01000000 40 | #define F_PREFIX_REPX 0x02000000 41 | #define F_PREFIX_REP 0x03000000 42 | #define F_PREFIX_66 0x04000000 43 | #define F_PREFIX_67 0x08000000 44 | #define F_PREFIX_LOCK 0x10000000 45 | #define F_PREFIX_SEG 0x20000000 46 | #define F_PREFIX_REX 0x40000000 47 | #define F_PREFIX_ANY 0x7f000000 48 | 49 | #define PREFIX_SEGMENT_CS 0x2e 50 | #define PREFIX_SEGMENT_SS 0x36 51 | #define PREFIX_SEGMENT_DS 0x3e 52 | #define PREFIX_SEGMENT_ES 0x26 53 | #define PREFIX_SEGMENT_FS 0x64 54 | #define PREFIX_SEGMENT_GS 0x65 55 | #define PREFIX_LOCK 0xf0 56 | #define PREFIX_REPNZ 0xf2 57 | #define PREFIX_REPX 0xf3 58 | #define PREFIX_OPERAND_SIZE 0x66 59 | #define PREFIX_ADDRESS_SIZE 0x67 60 | 61 | #pragma pack(push,1) 62 | 63 | typedef struct { 64 | uint8_t len; 65 | uint8_t p_rep; 66 | uint8_t p_lock; 67 | uint8_t p_seg; 68 | uint8_t p_66; 69 | uint8_t p_67; 70 | uint8_t rex; 71 | uint8_t rex_w; 72 | uint8_t rex_r; 73 | uint8_t rex_x; 74 | uint8_t rex_b; 75 | uint8_t opcode; 76 | uint8_t opcode2; 77 | uint8_t modrm; 78 | uint8_t modrm_mod; 79 | uint8_t modrm_reg; 80 | uint8_t modrm_rm; 81 | uint8_t sib; 82 | uint8_t sib_scale; 83 | uint8_t sib_index; 84 | uint8_t sib_base; 85 | union { 86 | uint8_t imm8; 87 | uint16_t imm16; 88 | uint32_t imm32; 89 | uint64_t imm64; 90 | } imm; 91 | union { 92 | uint8_t disp8; 93 | uint16_t disp16; 94 | uint32_t disp32; 95 | } disp; 96 | uint32_t flags; 97 | } hde64s; 98 | 99 | #pragma pack(pop) 100 | 101 | #ifdef __cplusplus 102 | extern "C" { 103 | #endif 104 | 105 | /* __cdecl */ 106 | unsigned int hde64_disasm(const void *code, hde64s *hs); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif /* _HDE64_H_ */ 113 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/hde/pstdint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include 30 | 31 | // Integer types for HDE. 32 | typedef INT8 int8_t; 33 | typedef INT16 int16_t; 34 | typedef INT32 int32_t; 35 | typedef INT64 int64_t; 36 | typedef UINT8 uint8_t; 37 | typedef UINT16 uint16_t; 38 | typedef UINT32 uint32_t; 39 | typedef UINT64 uint64_t; 40 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/hde/table32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 32 C 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | */ 7 | 8 | #define C_NONE 0x00 9 | #define C_MODRM 0x01 10 | #define C_IMM8 0x02 11 | #define C_IMM16 0x04 12 | #define C_IMM_P66 0x10 13 | #define C_REL8 0x20 14 | #define C_REL32 0x40 15 | #define C_GROUP 0x80 16 | #define C_ERROR 0xff 17 | 18 | #define PRE_ANY 0x00 19 | #define PRE_NONE 0x01 20 | #define PRE_F2 0x02 21 | #define PRE_F3 0x04 22 | #define PRE_66 0x08 23 | #define PRE_67 0x10 24 | #define PRE_LOCK 0x20 25 | #define PRE_SEG 0x40 26 | #define PRE_ALL 0xff 27 | 28 | #define DELTA_OPCODES 0x4a 29 | #define DELTA_FPU_REG 0xf1 30 | #define DELTA_FPU_MODRM 0xf8 31 | #define DELTA_PREFIXES 0x130 32 | #define DELTA_OP_LOCK_OK 0x1a1 33 | #define DELTA_OP2_LOCK_OK 0x1b9 34 | #define DELTA_OP_ONLY_MEM 0x1cb 35 | #define DELTA_OP2_ONLY_MEM 0x1da 36 | 37 | unsigned char hde32_table[] = { 38 | 0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3, 39 | 0xa8,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xac,0xaa,0xb2,0xaa,0x9f,0x9f, 40 | 0x9f,0x9f,0xb5,0xa3,0xa3,0xa4,0xaa,0xaa,0xba,0xaa,0x96,0xaa,0xa8,0xaa,0xc3, 41 | 0xc3,0x96,0x96,0xb7,0xae,0xd6,0xbd,0xa3,0xc5,0xa3,0xa3,0x9f,0xc3,0x9c,0xaa, 42 | 0xaa,0xac,0xaa,0xbf,0x03,0x7f,0x11,0x7f,0x01,0x7f,0x01,0x3f,0x01,0x01,0x90, 43 | 0x82,0x7d,0x97,0x59,0x59,0x59,0x59,0x59,0x7f,0x59,0x59,0x60,0x7d,0x7f,0x7f, 44 | 0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x9a,0x88,0x7d, 45 | 0x59,0x50,0x50,0x50,0x50,0x59,0x59,0x59,0x59,0x61,0x94,0x61,0x9e,0x59,0x59, 46 | 0x85,0x59,0x92,0xa3,0x60,0x60,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59, 47 | 0x59,0x59,0x9f,0x01,0x03,0x01,0x04,0x03,0xd5,0x03,0xcc,0x01,0xbc,0x03,0xf0, 48 | 0x10,0x10,0x10,0x10,0x50,0x50,0x50,0x50,0x14,0x20,0x20,0x20,0x20,0x01,0x01, 49 | 0x01,0x01,0xc4,0x02,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0xc0,0xc2,0x10,0x11, 50 | 0x02,0x03,0x11,0x03,0x03,0x04,0x00,0x00,0x14,0x00,0x02,0x00,0x00,0xc6,0xc8, 51 | 0x02,0x02,0x02,0x02,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xca, 52 | 0x01,0x01,0x01,0x00,0x06,0x00,0x04,0x00,0xc0,0xc2,0x01,0x01,0x03,0x01,0xff, 53 | 0xff,0x01,0x00,0x03,0xc4,0xc4,0xc6,0x03,0x01,0x01,0x01,0xff,0x03,0x03,0x03, 54 | 0xc8,0x40,0x00,0x0a,0x00,0x04,0x00,0x00,0x00,0x00,0x7f,0x00,0x33,0x01,0x00, 55 | 0x00,0x00,0x00,0x00,0x00,0xff,0xbf,0xff,0xff,0x00,0x00,0x00,0x00,0x07,0x00, 56 | 0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 57 | 0x00,0xff,0xff,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 58 | 0x7f,0x00,0x00,0xff,0x4a,0x4a,0x4a,0x4a,0x4b,0x52,0x4a,0x4a,0x4a,0x4a,0x4f, 59 | 0x4c,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x55,0x45,0x40,0x4a,0x4a,0x4a, 60 | 0x45,0x59,0x4d,0x46,0x4a,0x5d,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, 61 | 0x4a,0x4a,0x4a,0x4a,0x4a,0x61,0x63,0x67,0x4e,0x4a,0x4a,0x6b,0x6d,0x4a,0x4a, 62 | 0x45,0x6d,0x4a,0x4a,0x44,0x45,0x4a,0x4a,0x00,0x00,0x00,0x02,0x0d,0x06,0x06, 63 | 0x06,0x06,0x0e,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x00,0x06,0x06,0x02,0x06, 64 | 0x00,0x0a,0x0a,0x07,0x07,0x06,0x02,0x05,0x05,0x02,0x02,0x00,0x00,0x04,0x04, 65 | 0x04,0x04,0x00,0x00,0x00,0x0e,0x05,0x06,0x06,0x06,0x01,0x06,0x00,0x00,0x08, 66 | 0x00,0x10,0x00,0x18,0x00,0x20,0x00,0x28,0x00,0x30,0x00,0x80,0x01,0x82,0x01, 67 | 0x86,0x00,0xf6,0xcf,0xfe,0x3f,0xab,0x00,0xb0,0x00,0xb1,0x00,0xb3,0x00,0xba, 68 | 0xf8,0xbb,0x00,0xc0,0x00,0xc1,0x00,0xc7,0xbf,0x62,0xff,0x00,0x8d,0xff,0x00, 69 | 0xc4,0xff,0x00,0xc5,0xff,0x00,0xff,0xff,0xeb,0x01,0xff,0x0e,0x12,0x08,0x00, 70 | 0x13,0x09,0x00,0x16,0x08,0x00,0x17,0x09,0x00,0x2b,0x09,0x00,0xae,0xff,0x07, 71 | 0xb2,0xff,0x00,0xb4,0xff,0x00,0xb5,0xff,0x00,0xc3,0x01,0x00,0xc7,0xff,0xbf, 72 | 0xe7,0x08,0x00,0xf0,0x02,0x00 73 | }; 74 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/hde/table64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 64 C 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | */ 7 | 8 | #define C_NONE 0x00 9 | #define C_MODRM 0x01 10 | #define C_IMM8 0x02 11 | #define C_IMM16 0x04 12 | #define C_IMM_P66 0x10 13 | #define C_REL8 0x20 14 | #define C_REL32 0x40 15 | #define C_GROUP 0x80 16 | #define C_ERROR 0xff 17 | 18 | #define PRE_ANY 0x00 19 | #define PRE_NONE 0x01 20 | #define PRE_F2 0x02 21 | #define PRE_F3 0x04 22 | #define PRE_66 0x08 23 | #define PRE_67 0x10 24 | #define PRE_LOCK 0x20 25 | #define PRE_SEG 0x40 26 | #define PRE_ALL 0xff 27 | 28 | #define DELTA_OPCODES 0x4a 29 | #define DELTA_FPU_REG 0xfd 30 | #define DELTA_FPU_MODRM 0x104 31 | #define DELTA_PREFIXES 0x13c 32 | #define DELTA_OP_LOCK_OK 0x1ae 33 | #define DELTA_OP2_LOCK_OK 0x1c6 34 | #define DELTA_OP_ONLY_MEM 0x1d8 35 | #define DELTA_OP2_ONLY_MEM 0x1e7 36 | 37 | unsigned char hde64_table[] = { 38 | 0xa5,0xaa,0xa5,0xb8,0xa5,0xaa,0xa5,0xaa,0xa5,0xb8,0xa5,0xb8,0xa5,0xb8,0xa5, 39 | 0xb8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xac,0xc0,0xcc,0xc0,0xa1,0xa1, 40 | 0xa1,0xa1,0xb1,0xa5,0xa5,0xa6,0xc0,0xc0,0xd7,0xda,0xe0,0xc0,0xe4,0xc0,0xea, 41 | 0xea,0xe0,0xe0,0x98,0xc8,0xee,0xf1,0xa5,0xd3,0xa5,0xa5,0xa1,0xea,0x9e,0xc0, 42 | 0xc0,0xc2,0xc0,0xe6,0x03,0x7f,0x11,0x7f,0x01,0x7f,0x01,0x3f,0x01,0x01,0xab, 43 | 0x8b,0x90,0x64,0x5b,0x5b,0x5b,0x5b,0x5b,0x92,0x5b,0x5b,0x76,0x90,0x92,0x92, 44 | 0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x6a,0x73,0x90, 45 | 0x5b,0x52,0x52,0x52,0x52,0x5b,0x5b,0x5b,0x5b,0x77,0x7c,0x77,0x85,0x5b,0x5b, 46 | 0x70,0x5b,0x7a,0xaf,0x76,0x76,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b, 47 | 0x5b,0x5b,0x86,0x01,0x03,0x01,0x04,0x03,0xd5,0x03,0xd5,0x03,0xcc,0x01,0xbc, 48 | 0x03,0xf0,0x03,0x03,0x04,0x00,0x50,0x50,0x50,0x50,0xff,0x20,0x20,0x20,0x20, 49 | 0x01,0x01,0x01,0x01,0xc4,0x02,0x10,0xff,0xff,0xff,0x01,0x00,0x03,0x11,0xff, 50 | 0x03,0xc4,0xc6,0xc8,0x02,0x10,0x00,0xff,0xcc,0x01,0x01,0x01,0x00,0x00,0x00, 51 | 0x00,0x01,0x01,0x03,0x01,0xff,0xff,0xc0,0xc2,0x10,0x11,0x02,0x03,0x01,0x01, 52 | 0x01,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x10, 53 | 0x10,0x10,0x10,0x02,0x10,0x00,0x00,0xc6,0xc8,0x02,0x02,0x02,0x02,0x06,0x00, 54 | 0x04,0x00,0x02,0xff,0x00,0xc0,0xc2,0x01,0x01,0x03,0x03,0x03,0xca,0x40,0x00, 55 | 0x0a,0x00,0x04,0x00,0x00,0x00,0x00,0x7f,0x00,0x33,0x01,0x00,0x00,0x00,0x00, 56 | 0x00,0x00,0xff,0xbf,0xff,0xff,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0xff,0x00, 57 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff, 58 | 0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00, 59 | 0xff,0x40,0x40,0x40,0x40,0x41,0x49,0x40,0x40,0x40,0x40,0x4c,0x42,0x40,0x40, 60 | 0x40,0x40,0x40,0x40,0x40,0x40,0x4f,0x44,0x53,0x40,0x40,0x40,0x44,0x57,0x43, 61 | 0x5c,0x40,0x60,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, 62 | 0x40,0x40,0x64,0x66,0x6e,0x6b,0x40,0x40,0x6a,0x46,0x40,0x40,0x44,0x46,0x40, 63 | 0x40,0x5b,0x44,0x40,0x40,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x01,0x06, 64 | 0x06,0x02,0x06,0x06,0x00,0x06,0x00,0x0a,0x0a,0x00,0x00,0x00,0x02,0x07,0x07, 65 | 0x06,0x02,0x0d,0x06,0x06,0x06,0x0e,0x05,0x05,0x02,0x02,0x00,0x00,0x04,0x04, 66 | 0x04,0x04,0x05,0x06,0x06,0x06,0x00,0x00,0x00,0x0e,0x00,0x00,0x08,0x00,0x10, 67 | 0x00,0x18,0x00,0x20,0x00,0x28,0x00,0x30,0x00,0x80,0x01,0x82,0x01,0x86,0x00, 68 | 0xf6,0xcf,0xfe,0x3f,0xab,0x00,0xb0,0x00,0xb1,0x00,0xb3,0x00,0xba,0xf8,0xbb, 69 | 0x00,0xc0,0x00,0xc1,0x00,0xc7,0xbf,0x62,0xff,0x00,0x8d,0xff,0x00,0xc4,0xff, 70 | 0x00,0xc5,0xff,0x00,0xff,0xff,0xeb,0x01,0xff,0x0e,0x12,0x08,0x00,0x13,0x09, 71 | 0x00,0x16,0x08,0x00,0x17,0x09,0x00,0x2b,0x09,0x00,0xae,0xff,0x07,0xb2,0xff, 72 | 0x00,0xb4,0xff,0x00,0xb5,0xff,0x00,0xc3,0x01,0x00,0xc7,0xff,0xbf,0xe7,0x08, 73 | 0x00,0xf0,0x02,0x00 74 | }; 75 | -------------------------------------------------------------------------------- /OpenGameCamera/minhook/trampoline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 20 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #pragma once 30 | 31 | #pragma pack(push, 1) 32 | 33 | // Structs for writing x86/x64 instructions. 34 | 35 | // 8-bit relative jump. 36 | typedef struct _JMP_REL_SHORT 37 | { 38 | UINT8 opcode; // EB xx: JMP +2+xx 39 | UINT8 operand; 40 | } JMP_REL_SHORT, *PJMP_REL_SHORT; 41 | 42 | // 32-bit direct relative jump/call. 43 | typedef struct _JMP_REL 44 | { 45 | UINT8 opcode; // E9/E8 xxxxxxxx: JMP/CALL +5+xxxxxxxx 46 | UINT32 operand; // Relative destination address 47 | } JMP_REL, *PJMP_REL, CALL_REL; 48 | 49 | // 64-bit indirect absolute jump. 50 | typedef struct _JMP_ABS 51 | { 52 | UINT8 opcode0; // FF25 00000000: JMP [+6] 53 | UINT8 opcode1; 54 | UINT32 dummy; 55 | UINT64 address; // Absolute destination address 56 | } JMP_ABS, *PJMP_ABS; 57 | 58 | // 64-bit indirect absolute call. 59 | typedef struct _CALL_ABS 60 | { 61 | UINT8 opcode0; // FF15 00000002: CALL [+6] 62 | UINT8 opcode1; 63 | UINT32 dummy0; 64 | UINT8 dummy1; // EB 08: JMP +10 65 | UINT8 dummy2; 66 | UINT64 address; // Absolute destination address 67 | } CALL_ABS; 68 | 69 | // 32-bit direct relative conditional jumps. 70 | typedef struct _JCC_REL 71 | { 72 | UINT8 opcode0; // 0F8* xxxxxxxx: J** +6+xxxxxxxx 73 | UINT8 opcode1; 74 | UINT32 operand; // Relative destination address 75 | } JCC_REL; 76 | 77 | // 64bit indirect absolute conditional jumps that x64 lacks. 78 | typedef struct _JCC_ABS 79 | { 80 | UINT8 opcode; // 7* 0E: J** +16 81 | UINT8 dummy0; 82 | UINT8 dummy1; // FF25 00000000: JMP [+6] 83 | UINT8 dummy2; 84 | UINT32 dummy3; 85 | UINT64 address; // Absolute destination address 86 | } JCC_ABS; 87 | 88 | #pragma pack(pop) 89 | 90 | typedef struct _TRAMPOLINE 91 | { 92 | LPVOID pTarget; // [In] Address of the target function. 93 | LPVOID pDetour; // [In] Address of the detour function. 94 | LPVOID pTrampoline; // [In] Buffer address for the trampoline and relay function. 95 | 96 | #if defined(_M_X64) || defined(__x86_64__) 97 | LPVOID pRelay; // [Out] Address of the relay function. 98 | #endif 99 | BOOL patchAbove; // [Out] Should use the hot patch area? 100 | UINT nIP; // [Out] Number of the instruction boundaries. 101 | UINT8 oldIPs[8]; // [Out] Instruction boundaries of the target function. 102 | UINT8 newIPs[8]; // [Out] Instruction boundaries of the trampoline function. 103 | } TRAMPOLINE, *PTRAMPOLINE; 104 | 105 | BOOL CreateTrampolineFunction(PTRAMPOLINE ct); 106 | -------------------------------------------------------------------------------- /OpenGameCamera/postwindow.cpp: -------------------------------------------------------------------------------- 1 | #define NOMINMAX 2 | #include "postwindow.h" 3 | #include 4 | #include 5 | 6 | PostWindow::PostWindow() 7 | { 8 | printf("Initializing PostWindow\n"); 9 | } 10 | 11 | bool PostWindow::IsEnabled() 12 | { 13 | return Settings::homeMenu && Settings::postMenu; 14 | } 15 | 16 | void PostWindow::SetEnabled(bool enabled) 17 | { 18 | Settings::cameraMenu = enabled; 19 | } 20 | 21 | void PostWindow::Draw() 22 | { 23 | ImGui::Begin("Post Process", NULL, ImGuiWindowFlags_AlwaysAutoResize); 24 | //ImGui::Checkbox("Force Post Process Settings", &Settings::enablePost); 25 | ImGui::Checkbox("Enable Bloom", &Settings::forceBloomEnable); 26 | ImGui::Checkbox("Enable Vignette", &Settings::VignetteEnable); 27 | ImGui::Checkbox("Enable Color Grading", &Settings::enableGrading); 28 | ImGui::Checkbox("Enable Film Grain", &Settings::FilmGrainEnable); 29 | ImGui::Checkbox("Enable Chromatic Aberration", &Settings::ChromaticAberrationAllowed); 30 | ImGui::Checkbox("Enable Lens Distortion", &Settings::LensDistortionAllowed); 31 | ImGui::End(); 32 | } -------------------------------------------------------------------------------- /OpenGameCamera/postwindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "window.h" 4 | 5 | class PostWindow : public Window 6 | { 7 | public: 8 | PostWindow(); 9 | ~PostWindow(); 10 | void Draw() override; 11 | bool IsEnabled() override; 12 | void SetEnabled(bool enabled) override; 13 | }; 14 | -------------------------------------------------------------------------------- /OpenGameCamera/renderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #pragma comment(lib, "d3d11.lib") 5 | 6 | #include "BasicTypes.hpp" 7 | #include "sdk.hpp" 8 | #include 9 | #include "window.h" 10 | 11 | #include 12 | #include "mainwindow.h" 13 | 14 | class Renderer 15 | { 16 | public: 17 | typedef void(__fastcall* tCustomDrawCallback)(); 18 | 19 | static std::list pUiInstances; 20 | 21 | MainWindow* pMainWindow = nullptr; 22 | ID3D11Device* pCurrentDevice = nullptr; 23 | ID3D11DeviceContext* pCurrentContext = nullptr; 24 | ID3D11RenderTargetView* pCurrentView = nullptr; 25 | 26 | Renderer(); 27 | ~Renderer(); 28 | 29 | static void RegisterEventHandler(Window* ui) 30 | { 31 | pUiInstances.push_back(ui); 32 | } 33 | }; 34 | 35 | static Renderer* gpRenderer; -------------------------------------------------------------------------------- /OpenGameCamera/window.cpp: -------------------------------------------------------------------------------- 1 | #include "window.h" 2 | 3 | #include "imgui/imgui.h" 4 | #include "renderer.h" 5 | 6 | Window::Window() 7 | { 8 | Renderer::RegisterEventHandler(this); 9 | }; 10 | 11 | void Window::Draw() 12 | { 13 | }; 14 | 15 | void Window::Resize() 16 | { 17 | }; 18 | 19 | bool Window::IsEnabled() 20 | { 21 | return false; 22 | }; 23 | 24 | void Window::SetEnabled(bool enabled) 25 | { 26 | }; -------------------------------------------------------------------------------- /OpenGameCamera/window.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "Globals.hpp" 5 | #include "imgui/imgui.h" 6 | 7 | class Window 8 | { 9 | public: 10 | Window(); 11 | virtual void Draw(); 12 | virtual void Resize(); 13 | virtual bool IsEnabled(); 14 | virtual void SetEnabled(bool enabled); 15 | }; 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # What is OpenGameCamera? 2 | 3 | OpenGameCamera is a free, open-source camera tool for Frostbite games. Our aim is to build a robust toolset with the freedom to allow content creators, modders and PC users to create stunning artwork and movies. 4 | 5 | ## Instructions 6 | 7 | ### [Download the latest version of OpenGameCamera](https://github.com/coltonon/OpenGameCamera/releases/download/0.8.6/OpenGameCamera.exe) 8 | 9 | 1. Download the OpenGameCamera Launcher. 10 | 11 | 2. Start **Star Wars Battlefront II (2017)** 12 | 13 | 3. Run the Launcher and click 'Launch OpenGameCamera'. 14 | 15 | 4. Make awesome content. 16 | 17 | ### Discord Server 18 | 19 | For communication, support, sharing, and development, join our Discord server: [OpenGameCamera Discord](https://discord.gg/HZ676Ff) 20 | 21 | ### Join the team! 22 | 23 | We are currently expanding the core dev team, so if you know a thing or two about reverse engineering game camera systems, reach out! We're most active on [the official OpenGameCamera Discord](https://discord.gg/HZ676Ff) 24 | 25 | ## Key Bindings 26 | 27 | | Action | Key | 28 | | --- | --- | 29 | | **Show/Hide OpenGameCamera** | Home | 30 | | **Enter/Exit camera** | F5 | 31 | | **Ignore input** | F6 | 32 | | **Show/Hide UI** | F7 | 33 | | **Freeze Time** | F8 | 34 | | **Toggle Depth of Field** | F9 | 35 | | **Move camera** | WASD | 36 | | **Cam up** | Space | 37 | | **Cam down** | Ctrl | 38 | | **Fast move** | Shift | 39 | | **Slow move** | Alt | 40 | | **Toggle Resolution Scale** | Insert | 41 | | **Eject mod** | End | 42 | 43 | *Hint: You can Ctrl+Click on a slider to type in a value!* 44 | 45 | # Building 46 | 47 | ## Code Structure 48 | 49 | | File | Purpose | 50 | | --- | --- | 51 | | **Source.cpp** | The entrypoint of the modification, and where all of the magic happens | 52 | | **MouseManager.hpp** | Management class for hooking the mouse state, allowing the mod to enable/disable the cursor at will | 53 | | **KeyMan.cpp/hpp** | HotKey management. Also defined here are the default keybindings. | 54 | | **Renderer.hpp** | Code for hooking into the engine's DebugRenderer functions. | 55 | | **Menu.hpp** | Using renderer.hpp, this code allows easily building and displaying menus. | 56 | | **Candy.hpp** | Hooking class. Allows VTable hooking, and a wrapper for MinHook. | 57 | | **Typedefs.hpp** | Contains typedefs used for our hooks. | 58 | | **sdk.hpp** | The reverse-engineered game classes. | 59 | | **BasicTypes.hpp** | Definitions for things like vectors and matrices. Serves to replate DirectX. | 60 | 61 | ## Building guide 62 | 63 | The code is designed to be easily built. You don't even need the DirectX SDK installed. 64 | 65 | 1. Clone and extract 66 | 2. Open in Visual Studio 67 | 3. Build (Ctrl-B) 68 | 69 | ## Credits 70 | 71 | [Coltonon](https://github.com/coltonon) 72 | [BattleDash](https://github.com/BattleDash) 73 | [Dangercat](https://github.com/Dangercato) 74 | [cstdr](https://github.com/cstdr1) 75 | [GalaxyMan](https://github.com/GalaxyEham) 76 | [Dyvinia](https://github.com/Dyvinia) 77 | [kiwidog](https://github.com/kiwidoggie) 78 | 79 | 80 | # Docs 81 | 82 | [Here](https://github.com/coltonon/OpenGameCamera/tree/master/Docs) you can find extended documentation, as well as explantions on various concepts. 83 | --------------------------------------------------------------------------------