Skip to content

Commit

Permalink
windows rel
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamtowards committed Jan 2, 2023
1 parent 30ee0db commit fbbd07f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ set(CMAKE_CXX_STANDARD 20)

option(BUILD_SHARED_LIBS OFF)
option(CMAKE_BUILD_TYPE Release)
set(BUILD_DISTRO OFF)

# there 3 build mode
# 1. Dev: (DEBUG) + (Pre Compiled Shared Library, for faster compile, release-shared-library for faster speed & fastnoise correctness)
# 2. Rel: (RELEASE) + No Shared Library. packed into one. be simple

#set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")
#set(CMAKE_CXX_FLAGS "-Wall -Wextra")
Expand All @@ -27,8 +32,11 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROD_BINARY_DIR}) # for Windows
message("Build Env: ${CMAKE_SYSTEM_PROCESSOR}; ${CMAKE_SYSTEM_NAME}")
message("Binary Dir: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")

if(WIN32)
link_libraries(winmm gdi32 wsock32 ws2_32) # for enet lib
endif()

if(BUILD_SHARED_LIBS)
if(BUILD_SHARED_LIBS OR BUILD_DISTRO)

set(GLFW_BUILD_EXAMPLES OFF)
set(GLFW_BUILD_TESTS OFF)
Expand All @@ -50,8 +58,6 @@ else()
if(WIN32)
link_libraries(BulletDynamics BulletCollision LinearMath
glfw3 FastNoise)

link_libraries(winmm gdi32 wsock32 ws2_32) # for enet lib
endif()
endif()

Expand Down
Binary file added run/Ethertia-rel-230102.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion run/assets/shaders/chunk/geometry.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void main()
float Roughness = 1.0;

// bool useMTL = TexCoord.y >= 1342 - 1; // MTL magic number. Platform Error: Use exactly "==" compresion produces random result on some Win10 GL device
bool pureMTL = TexCoord.y == 1000;
bool pureMTL = TexCoord.y >= 999; // UV.y == 1000, >= 999 for windows gl percision capability.
if (!pureMTL) { // no material id, use TexCoord.
Albedo = texture(diffuseMap, TexCoord).rgba;

Expand Down

0 comments on commit fbbd07f

Please sign in to comment.