Skip to content

Commit

Permalink
v2.2.3 - compile and demo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
inanevin committed Oct 12, 2024
1 parent aa372f6 commit 6797295
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ add_library(Lina::VG ALIAS ${PROJECT_NAME})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_compile_definitions(${PROJECT_NAME} PUBLIC LINAVG_VERSION_MAJOR=2)
target_compile_definitions(${PROJECT_NAME} PUBLIC LINAVG_VERSION_MINOR=2)
target_compile_definitions(${PROJECT_NAME} PUBLIC LINAVG_VERSION_PATCH=2)
target_compile_definitions(${PROJECT_NAME} PUBLIC LINAVG_VERSION_PATCH=3)

#--------------------------------------------------------------------
# Subdirectories & linking
Expand Down
37 changes: 0 additions & 37 deletions Example/include/Backends/GL/GLBackend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,41 +135,4 @@ struct Texture
LINAVG_VEC<SDFMaterial> m_demoSDFMaterials;
};


/// <summary>
/// For debugging purposes, sets to draw polygon/wireframe mode.
/// Unused while using custom backends, you can fill with your own data.
/// </summary>
bool debugWireframeEnabled = false;

/// <summary>
/// For debugging purposes, current count of the trianlges being drawn.
/// Unused while using custom backends, you can fill with your own data.
/// </summary>
int debugCurrentTriangleCount = 0;

/// <summary>
/// For debugging purposes, current count of the vertices sent to backend buffers.
/// Unused while using custom backends, you can fill with your own data.
/// </summary>
int debugCurrentVertexCount = 0;

/// <summary>
/// For debugging purposes, current draw calls.
/// Unused while using custom backends, you can fill with your own data.
/// </summary>
int debugCurrentDrawCalls = 0;

/// <summary>
/// For debugging purposes, zooms the rendering ortho projection.
/// Unused while using custom backends, you can fill with your own data.
/// </summary>
float debugOrthoProjectionZoom = 1.0f;

/// <summary>
/// For debugging purposes, offsets the rendering ortho projection.
/// Unused while using custom backends, you can fill with your own data.
/// </summary>
Vec2 debugOrthoOffset = Vec2(0.0f, 0.0f);

} // namespace LinaVG::Examples
12 changes: 6 additions & 6 deletions Example/src/Backends/GL/GLBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ namespace LinaVG::Examples
unsigned int GLBackend::s_displayPosY = 0;
unsigned int GLBackend::s_displayWidth = 0;
unsigned int GLBackend::s_displayHeight = 0;
static bool GLBackend::s_debugWireframe = 0;
static int GLBackend::s_debugTriCount = 0;
static int GLBackend::s_debugVtxCount = 0;
static int GLBackend::s_debugDrawCalls = 0;
static float GLBackend::s_debugZoom = 1.0f;
static Vec2 GLBackend::s_debugOffset = Vec2(0.0f, 0.0f);
bool GLBackend::s_debugWireframe = 0;
int GLBackend::s_debugTriCount = 0;
int GLBackend::s_debugVtxCount = 0;
int GLBackend::s_debugDrawCalls = 0;
float GLBackend::s_debugZoom = 1.0f;
Vec2 GLBackend::s_debugOffset = Vec2(0.0f, 0.0f);

#define FONT_ATLAS_WIDTH 2048
#define FONT_ATLAS_HEIGHT 2048
Expand Down
7 changes: 3 additions & 4 deletions Example/src/DemoScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,11 @@ namespace LinaVG
//*************************** ROW 1 ***************************/

// Filled
defaultStyle.thickness = 5.0f;
defaultStyle.outlineOptions.color = Vec4(0, 0, 0, 1);
defaultStyle.outlineOptions.thickness = 3.0f;
defaultStyle.outlineOptions.thickness = 1.0f;
defaultStyle.outlineOptions.drawDirection = OutlineDrawDirection::Outwards;
defaultStyle.aaEnabled = true;
defaultStyle.aaMultiplier = 2;
defaultStyle.aaMultiplier = 1;
ExampleApp::Get()->GetLVGDrawer().DrawRect(startPos, Vec2(startPos.x + 150, startPos.y + 150), defaultStyle, m_rotateAngle, 1);


Expand Down Expand Up @@ -527,7 +526,7 @@ namespace LinaVG
defaultStyle.isFilled = true;
defaultStyle.thickness = 8.0f;
defaultStyle.outlineOptions.color = Vec4(1, 1, 1, 1);
defaultStyle.outlineOptions.thickness = 5.0f;
defaultStyle.outlineOptions.thickness = 2.0f;
defaultStyle.outlineOptions.textureHandle = ExampleApp::Get()->GetCheckeredTexture();
defaultStyle.color = Vec4(0.7f, 0.1f, 0.1f, 1.0f);
ExampleApp::Get()->GetLVGDrawer().DrawTriangle(Vec2(startPos.x + 75, startPos.y), Vec2(startPos.x + 150, startPos.y + 150), Vec2(startPos.x, startPos.y + 150), defaultStyle, m_rotateAngle, 1);
Expand Down

0 comments on commit 6797295

Please sign in to comment.