This file contains 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
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 8394d031..86abec2b 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -27,6 +27,13 @@ project( | |
LANGUAGES C CXX | |
) | |
+set(DAWN_LIBRARY_DIR "${Dawn_BINARY_DIR}/lib") | |
+ |
This file contains 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
template <typename T> | |
class function; | |
template <typename Return, typename... Args> | |
class function<Return(Args...)> | |
{ | |
public: | |
function() {} | |
template <class T, typename = typename enable_if<is_invocable<T, Args...>::value>::type> |
This file contains 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
class MyGame : public GameModule | |
{ | |
public: | |
MyGame(Module& module) : GameModule(module) {} | |
virtual void init(GameShell& app, Game& game) final | |
{ | |
this->start(app, game); | |
} |
This file contains 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
toy.all = table.union(mud.mud, toy.toy) | |
game = mud_module(nil, "game", path.join(GAME_DIR, "src"), "game", nil, nil, nil, toy.all) | |
toy_shell("game", { game }) | |
-- add project specific configuration here |
This file contains 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 STD_HASHMAP | |
#define FLAT_HASHMAP | |
#ifdef STD_HASHMAP | |
#include <unordered_map> | |
#elif defined FLAT_HASHMAP | |
#include <flat_hash_map.hpp> | |
#endif | |
#include <boids/ex_boids.h> |
This file contains 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
#if BGFX_SHADER_LANGUAGE_GLSL == 110 | |
mat4 transpose(in mat4 mat) | |
{ | |
vec4 i0 = mat[0]; | |
vec4 i1 = mat[1]; | |
vec4 i2 = mat[2]; | |
vec4 i3 = mat[3]; | |
mat4 result = mat4( | |
vec4(i0.x, i1.x, i2.x, i3.x), |
This file contains 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
void main() | |
{ | |
// window context creation code goes here | |
bgfx::PlatformData pd = {}; | |
pd.nwh = // windows native handle goes here | |
bgfx::setPlatformData(pd); | |
bgfx::init(); |