Skip to content

Commit

Permalink
code refine
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingstom committed Jan 16, 2024
1 parent 789006b commit 0c13665
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions engine/api/vulkan/commandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void CommandBuffer::beginRendering(const RenderingInfo& renderingInfo)
.imageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
.storeOp = VK_ATTACHMENT_STORE_OP_STORE,
.clearValue = {.color{{0.1f, 0.1f, 0.1f, 1.0f}}}};
.clearValue = {.color{{0.0f, 0.0f, 0.0f, 1.0f}}}};
if(color.layout.has_value())
{
vkColor.imageLayout = color.layout.value();
Expand Down Expand Up @@ -322,7 +322,7 @@ void CommandBuffer::beginRendering(const RenderingInfo& renderingInfo)
.imageLayout = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,
.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
.storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE,
.clearValue = {.depthStencil{1.0f, 0}},
.clearValue = {.depthStencil{1.0f, 0x00}},
};
if(m_commandState.depthAttachment.layout.has_value())
{
Expand Down
6 changes: 3 additions & 3 deletions engine/event/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Event

struct MouseButtonEvent : public Event
{
MouseButtonEvent(MouseButton button, double absX, double absY, bool pressed) :
MouseButtonEvent(MouseButton button, int absX, int absY, bool pressed) :
Event(EventType::MOUSE_BTN),
m_button(button),
m_absX(absX),
Expand All @@ -40,8 +40,8 @@ struct MouseButtonEvent : public Event
}

MouseButton m_button;
double m_absX;
double m_absY;
int m_absX;
int m_absY;
bool m_pressed;
};

Expand Down
3 changes: 1 addition & 2 deletions engine/wsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ elseif(APH_WSI_BACKEND STREQUAL "SDL2")
${APH_ENGINE_WSI_DIR}/wsi_sdl2.cpp
${APH_ENGINE_WSI_DIR}/imgui_impl_sdl2.cpp
)
# TODO SDL specific
target_include_directories(wsi PRIVATE ${SDL2_INCLUDE_DIR})
target_link_libraries(wsi PRIVATE ${SDL2_LIBRARY})
target_link_libraries(wsi PRIVATE SDL2::SDL2)
endif()

aph_compiler_options(wsi)
Expand Down

0 comments on commit 0c13665

Please sign in to comment.