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
| // from https://odin-lang.org/docs/overview/#when-statements, see end of that section | |
| package main | |
| import "core:fmt" | |
| import "core:mem" | |
| main :: proc() { | |
| when ODIN_DEBUG { | |
| track: mem.Tracking_Allocator |
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
| // TODO: work on filters, they are really needed, did optimize the memory storage quite a bit tho | |
| class ImGuiSpdLogAdaptor | |
| : public spdlog::sinks::base_sink<std::mutex> { | |
| using sink_t = spdlog::sinks::base_sink<std::mutex>; | |
| class SinkLineContent { | |
| public: | |
| spdlog::level::level_enum LogLevel; // If n_levels, the message pushed counts to the previous pushed line | |
| int32_t BeginIndex; // Base offset into the text buffer |
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
| // example how to set up D3D11 rendering on Windows in C | |
| #define COBJMACROS | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <d3d11.h> | |
| #include <dxgi1_3.h> | |
| #include <d3dcompiler.h> | |
| #include <dxgidebug.h> |
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
| // example how to set up OpenGL core context on Windows | |
| // and use basic functionality of OpenGL 4.5 version | |
| // important extension functionality used here: | |
| // (4.3) KHR_debug: https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_debug.txt | |
| // (4.5) ARB_direct_state_access: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_direct_state_access.txt | |
| // (4.1) ARB_separate_shader_objects: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_separate_shader_objects.txt | |
| // (4.2) ARB_shading_language_420pack: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shading_language_420pack.txt | |
| // (4.3) ARB_explicit_uniform_location: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_explicit_uniform_location.txt |
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
| /* | |
| * File: sockets.h | |
| * Author: Will Eccles | |
| * Date: 2020-03-12 | |
| * | |
| * 1. Description | |
| * | |
| * This header attempts to make it easy to use sockets across platforms, | |
| * for both Windows and POSIX systems. While Winsock is often somewhat | |
| * compatible with Berkeley sockets, it is not strictly compatible, |
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 UnityEngine; | |
| using UnityEditor.Build; | |
| using UnityEditor.Build.Reporting; | |
| using UnityEditor; | |
| using UnityEditor.iOS.Xcode; | |
| using System.IO; | |
| public class ExcemptFromEncryption : IPostprocessBuildWithReport // Will execute after XCode project is built | |
| { | |
| public int callbackOrder { get { return 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
| // Sample code showing how to create a modern OpenGL window and rendering context on Win32. | |
| #include <windows.h> | |
| #include <gl/gl.h> | |
| #include <stdbool.h> | |
| typedef HGLRC WINAPI wglCreateContextAttribsARB_type(HDC hdc, HGLRC hShareContext, | |
| const int *attribList); | |
| wglCreateContextAttribsARB_type *wglCreateContextAttribsARB; |
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
| @echo off | |
| setlocal | |
| call :setESC | |
| cls | |
| echo %ESC%[101;93m STYLES %ESC%[0m | |
| echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m | |
| echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m | |
| echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m |
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
| LICOLOR=1 | |
| alias ls='ls -G' | |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| RED="\[\033[0;31m\]" | |
| YELLOW="\[\033[0;33m\]" | |
| GREEN="\[\033[0;32m\]" |
NewerOlder