From 7c148d755562ec670419f4f147df83e3ac353aa5 Mon Sep 17 00:00:00 2001 From: Attila Uygun Date: Sat, 12 Aug 2023 23:04:58 +0200 Subject: [PATCH] format --- build/toolchain/gcc/BUILD.gn | 2 +- src/engine/BUILD.gn | 4 +--- src/engine/renderer/opengl/opengl.h | 8 ++++++++ src/hello_world/BUILD.gn | 4 +--- src/third_party/BUILD.gn | 5 ++++- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/build/toolchain/gcc/BUILD.gn b/build/toolchain/gcc/BUILD.gn index 503fe29..6c323e4 100644 --- a/build/toolchain/gcc/BUILD.gn +++ b/build/toolchain/gcc/BUILD.gn @@ -54,7 +54,7 @@ toolchain("gcc") { } if (is_apple) { - not_needed([ "ar" ]) # libtool is used instead. + not_needed([ "ar" ]) # libtool is used instead. } tool("alink") { diff --git a/src/engine/BUILD.gn b/src/engine/BUILD.gn index ad3155a..21efc8e 100644 --- a/src/engine/BUILD.gn +++ b/src/engine/BUILD.gn @@ -62,9 +62,7 @@ source_set("engine") { libs = [] if (target_os == "linux" || target_os == "win") { - sources += [ - "platform/asset_file_generic.cc", - ] + sources += [ "platform/asset_file_generic.cc" ] } if (target_os == "linux") { diff --git a/src/engine/renderer/opengl/opengl.h b/src/engine/renderer/opengl/opengl.h index 43a4588..8963538 100644 --- a/src/engine/renderer/opengl/opengl.h +++ b/src/engine/renderer/opengl/opengl.h @@ -2,21 +2,29 @@ #define ENGINE_RENDERER_OPENGL_OPENGL_H #if defined(__ANDROID__) + // Use the modified Khronos header from ndk-helper. This gives access to // additional functionality the drivers may expose but which the system headers // do not. #include "third_party/android/gl3stub.h" + #include + #elif defined(__linux__) + #include "third_party/glew/glew.h" #include "third_party/glew/glxew.h" + #elif defined(_WIN32) + #define GLEW_STATIC #include "third_party/glew/glew.h" #include "third_party/glew/wglew.h" + #endif #if defined(__linux__) || defined(_WIN32) + // Define the missing format for the etc1 #ifndef GL_ETC1_RGB8_OES #define GL_ETC1_RGB8_OES 0x8D64 diff --git a/src/hello_world/BUILD.gn b/src/hello_world/BUILD.gn index ff4555c..29e1bea 100644 --- a/src/hello_world/BUILD.gn +++ b/src/hello_world/BUILD.gn @@ -1,7 +1,5 @@ executable("hello_world") { - sources = [ - "hello_world.cc", - ] + sources = [ "hello_world.cc" ] deps = [ "//src/base", diff --git a/src/third_party/BUILD.gn b/src/third_party/BUILD.gn index f3c4612..58337a9 100644 --- a/src/third_party/BUILD.gn +++ b/src/third_party/BUILD.gn @@ -79,7 +79,10 @@ source_set("third_party") { "volk/volk.c", ] - defines = [ "VMA_STATIC_VULKAN_FUNCTIONS=1", "GLEW_STATIC" ] + defines = [ + "VMA_STATIC_VULKAN_FUNCTIONS=1", + "GLEW_STATIC", + ] if (target_os == "linux" || target_os == "win") { sources += [