Skip to content

Commit

Permalink
Make OpenGL always select NVIDIA GPU or AMD GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
qninhdt committed Apr 6, 2023
1 parent 5af364a commit d76c9f8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.vs
*.hjbt
out
build
CMakeSettings.json
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
project ("cybrion")

add_executable(${PROJECT_NAME}
"src/main.cpp" "src/core/log.cpp" "src/client/resource/shader_manager.cpp" "src/client/local_game.cpp" "src/util/file.cpp" "src/client/application.cpp" "src/client/GL/mesh.cpp" "src/client/GL/texture_array.cpp" "src/core/transform.cpp" "src/client/camera.cpp" "src/client/frame_profiler.cpp" "src/client/hud.cpp" "src/world/chunk/chunk.cpp" "src/util/math.hpp" "src/world/world.cpp" "src/client/resource/block_loader.cpp" "src/game.cpp" "src/world/block/block.cpp" "src/client/graphic/block_renderer.cpp" "src/client/graphic/world_renderer.cpp" "src/core/stopwatch.cpp" "src/world/block/blocks.cpp" "src/world/entity/entity.cpp" "src/player.cpp" "src/util/math.cpp" "src/client/GL/texture.cpp" "src/voxel_ray.cpp" "src/client/graphic/basic_mesh_generator.cpp" "src/client/graphic/chunk_renderer.cpp" "src/physic/aabb.cpp" "src/world/world_generator.cpp" "src/client/graphic/entity_renderer.cpp" "src/core/pool.cpp" "third_party/FastNoiseLite/src/FastNoiseLite.cpp" "src/world/block/building/fence_block.cpp" "src/world/block/nature/plant_block.cpp" "src/world/block/decoration/tablecloth_block.cpp" "src/world/block/nature/log_block.cpp" "src/world/block/decoration/chess_block.cpp" "src/world/block/building/fence_gate_block.cpp" "src/client/GL/framebuffer.cpp")
"src/main.cpp" "src/core/log.cpp" "src/client/resource/shader_manager.cpp" "src/client/local_game.cpp" "src/util/file.cpp" "src/client/application.cpp" "src/client/GL/mesh.cpp" "src/client/GL/texture_array.cpp" "src/core/transform.cpp" "src/client/camera.cpp" "src/client/frame_profiler.cpp" "src/client/hud.cpp" "src/world/chunk/chunk.cpp" "src/util/math.hpp" "src/world/world.cpp" "src/client/resource/block_loader.cpp" "src/game.cpp" "src/world/block/block.cpp" "src/client/graphic/block_renderer.cpp" "src/client/graphic/world_renderer.cpp" "src/core/stopwatch.cpp" "src/world/block/blocks.cpp" "src/world/entity/entity.cpp" "src/player.cpp" "src/util/math.cpp" "src/client/GL/texture.cpp" "src/voxel_ray.cpp" "src/client/graphic/basic_mesh_generator.cpp" "src/client/graphic/chunk_renderer.cpp" "src/physic/aabb.cpp" "src/world/world_generator.cpp" "src/client/graphic/entity_renderer.cpp" "src/core/pool.cpp" "third_party/FastNoiseLite/src/FastNoiseLite.cpp" "src/world/block/building/fence_block.cpp" "src/world/block/nature/plant_block.cpp" "src/world/block/decoration/tablecloth_block.cpp" "src/world/block/nature/log_block.cpp" "src/world/block/decoration/chess_block.cpp" "src/world/block/building/fence_gate_block.cpp" "src/client/GL/framebuffer.cpp" "src/gpu.cpp")

target_include_directories(${PROJECT_NAME} PUBLIC src)

Expand Down
Binary file added cybrion_v1.0_alpha.rar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#ifdef CYBRION_DEBUG
#define CYBRION_ROOT_PATH "D:/github/cybrion/"
#else
#define CYBRION_ROOT_PATH "D:/github/cybrion/"
#define CYBRION_ROOT_PATH
#endif

namespace cybrion
Expand Down
6 changes: 6 additions & 0 deletions src/gpu.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <Windows.h>

extern "C" {
_declspec(dllexport) DWORD NvOptimusEnablement = 1;
_declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}

0 comments on commit d76c9f8

Please sign in to comment.