func names are no longer mangled to death
This commit is contained in:
@@ -54,7 +54,7 @@
|
|||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
@@ -109,6 +109,19 @@
|
|||||||
<OutDir>$(ProjectDir)bin\$(Platform)\$(Configuration)\</OutDir>
|
<OutDir>$(ProjectDir)bin\$(Platform)\$(Configuration)\</OutDir>
|
||||||
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\</IntDir>
|
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
<SourcePath>$(ProjectDir)src;$(SourcePath)</SourcePath>
|
<SourcePath>$(ProjectDir)src;$(SourcePath)</SourcePath>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<OutDir>$(ProjectDir)bin\$(Platform)\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>$(ProjectDir)obj\$(Platform)\$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -166,6 +179,12 @@
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)"</Command>
|
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)"</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -183,6 +202,16 @@
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)"</Command>
|
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)"</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -199,6 +228,9 @@
|
|||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)poses.csv" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\vertex.glsl" "$(OutDir)" && xcopy /y "$(ProjectDir)src\shaders\fragment.glsl" "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\body.cpp" />
|
<ClCompile Include="src\body.cpp" />
|
||||||
@@ -210,6 +242,14 @@
|
|||||||
<ClCompile Include="src\shaders.cpp" />
|
<ClCompile Include="src\shaders.cpp" />
|
||||||
<ClCompile Include="src\util.cpp" />
|
<ClCompile Include="src\util.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="inc\body.hpp" />
|
||||||
|
<ClInclude Include="inc\camera.hpp" />
|
||||||
|
<ClInclude Include="inc\camera_poses.hpp" />
|
||||||
|
<ClInclude Include="inc\live_plotter.hpp" />
|
||||||
|
<ClInclude Include="inc\shaders.hpp" />
|
||||||
|
<ClInclude Include="inc\util.hpp" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|||||||
@@ -40,4 +40,24 @@
|
|||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="inc\body.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="inc\camera.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="inc\camera_poses.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="inc\live_plotter.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="inc\shaders.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="inc\util.hpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
typedef unsigned long long pointid;
|
typedef unsigned long long pointid;
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
DllExport bool __cdecl start(int win_w, int win_h);
|
DllExport bool __cdecl start(int win_w, int win_h);
|
||||||
DllExport bool __cdecl stop();
|
DllExport bool __cdecl stop();
|
||||||
DllExport pointid __cdecl create_point(float x, float y, float z);
|
DllExport pointid __cdecl create_point(float x, float y, float z);
|
||||||
@@ -12,3 +13,4 @@ DllExport void __cdecl set_scale(pointid id, float scale);
|
|||||||
DllExport void __cdecl update_point(pointid id, float x, float y, float z);
|
DllExport void __cdecl update_point(pointid id, float x, float y, float z);
|
||||||
DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s);
|
DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s);
|
||||||
DllExport void __cdecl clear_point(pointid id);
|
DllExport void __cdecl clear_point(pointid id);
|
||||||
|
}
|
||||||
@@ -54,8 +54,8 @@ static std::map<uint, Point*> id_to_point; // Use a pool allocator possibly late
|
|||||||
static std::map<Point*, uint> point_to_id;
|
static std::map<Point*, uint> point_to_id;
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const char* vertex_filepath = "src/shaders/vertex.glsl";
|
const char* vertex_filepath = "vertex.glsl";
|
||||||
const char* fragment_filepath = "src/shaders/fragment.glsl";
|
const char* fragment_filepath = "fragment.glsl";
|
||||||
|
|
||||||
// Private foward decls
|
// Private foward decls
|
||||||
void _resize_cb(GLFWwindow* win, int w, int h);
|
void _resize_cb(GLFWwindow* win, int w, int h);
|
||||||
@@ -67,7 +67,7 @@ bool _glfw_setup();
|
|||||||
void _refresh_win();
|
void _refresh_win();
|
||||||
double _time();
|
double _time();
|
||||||
|
|
||||||
DllExport bool __cdecl start(int win_w, int win_h) {
|
extern DllExport bool __cdecl start(int win_w, int win_h) {
|
||||||
if (!InitializeCriticalSectionAndSpinCount(&cs, 0x00000400))
|
if (!InitializeCriticalSectionAndSpinCount(&cs, 0x00000400))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ DllExport bool __cdecl start(int win_w, int win_h) {
|
|||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport bool __cdecl stop() {
|
extern DllExport bool __cdecl stop() {
|
||||||
stop_flag = true;
|
stop_flag = true;
|
||||||
DWORD res = WaitForSingleObject(win_thread_h, STOP_WAIT_TIME_MS);
|
DWORD res = WaitForSingleObject(win_thread_h, STOP_WAIT_TIME_MS);
|
||||||
bool success = res == WAIT_OBJECT_0;
|
bool success = res == WAIT_OBJECT_0;
|
||||||
@@ -103,7 +103,7 @@ DllExport bool __cdecl stop() {
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport pointid __cdecl create_point(float x, float y, float z) {
|
extern DllExport pointid __cdecl create_point(float x, float y, float z) {
|
||||||
EnterCriticalSection(&cs);
|
EnterCriticalSection(&cs);
|
||||||
|
|
||||||
Point* p = (Point*)malloc(sizeof(Point));
|
Point* p = (Point*)malloc(sizeof(Point));
|
||||||
@@ -124,21 +124,21 @@ DllExport pointid __cdecl create_point(float x, float y, float z) {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport void __cdecl set_color(pointid id, float r, float g, float b) {
|
extern DllExport void __cdecl set_color(pointid id, float r, float g, float b) {
|
||||||
EnterCriticalSection(&cs);
|
EnterCriticalSection(&cs);
|
||||||
Point* p = id_to_point[id];
|
Point* p = id_to_point[id];
|
||||||
p->b.color = { r, g, b, p->b.color[3] };
|
p->b.color = { r, g, b, p->b.color[3] };
|
||||||
LeaveCriticalSection(&cs);
|
LeaveCriticalSection(&cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport void __cdecl set_scale(pointid id, float scale) {
|
extern DllExport void __cdecl set_scale(pointid id, float scale) {
|
||||||
EnterCriticalSection(&cs);
|
EnterCriticalSection(&cs);
|
||||||
Point* p = id_to_point[id];
|
Point* p = id_to_point[id];
|
||||||
p->b.scale = scale;
|
p->b.scale = scale;
|
||||||
LeaveCriticalSection(&cs);
|
LeaveCriticalSection(&cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport void __cdecl update_point(pointid id, float x, float y, float z) {
|
extern DllExport void __cdecl update_point(pointid id, float x, float y, float z) {
|
||||||
EnterCriticalSection(&cs);
|
EnterCriticalSection(&cs);
|
||||||
Point* p = id_to_point[id];
|
Point* p = id_to_point[id];
|
||||||
p->targetloc = { x, y, z };
|
p->targetloc = { x, y, z };
|
||||||
@@ -147,7 +147,7 @@ DllExport void __cdecl update_point(pointid id, float x, float y, float z) {
|
|||||||
LeaveCriticalSection(&cs);
|
LeaveCriticalSection(&cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s) {
|
extern DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s) {
|
||||||
EnterCriticalSection(&cs);
|
EnterCriticalSection(&cs);
|
||||||
Point* p = id_to_point[id];
|
Point* p = id_to_point[id];
|
||||||
p->start_s = _time();
|
p->start_s = _time();
|
||||||
@@ -155,7 +155,7 @@ DllExport void __cdecl set_lifetime(pointid id, float new_lifetime_s) {
|
|||||||
LeaveCriticalSection(&cs);
|
LeaveCriticalSection(&cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
DllExport void __cdecl clear_point(pointid id) {
|
extern DllExport void __cdecl clear_point(pointid id) {
|
||||||
EnterCriticalSection(&cs);
|
EnterCriticalSection(&cs);
|
||||||
Point* p = id_to_point[id];
|
Point* p = id_to_point[id];
|
||||||
id_to_point.erase(id);
|
id_to_point.erase(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user