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
| //--- usage ------------------------------------------------// | |
| void usage() { | |
| VertexBindings(vbindings) = { | |
| { .binding = 0, .stride = 12, PerVertex }, | |
| { .binding = 1, .stride = 12, PerVertex }, | |
| { .binding = 2, .stride = 8 , PerVertex }, | |
| { .binding = 3, .stride = 16, PerInstance }, | |
| }; |
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
| //clang 3.8.0 | |
| // File: factory-universal1.cpp1 | |
| // Author: Caio Rodrigues | |
| // Brief: Universal Object Factory which can instantiate objects of any type. | |
| // Note: The benefit of this implementation is that object doesn't need to have | |
| // the same base class and the factory has no knowledge about any base class. | |
| //---------------------------------------------------------------------------------------------- | |
| #include <iostream> |
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
| --[[ | |
| * Copyright (c) 2011-2016 - Ashita Development Team | |
| * | |
| * Ashita is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * Ashita is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
| 3-6 million lines of code dealing with the hardware abstraction layers, plus another million per API supported. The backing function for Clear in D3D 9 was close to a thousand lines of just logic dealing with how exactly to respond to the command. It'd then call out to the correct function to actually modify the buffer in question. The level of complexity internally is enormous and winding, and even inside the driver code it can be tricky to work out how exactly you get to the fast-path behaviors. Additionally the APIs don't do a great job of matching the hardware, which means that even in the best cases the driver is covering up for a LOT of things you don't know about. There are many, many shadow operations and shadow copies of things down there. | |
| The only advantage that DX12 has are the same one from any DirectX vs OpenGL, for developers: | |
| -> You can fully debug DirectX. OpenGL you can't. You only have absolute pain in the ass, and super primitive debug tools on OpenGL, making development slow and tedious ( |
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
| #pragma once | |
| #include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders | |
| namespace ImGui | |
| { | |
| inline void SetupImGuiStyle( bool bStyleDark_, float alpha_ ) | |
| { |
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
| D [0-9] | |
| L [a-zA-Z_] | |
| H [a-fA-F0-9] | |
| E ([Ee][+-]?{D}+) | |
| P ([Pp][+-]?{D}+) | |
| FS (f|F|l|L) | |
| IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U)) | |
| %{ | |
| #include <stdio.h> |
In response to a StackOverflow question:
This is code to build a Direct3D wrapper DLL, intercepting all calls to Direct3D interface functions so that you can draw your own objects to display over the game. Just plop the DLL into the same folder as the game's executable, and it should load it as if it were the real d3d9.dll file. It still forwards all calls to the real one in system32, just allows stuff to happen in between. original stackoverflow answer
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |