Skip to content

Commit 84d452a

Browse files
Dan AlbertDanAlbert
authored andcommitted
Increase warning level in hello-vulkan.
1 parent 9e82688 commit 84d452a

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

hello-vulkan/app/src/main/cpp/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@
1717
cmake_minimum_required(VERSION 4.1.0)
1818
project(hellovkjni)
1919

20+
include(AppLibrary)
21+
2022
# Include the GameActivity static lib to the project.
2123
find_package(game-activity REQUIRED CONFIG)
2224

2325
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2426

25-
# Now build app's shared lib
26-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
27-
2827
add_definitions(-DVK_USE_PLATFORM_ANDROID_KHR=1)
2928

30-
add_library(${PROJECT_NAME} SHARED
29+
add_app_library(${PROJECT_NAME} SHARED
3130
vk_main.cpp)
3231

3332
# add lib dependencies

hello-vulkan/app/src/main/cpp/hellovk.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,7 @@ void HelloVK::render() {
468468
* getPrerotationMatrix handles screen rotation with 3 hardcoded rotation
469469
* matrices (detailed below). We skip the 180 degrees rotation.
470470
*/
471-
void getPrerotationMatrix(const VkSurfaceCapabilitiesKHR& capabilities,
472-
const VkSurfaceTransformFlagBitsKHR& pretransformFlag,
471+
void getPrerotationMatrix(const VkSurfaceTransformFlagBitsKHR& pretransformFlag,
473472
std::array<float, 16>& mat) {
474473
// mat is initialized to the identity matrix
475474
mat = {1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1.};
@@ -533,8 +532,7 @@ void HelloVK::updateUniformBuffer(uint32_t currentImage) {
533532
SwapChainSupportDetails swapChainSupport =
534533
querySwapChainSupport(physicalDevice);
535534
UniformBufferObject ubo{};
536-
getPrerotationMatrix(swapChainSupport.capabilities, pretransformFlag,
537-
ubo.mvp);
535+
getPrerotationMatrix(pretransformFlag, ubo.mvp);
538536
void* data;
539537
vkMapMemory(device, uniformBuffersMemory[currentImage], 0, sizeof(ubo), 0,
540538
&data);

hello-vulkan/app/src/main/cpp/vk_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ static void HandleCmd(struct android_app* app, int32_t cmd) {
8989
* not use/process any input events, return false for all input events so system
9090
* can still process them.
9191
*/
92-
extern "C" bool VulkanKeyEventFilter(const GameActivityKeyEvent* event) {
92+
extern "C" bool VulkanKeyEventFilter(const GameActivityKeyEvent*) {
9393
return false;
9494
}
95-
extern "C" bool VulkanMotionEventFilter(const GameActivityMotionEvent* event) {
95+
extern "C" bool VulkanMotionEventFilter(const GameActivityMotionEvent*) {
9696
return false;
9797
}
9898

0 commit comments

Comments
 (0)