- Emil Persson @Humus
- Matt Pettineo @mynameismjp
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
/* | |
* edtaa3() | |
* | |
* Sweep-and-update Euclidean distance transform of an | |
* image. Positive pixels are treated as object pixels, | |
* zero or negative pixels are treated as background. | |
* An attempt is made to treat antialiased edges correctly. | |
* The input image must have pixels in the range [0,1], | |
* and the antialiased image should be a box-filter | |
* sampling of the ideal, crisp edge. |
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
class carray_streambuf : public std::streambuf { | |
public: | |
carray_streambuf(char *data, unsigned int len) { | |
setp(data, data+len); | |
setg(data, data, data + len); | |
} | |
// amount of stored (written!) data in bytes | |
size_t saved_bytes() const { return pptr() - pbase(); } | |
}; |
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 <string> | |
#include <lua/lua.hpp> | |
#include <luabind/luabind.hpp> | |
#include <luabind/detail/policy.hpp> | |
#include <luabind/out_value_policy.hpp> | |
#include <luabind/operator.hpp> |
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
VSync under Windows, revisited | |
http://www.virtualdub.org/blog/pivot/entry.php?id=157 | |
Windowed mode, vsync stutter, DWM (Vista+) | |
http://armageddongames.net/showthread.php?96793-Windowed-mode-vsync-stutter-DWM-(Vista-) | |
DwmFlush function | |
https://msdn.microsoft.com/en-us/library/windows/desktop/dd389405(v=vs.85).aspx | |
Bug 856427 - Add vsync support on windows |
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 <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <vector> | |
#include <cmath> | |
#include <cstdio> | |
#include <limits> | |
#include <chrono> | |
#include <thread> | |
#include <mutex> |
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
1>------ Build started: Project: libluapp, Configuration: Debug Win32 ------ | |
1> impl.cpp | |
1>d:\dev\github\lua-api-pp\luapp\lua_operations.hxx(118): error C2977: 'lua::_::Lazy': too many template arguments | |
1> d:\dev\github\lua-api-pp\luapp\lua_lazy.hxx(61): note: see declaration of 'lua::_::Lazy' | |
1> d:\dev\github\lua-api-pp\luapp\lua_operations.hxx(193): note: see reference to class template instantiation 'lua::_::lazyConcat<VT11,VT12>' being compiled | |
1>d:\dev\github\lua-api-pp\luapp\lua_operations.hxx(206): error C2977: 'lua::_::Lazy': too many template arguments | |
1> d:\dev\github\lua-api-pp\luapp\lua_lazy.hxx(61): note: see declaration of 'lua::_::Lazy' | |
1> d:\dev\github\lua-api-pp\luapp\lua_operations.hxx(272): note: see reference to class template instantiation 'lua::_::lazyArithmetics<T1,T2,op>' being compiled | |
1>d:\dev\github\lua-api-pp\luapp\lua_valueset.hxx(380): error C2572: 'lua::Valset::Valset': redefinition of default argument: parameter 1 | |
1> d:\dev\github\lua-api-pp\luapp\lua_valueset.hxx(376): |
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 <chaiscript/chaiscript.hpp> | |
#include <chaiscript/chaiscript_stdlib.hpp> | |
bool test(int* data) { | |
int &i = *data; | |
i = i + 2; | |
return true; | |
} | |
int _tmain(int argc, _TCHAR* argv[]) |
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
extern "C" | |
{ | |
#include "lua.h" | |
#include "lauxlib.h" | |
#include "lualib.h" | |
} | |
struct SimpleVec2 | |
{ | |
float x, y; |
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 <algorithm> | |
#include <utility> | |
#include <iostream> | |
#include <memory> | |
struct Handle { | |
Handle (int val) : m_handl((int*)(void*)val, EmptyDeleter) { } | |
Handle(Handle&& src) : m_handl(std::move(src.m_handl)) {} | |
Handle(const Handle& that) = delete; |
NewerOlder