fix debug build with vs2017
This commit is contained in:
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -25,3 +25,12 @@
|
||||
[submodule "libs/base64"]
|
||||
path = libs/base64
|
||||
url = https://github.com/tkislan/base64
|
||||
[submodule "libs/bugtrap"]
|
||||
path = libs/bugtrap
|
||||
url = https://github.com/bchavez/BugTrap.git
|
||||
[submodule "libs/bugtrap-client"]
|
||||
path = libs/bugtrap-client
|
||||
url = https://omigamedev@bitbucket.org/omigamedev/bugtrap-client-x64.git
|
||||
[submodule "libs/curl-win"]
|
||||
path = libs/curl-win
|
||||
url = https://omigamedev@bitbucket.org/omigamedev/curl-win64.git
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -22,19 +22,19 @@
|
||||
<ProjectGuid>{6D5028CE-4D76-4B6A-A7C2-DE5A3268D433}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>engine</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -76,8 +76,8 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>libs\glm;libs\glew-2.0.0\include;libs\stb;libs\tinyxml2;libs\yoga;libs\curl-win\include;libs\jpeg;libs\wacom;C:\Users\omar\Downloads\BugTrap-master\BugTrap-master\source\Client;libs\poly2tri\poly2tri;libs\base64;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>libs\curl-win\lib\dll-$(Configuration)-$(PlatformShortName);libs\glew-2.0.0\lib\Release\$(Platform);C:\Users\omar\Downloads\BugTrap-master\BugTrap-master\bin;$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>libs\glm;libs\glew-2.0.0\include;libs\stb;libs\tinyxml2;libs\yoga;libs\curl-win\include;libs\jpeg;libs\wacom;libs\bugtrap-client\include;libs\poly2tri\poly2tri;libs\base64;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>libs\curl-win\lib\dll-$(Configuration)-$(PlatformShortName);libs\glew-2.0.0\lib\Release\$(Platform);libs\bugtrap-client\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
@@ -86,8 +86,8 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>libs\glm;libs\glew-2.0.0\include;libs\stb;libs\tinyxml2;libs\yoga;libs\curl-win\include;libs\jpeg;libs\wacom;C:\Users\omar\Downloads\BugTrap-master\BugTrap-master\source\Client;libs\poly2tri\poly2tri;libs\base64;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>libs\curl-win\lib\dll-$(Configuration)-$(PlatformShortName);libs\glew-2.0.0\lib\Release\$(Platform);C:\Users\omar\Downloads\BugTrap-master\BugTrap-master\bin;$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>libs\glm;libs\glew-2.0.0\include;libs\stb;libs\tinyxml2;libs\yoga;libs\curl-win\include;libs\jpeg;libs\wacom;libs\bugtrap-client\include;libs\poly2tri\poly2tri;libs\base64;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>libs\curl-win\lib\dll-$(Configuration)-$(PlatformShortName);libs\glew-2.0.0\lib\Release\$(Platform);libs\bugtrap-client\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -275,14 +275,10 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\yoga\yoga\YGNodeList.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\yoga\yoga\Yoga.c">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
@@ -354,6 +350,9 @@
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="PanoPainter.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="libs\glm\util\glm.natvis" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -19,24 +19,27 @@
|
||||
<Filter Include="Header Files\ui">
|
||||
<UniqueIdentifier>{2c3e7ce5-d3f4-4731-b05f-5e288c7e6e63}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\libs">
|
||||
<Filter Include="libs">
|
||||
<UniqueIdentifier>{6d64b115-02d1-43e0-86c8-c8212f51162d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\libs\jpeg">
|
||||
<Filter Include="libs\jpeg">
|
||||
<UniqueIdentifier>{dc178d53-6a6d-4a18-a93c-d4994340515f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\libs\WinTab">
|
||||
<Filter Include="libs\WinTab">
|
||||
<UniqueIdentifier>{54dc9f46-d2e0-466c-90d2-eb5d72d5799d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\libs\yoga">
|
||||
<Filter Include="libs\yoga">
|
||||
<UniqueIdentifier>{a4a12057-835e-47ff-be4d-ce58b36cecf5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\libs\tinyxml2">
|
||||
<Filter Include="libs\tinyxml2">
|
||||
<UniqueIdentifier>{6fe315aa-e2b9-4f01-8291-683a5fda123b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\libs\poly2tri">
|
||||
<Filter Include="libs\poly2tri">
|
||||
<UniqueIdentifier>{bda6fa93-a186-41ca-9bd9-49b7e0fd1ca4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="extras">
|
||||
<UniqueIdentifier>{e631ac80-1b9b-424f-8adf-e2bab71a566d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="engine\app.cpp">
|
||||
@@ -178,25 +181,19 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\jpeg\jpgd.cpp">
|
||||
<Filter>Source Files\libs\jpeg</Filter>
|
||||
<Filter>libs\jpeg</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\jpeg\jpge.cpp">
|
||||
<Filter>Source Files\libs\jpeg</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\yoga\yoga\YGNodeList.c">
|
||||
<Filter>Source Files\libs\yoga</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\yoga\yoga\Yoga.c">
|
||||
<Filter>Source Files\libs\yoga</Filter>
|
||||
<Filter>libs\jpeg</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\tinyxml2\tinyxml2.cpp">
|
||||
<Filter>Source Files\libs\tinyxml2</Filter>
|
||||
<Filter>libs\tinyxml2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="engine\wacom.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\wacom\WinTab\Utils.cpp">
|
||||
<Filter>Source Files\libs\WinTab</Filter>
|
||||
<Filter>libs\WinTab</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="engine\node_dialog_layer_rename.cpp">
|
||||
<Filter>Source Files\ui</Filter>
|
||||
@@ -205,19 +202,19 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\poly2tri\poly2tri\common\shapes.cc">
|
||||
<Filter>Source Files\libs\poly2tri</Filter>
|
||||
<Filter>libs\poly2tri</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\poly2tri\poly2tri\sweep\advancing_front.cc">
|
||||
<Filter>Source Files\libs\poly2tri</Filter>
|
||||
<Filter>libs\poly2tri</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\poly2tri\poly2tri\sweep\cdt.cc">
|
||||
<Filter>Source Files\libs\poly2tri</Filter>
|
||||
<Filter>libs\poly2tri</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\poly2tri\poly2tri\sweep\sweep.cc">
|
||||
<Filter>Source Files\libs\poly2tri</Filter>
|
||||
<Filter>libs\poly2tri</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\poly2tri\poly2tri\sweep\sweep_context.cc">
|
||||
<Filter>Source Files\libs\poly2tri</Filter>
|
||||
<Filter>libs\poly2tri</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="engine\node_progress_bar.cpp">
|
||||
<Filter>Source Files\ui</Filter>
|
||||
@@ -243,6 +240,12 @@
|
||||
<ClCompile Include="engine\node_colorwheel.cpp">
|
||||
<Filter>Source Files\ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\yoga\yoga\YGNodeList.c">
|
||||
<Filter>libs\yoga</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs\yoga\yoga\Yoga.c">
|
||||
<Filter>libs\yoga</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="engine\app.h">
|
||||
@@ -372,40 +375,28 @@
|
||||
<Filter>Header Files\ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\jpeg\jpgd.h">
|
||||
<Filter>Source Files\libs\jpeg</Filter>
|
||||
<Filter>libs\jpeg</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\jpeg\jpge.h">
|
||||
<Filter>Source Files\libs\jpeg</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\YGMacros.h">
|
||||
<Filter>Source Files\libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\YGNodeList.h">
|
||||
<Filter>Source Files\libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\Yoga.h">
|
||||
<Filter>Source Files\libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\YGEnums.h">
|
||||
<Filter>Source Files\libs\yoga</Filter>
|
||||
<Filter>libs\jpeg</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\tinyxml2\tinyxml2.h">
|
||||
<Filter>Source Files\libs\tinyxml2</Filter>
|
||||
<Filter>libs\tinyxml2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="engine\wacom.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\wacom\WinTab\PKTDEF.H">
|
||||
<Filter>Source Files\libs\WinTab</Filter>
|
||||
<Filter>libs\WinTab</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\wacom\WinTab\Utils.h">
|
||||
<Filter>Source Files\libs\WinTab</Filter>
|
||||
<Filter>libs\WinTab</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\wacom\WinTab\WINTAB.H">
|
||||
<Filter>Source Files\libs\WinTab</Filter>
|
||||
<Filter>libs\WinTab</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\wacom\WinTab\MSGPACK.H">
|
||||
<Filter>Source Files\libs\WinTab</Filter>
|
||||
<Filter>libs\WinTab</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="engine\node_dialog_layer_rename.h">
|
||||
<Filter>Header Files\ui</Filter>
|
||||
@@ -431,10 +422,27 @@
|
||||
<ClInclude Include="engine\node_scroll.h">
|
||||
<Filter>Header Files\ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\YGEnums.h">
|
||||
<Filter>libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\YGMacros.h">
|
||||
<Filter>libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\YGNodeList.h">
|
||||
<Filter>libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs\yoga\yoga\Yoga.h">
|
||||
<Filter>libs\yoga</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="PanoPainter.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="libs\glm\util\glm.natvis">
|
||||
<Filter>extras</Filter>
|
||||
</Natvis>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -31,11 +31,11 @@ public:
|
||||
|
||||
struct StrokeSample
|
||||
{
|
||||
glm::vec2 pos;
|
||||
glm::vec2 origin;
|
||||
float size;
|
||||
float flow;
|
||||
float angle;
|
||||
glm::vec2 pos = { 0, 0 };
|
||||
glm::vec2 origin = { 0,0 };
|
||||
float size = 0;
|
||||
float flow = 0;
|
||||
float angle = 0;
|
||||
};
|
||||
|
||||
class BrushMesh
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
GLuint vao{ 0 };
|
||||
struct vertex_t { glm::vec4 pos; glm::vec2 uvs; };
|
||||
struct instance_t { glm::mat4 mvp; float flow; };
|
||||
int loc_flow;
|
||||
int loc_mvp;
|
||||
int loc_flow = 0;
|
||||
int loc_mvp = 0;
|
||||
|
||||
bool create();
|
||||
void draw(const std::vector<StrokeSample>& samples, const glm::mat4& proj);
|
||||
@@ -57,19 +57,19 @@ class Stroke
|
||||
public:
|
||||
struct Keypoint
|
||||
{
|
||||
glm::vec2 pos;
|
||||
float pressure;
|
||||
float dist;
|
||||
glm::vec2 pos = { 0, 0 };
|
||||
float pressure = 0;
|
||||
float dist = 0;
|
||||
};
|
||||
struct Camera
|
||||
{
|
||||
glm::vec2 rot;
|
||||
float fov;
|
||||
glm::vec2 rot = { 0, 0 };
|
||||
float fov = 0;
|
||||
};
|
||||
int m_layer;
|
||||
float m_curve;
|
||||
float m_dist;
|
||||
float m_step;
|
||||
int m_layer = 0;
|
||||
float m_curve = 0;
|
||||
float m_dist = 0;
|
||||
float m_step = 0;
|
||||
Camera m_camera;
|
||||
ui::Brush m_brush;
|
||||
cbuffer<float, 3> m_curve_angles;
|
||||
|
||||
@@ -580,7 +580,8 @@ void ui::Canvas::stroke_start(glm::vec2 point, float pressure, const ui::Brush&
|
||||
}
|
||||
|
||||
m_current_stroke = std::make_unique<Stroke>();
|
||||
m_current_stroke->m_camera = { m_cam_rot, m_cam_fov };
|
||||
m_current_stroke->m_camera.rot = m_cam_rot;
|
||||
m_current_stroke->m_camera.fov = m_cam_fov;
|
||||
m_current_stroke->start(brush);
|
||||
m_current_stroke->add_point(point, pressure);
|
||||
|
||||
|
||||
@@ -15,19 +15,20 @@ class Layer
|
||||
{
|
||||
public:
|
||||
RTT m_rtt[6];
|
||||
glm::vec4 m_dirty_box[6];
|
||||
bool m_dirty_face[6];
|
||||
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
|
||||
bool m_dirty_face[6] = SIXPLETTE(false);
|
||||
bool m_visible = true;
|
||||
bool m_alpha_locked = false;
|
||||
float m_opacity = 1.f;
|
||||
bool m_hightlight = false;
|
||||
std::string m_name;
|
||||
int w, h;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
struct Snapshot
|
||||
{
|
||||
std::unique_ptr<uint8_t[]> image[6];
|
||||
glm::vec4 m_dirty_box[6];
|
||||
bool m_dirty_face[6];
|
||||
std::unique_ptr<uint8_t[]> image[6] = SIXPLETTE(0);
|
||||
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
|
||||
bool m_dirty_face[6] = SIXPLETTE(false);
|
||||
void create(int w, int h)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
@@ -53,20 +54,20 @@ public:
|
||||
static Canvas* I;
|
||||
bool m_alpha_lock = false;
|
||||
bool m_touch_lock = true;
|
||||
glm::mat4 m_mv;
|
||||
glm::mat4 m_proj;
|
||||
glm::vec4 m_box;
|
||||
glm::vec2 m_pan;
|
||||
int m_width;
|
||||
int m_height;
|
||||
glm::mat4 m_mv{ 1 };
|
||||
glm::mat4 m_proj{ 1 };
|
||||
glm::vec4 m_box{ 0 };
|
||||
glm::vec2 m_pan{ 0 };
|
||||
int m_width = 0;
|
||||
int m_height = 0;
|
||||
bool m_use_instanced = false;
|
||||
int m_current_layer_idx = 0;
|
||||
std::unique_ptr<Stroke> m_current_stroke;
|
||||
bool m_show_tmp = false;
|
||||
std::vector<Layer> m_layers;
|
||||
std::vector<int> m_order;
|
||||
glm::vec4 m_dirty_box[6];
|
||||
bool m_dirty_face[6];
|
||||
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
|
||||
bool m_dirty_face[6] = SIXPLETTE(false);
|
||||
Layer m_smask; // selection mask
|
||||
bool m_smask_active = false;
|
||||
RTT m_tmp[6];
|
||||
@@ -74,7 +75,7 @@ public:
|
||||
Texture2D m_tex[6];
|
||||
Texture2D m_tex2[6];
|
||||
bool m_pick_ready[6];
|
||||
std::unique_ptr<glm::u8vec4[]> m_pick_data[6];
|
||||
std::unique_ptr<glm::u8vec4[]> m_pick_data[6] = SIXPLETTE(nullptr);
|
||||
static glm::vec3 m_plane_origin[6];
|
||||
static glm::vec3 m_plane_normal[6];
|
||||
static glm::vec3 m_plane_tangent[6];
|
||||
@@ -84,8 +85,8 @@ public:
|
||||
Sampler m_sampler_bg;
|
||||
Sampler m_sampler_mask;
|
||||
Sampler m_sampler_stencil;
|
||||
glm::vec2 m_cam_rot;
|
||||
glm::vec3 m_cam_pos;
|
||||
glm::vec2 m_cam_rot{ 0 };
|
||||
glm::vec3 m_cam_pos{ 0 };
|
||||
float m_cam_fov = 85;
|
||||
|
||||
Brush m_current_brush;
|
||||
|
||||
@@ -67,8 +67,8 @@ void TextMesh::update(kFont id, const char* text)
|
||||
float y = 0;
|
||||
std::vector<glm::vec4> v;
|
||||
std::vector<GLushort> idx;
|
||||
glm::vec2 bbmin;
|
||||
glm::vec2 bbmax;
|
||||
glm::vec2 bbmin(FLT_MAX);
|
||||
glm::vec2 bbmax(-FLT_MAX);
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
int c = text[i] - f.start_char;
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
int font_array_count = 0;
|
||||
GLuint font_buffers[2] = {0, 0};
|
||||
kFont font_id;
|
||||
glm::vec2 bb;
|
||||
glm::vec2 bb = { 0, 0 };
|
||||
bool create();
|
||||
void update(kFont id, const char* text);
|
||||
void draw();
|
||||
|
||||
@@ -371,6 +371,26 @@ Node::Node(Node&& o)
|
||||
m_mouse_ignore = o.m_mouse_ignore;
|
||||
o.y_node = nullptr;
|
||||
o.parent = nullptr;
|
||||
|
||||
m_manager = o.m_manager;
|
||||
current_mouse_capture = o.current_mouse_capture;
|
||||
current_key_capture = o.current_key_capture;
|
||||
m_mouse_captured = o.m_mouse_captured;
|
||||
m_key_captured = o.m_key_captured;
|
||||
|
||||
m_proj = o.m_proj;
|
||||
m_mvp = o.m_mvp;
|
||||
m_mouse_inside = o.m_mouse_inside;
|
||||
m_flood_events = o.m_flood_events;
|
||||
m_capture_children = o.m_capture_children;
|
||||
m_destroyed = o.m_destroyed;
|
||||
|
||||
m_scale = o.m_scale;
|
||||
m_pos_origin = o.m_pos_origin;
|
||||
m_pos_offset = o.m_pos_offset;
|
||||
m_pos_offset_childred = o.m_pos_offset_childred;
|
||||
m_clip_uncut = o.m_clip_uncut;
|
||||
|
||||
}
|
||||
|
||||
Node::~Node()
|
||||
@@ -886,6 +906,24 @@ void Node::clone_copy(Node* dest) const
|
||||
dest->m_size = m_size;
|
||||
dest->m_clip = m_clip;
|
||||
dest->m_flood_events = m_flood_events;
|
||||
|
||||
dest->m_manager = m_manager;
|
||||
dest->current_mouse_capture = current_mouse_capture;
|
||||
dest->current_key_capture = current_key_capture;
|
||||
dest->m_mouse_captured = m_mouse_captured;
|
||||
dest->m_key_captured = m_key_captured;
|
||||
dest->m_proj = m_proj;
|
||||
dest->m_mvp = m_mvp;
|
||||
dest->m_mouse_inside = m_mouse_inside;
|
||||
dest->m_capture_children = m_capture_children;
|
||||
dest->m_destroyed = m_destroyed;
|
||||
dest->m_scale = m_scale;
|
||||
dest->m_pos_origin = m_pos_origin;
|
||||
dest->m_pos_offset = m_pos_offset;
|
||||
dest->m_pos_offset_childred = m_pos_offset_childred;
|
||||
dest->m_clip_uncut = m_clip_uncut;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Node::clone_children(Node* dest) const
|
||||
|
||||
@@ -104,16 +104,17 @@ public:
|
||||
|
||||
bool m_mouse_ignore = true;
|
||||
float m_zoom = 1.f;
|
||||
glm::vec2 m_scale{ 1.f };
|
||||
glm::vec2 m_pos;
|
||||
glm::vec2 m_pos_origin; // original layout position without offset
|
||||
glm::vec2 m_pos_offset; // artificial position offset for scrolling
|
||||
glm::vec2 m_pos_offset_childred; // artificial position offset for scrolling
|
||||
glm::vec2 m_size;
|
||||
glm::vec4 m_clip;
|
||||
glm::vec4 m_clip_uncut;
|
||||
glm::vec2 m_scale{ 1, 1 };
|
||||
glm::vec2 m_pos{ 0, 0 };
|
||||
glm::vec2 m_pos_origin{ 0, 0 }; // original layout position without offset
|
||||
glm::vec2 m_pos_offset{ 0, 0 }; // artificial position offset for scrolling
|
||||
glm::vec2 m_pos_offset_childred{ 0, 0 }; // artificial position offset for scrolling
|
||||
glm::vec2 m_size{ 0, 0 };
|
||||
glm::vec4 m_clip{ 0, 0, 0, 0 };
|
||||
glm::vec4 m_clip_uncut{ 0, 0, 0, 0 };
|
||||
std::string m_name;
|
||||
bool m_display = true;
|
||||
|
||||
Node(const Node&) = delete;
|
||||
Node& operator=(const Node&) = delete;
|
||||
Node&& operator=(Node&& o);
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
|
||||
#define NS_START namespace ui {
|
||||
#define NS_END }
|
||||
#define SIXPLETTE(I) {I, I, I, I, I, I}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <map>
|
||||
|
||||
@@ -7,8 +7,8 @@ class RTT
|
||||
GLuint fboID = 0;
|
||||
GLuint rboID = 0;
|
||||
GLuint texID = 0;
|
||||
int w;
|
||||
int h;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
|
||||
public:
|
||||
RTT();
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace ui {
|
||||
class Shape
|
||||
{
|
||||
protected:
|
||||
GLuint buffers[2]{ 0 };
|
||||
GLuint arrays[2]{ 0 };
|
||||
GLuint count[2]{ 0 };
|
||||
GLvoid* ioff[2]{ 0 };
|
||||
GLuint buffers[2]{ 0, 0 };
|
||||
GLuint arrays[2]{ 0, 0 };
|
||||
GLuint count[2]{ 0, 0 };
|
||||
GLvoid* ioff[2]{ 0, 0 };
|
||||
bool use_idx = true;
|
||||
public:
|
||||
struct vertex_t { glm::vec4 pos; glm::vec2 uvs; };
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
class Texture2D
|
||||
{
|
||||
GLuint m_tex;
|
||||
int m_width;
|
||||
int m_height;
|
||||
GLint m_format;
|
||||
GLint m_iformat;
|
||||
GLuint m_tex = 0;
|
||||
int m_width = 0;
|
||||
int m_height = 0;
|
||||
GLint m_format = 0;
|
||||
GLint m_iformat = 0;
|
||||
public:
|
||||
bool create(int width, int height, GLint internal_format = GL_RGBA8, GLint format = GL_RGBA, const uint8_t* data = nullptr);
|
||||
bool create(const ui::Image& img);
|
||||
@@ -25,8 +25,8 @@ public:
|
||||
|
||||
class Sampler
|
||||
{
|
||||
GLuint id;
|
||||
GLint current_unit;
|
||||
GLuint id = 0;
|
||||
GLint current_unit = 0;
|
||||
public:
|
||||
bool create(GLint filter = GL_LINEAR, GLint wrap = GL_CLAMP_TO_EDGE);
|
||||
void set(GLint filter = GL_LINEAR, GLint wrap = GL_CLAMP_TO_EDGE);
|
||||
|
||||
@@ -32,9 +32,9 @@ inline glm::vec2 xy(const glm::vec3& v) { return glm::vec2(v.x, v.y); }
|
||||
template<typename T, int N> struct cbuffer
|
||||
{
|
||||
T m_vec[N];
|
||||
int m_capacity;
|
||||
int m_count;
|
||||
int m_index;
|
||||
int m_capacity = 0;
|
||||
int m_count = 0;
|
||||
int m_index = 0;
|
||||
cbuffer()
|
||||
{
|
||||
m_capacity = N;
|
||||
|
||||
@@ -153,8 +153,11 @@ bool WacomTablet::init(HWND hWnd)
|
||||
|
||||
void WacomTablet::terminate()
|
||||
{
|
||||
if (gpWTClose)
|
||||
{
|
||||
gpWTClose(g_hCtx);
|
||||
UnloadWintab();
|
||||
}
|
||||
}
|
||||
|
||||
void WacomTablet::handle_message(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
Reference in New Issue
Block a user