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 <Windows.h> | |
| #include <Psapi.h> | |
| void writeOut() | |
| { | |
| HANDLE process = GetCurrentProcess(); | |
| PROCESS_MEMORY_COUNTERS_EX pmc; | |
| FILE* f = NULL; | |
| fopen_s(&f, "qwert.txt", "a+"); | |
| MEMORYSTATUSEX statex; |
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
| arm 용 라이브러리 배포하니, 그걸로 사용하면 된다고 한다. 아직도 안드로이드와 iOS는 서로 다른거 쓰는듯 | |
| https://stackoverflow.com/questions/11717512/on-the-fly-pvrtc-compression-on-ios | |
| https://gametorrahod.com/dealing-with-ios-android-texture-in-2019/ | |
| http://egloos.zum.com/littles/v/3439290 | |
| https://metalbyexample.com/compressed-textures/ |
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 <iostream> | |
| #include <vector> | |
| #include <mutex> | |
| #include <condition_variable> | |
| class CommandStream { | |
| public: | |
| void execute(void* 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
| # https://changkun.de/modern-cpp/en-us/01-intro/index.html | |
| C = gcc | |
| CXX = clang++ | |
| SOURCE_C = foo.c | |
| OBJECTS_C = foo.o | |
| SOURCE_CXX = 1.1.cpp |
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 <iostream> | |
| #include <cassert> | |
| #include <sys/mman.h> | |
| #include <unistd.h> | |
| void* cbuffer_new(const size_t size) | |
| { | |
| char path[] = "/tmp/cb-XXXXXX"; | |
| int fd, status; | |
| void* address; |
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
| // | |
| // Code from "Numerical Recipe in C (2nd edition)" by Press et al. | |
| // Chapter 20.2 pg.896 | |
| // | |
| #include <cstdint> | |
| #include <iostream> | |
| // Return the Gray code of n | |
| uint64_t gray(uint64_t n) |
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 <gtest/gtest.h> | |
| #include <mutex> | |
| #include <atomic> | |
| #include <algorithm> | |
| #include <bitset> | |
| namespace pointermath { | |
| template <typename P, typename T> | |
| static inline P* add(P* a, T b) noexcept { |
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
| https://gitlab.unistra.fr/j.vanassche/arkanoid/blob/9bd3ac4d474fa2fd492c9624ecdcc4d1be13af96/Arkanoid/SDL2_OO/SDL2-2.0.8/src/render/metal/SDL_render_metal.m | |
| /* macOS requires constants in a buffer to have a 256 byte alignment. */ | |
| #ifdef __MACOSX__ | |
| #define CONSTANT_ALIGN 256 | |
| #else | |
| #define CONSTANT_ALIGN 4 | |
| #endif |
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) 2015 Apple Inc. All Rights Reserved. | |
| See LICENSE.txt for this sample’s licensing information | |
| Abstract: | |
| Metal Renderer for Metal Basic 3D. Acts as the update and render delegate for the view controller and performs rendering. In MetalBasic3D, the renderer draws 2 cubes, whos color values change every update. | |
| */ | |
| #import "AAPLRenderer.h" | |
| #import "AAPLViewController.h" |