This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Configuration; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using Mono.Cecil; | |
| using Mono.Cecil.Pdb; | |
| namespace InsertExportSymbolForNvidiaOptimus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /rex$ cat log.log | |
| [2019-10-13 21:20:30] [thread_pool/info] | starting pool with 4 threads | |
| [2019-10-13 21:20:30] [thread_pool/info] | starting thread 1 | |
| [2019-10-13 21:20:30] [thread_pool/info] | starting thread 2 | |
| [2019-10-13 21:20:30] [thread_pool/info] | starting thread 3 | |
| [2019-10-13 21:20:30] [thread_pool/info] | starting thread 4 | |
| [2019-10-13 21:20:30] [thread_pool/info] | started pool with 4 threads (took 0.42 ms) | |
| [2019-10-13 21:20:30] [global/verbose] | 0x55c00f28be60 init: system/half | |
| [2019-10-13 21:20:30] [global/verbose] | 0x55c00f28ccd8 init: cvars/gl4.anisotropy | |
| [2019-10-13 21:20:30] [console/info] | registered 'gl4.anisotropy' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auto t1 = glfwGetTime(); | |
| auto deltaTimeAverage = 0.0f; | |
| auto deltaTimeAverageSquared = 0.0f; | |
| auto framesToAverage = 100; | |
| auto frameCounter = 0; | |
| glfwSwapInterval(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Window x:Class="Editor.Views.MainView" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:viewModels="clr-namespace:Editor.ViewModels" | |
| xmlns:otkc="clr-namespace:OpenTK.Wpf;assembly=GLWpfControl" | |
| WindowStartupLocation="CenterScreen" | |
| d:DataContext="{d:DesignInstance viewModels:MainViewModel}" | |
| mc:Ignorable="d" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DelegateCommand : ICommand | |
| { | |
| private readonly Action _action; | |
| private readonly Func<bool> _canExecute; | |
| public event EventHandler CanExecuteChanged | |
| { | |
| add => CommandManager.RequerySuggested += value; | |
| remove => CommandManager.RequerySuggested -= value; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Numerics; | |
| using SharpDX.Mathematics.Interop; | |
| using Xacor.Game; | |
| using Xacor.Graphics; | |
| using Xacor.Graphics.DX; | |
| using Xacor.Platform; | |
| namespace Xacor.Demo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define DIRECTINPUT_VERSION 0x0800 | |
| #include <d3d11.h> | |
| #include <dinput.h> | |
| #include <functional> | |
| #include <string> | |
| #include <windows.h> | |
| template <typename t> | |
| std::string hex_number(t number, size_t hex_len = sizeof(t) << 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void GetVerticesAndIndicesFromModel(Model model, out Vector3[] vertices, out int[] indices) | |
| { | |
| var verticesList = new List<Vector3>(); | |
| var indicesList = new List<int>(); | |
| var transforms = new Matrix[model.Bones.Count]; | |
| model.CopyAbsoluteBoneTransformsTo(transforms); | |
| Matrix transform; | |
| foreach (ModelMesh mesh in model.Meshes) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Xacor.Graphics | |
| { | |
| public class Shader : IDisposable | |
| { | |
| public class VirtualShaderFile | |
| { | |
| public string Name { get; } | |
| public string Text { get; } | |
| public VirtualShaderFile(string name, string text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) | |
| { | |
| base.OnActivityResult(requestCode, resultCode, data); | |
| if (requestCode == IntentRequestCodes.OpenFolderForRawImportRequestCode) | |
| { | |
| var folderUri = data.Data; | |
| var documentFolderUri = DocumentsContract.BuildChildDocumentsUriUsingTree(folderUri, DocumentsContract.GetTreeDocumentId(folderUri)); | |
| var projection = new[] |