From b63fd83b6cc98ef94e2e9805b412b32018f7c79a Mon Sep 17 00:00:00 2001 From: Rob Armstrong Date: Thu, 1 May 2025 15:24:57 -0700 Subject: [PATCH 1/4] Update README for 13.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6536152..6c72a2dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CUDA Samples -Samples for CUDA Developers which demonstrates features in CUDA Toolkit. This version supports [CUDA Toolkit 12.9](https://developer.nvidia.com/cuda-downloads). +Samples for CUDA Developers which demonstrates features in CUDA Toolkit. This version supports [CUDA Toolkit 13.1](https://developer.nvidia.com/cuda-downloads). ## Release Notes From f288b2e2615edda10d7c24ba60793a607d7c8a49 Mon Sep 17 00:00:00 2001 From: Francesco Rizzi Date: Mon, 5 May 2025 17:43:23 +0200 Subject: [PATCH 2/4] Fix bug in 6_Performance/transpose: copy sharedmem kernel (#363) Update kernel loop bounds handling, main loop data copy to avoid incorrect reuse of output results. --------- Authored-by: Francesco Rizzi --- Samples/6_Performance/transpose/transpose.cu | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Samples/6_Performance/transpose/transpose.cu b/Samples/6_Performance/transpose/transpose.cu index 068aa02e..8a1d8bec 100644 --- a/Samples/6_Performance/transpose/transpose.cu +++ b/Samples/6_Performance/transpose/transpose.cu @@ -103,7 +103,7 @@ __global__ void copySharedMem(float *odata, float *idata, int width, int height) for (int i = 0; i < TILE_DIM; i += BLOCK_ROWS) { if (xIndex < width && yIndex < height) { - tile[threadIdx.y][threadIdx.x] = idata[index]; + tile[threadIdx.y + i][threadIdx.x] = idata[index + i * width]; } } @@ -111,7 +111,7 @@ __global__ void copySharedMem(float *odata, float *idata, int width, int height) for (int i = 0; i < TILE_DIM; i += BLOCK_ROWS) { if (xIndex < height && yIndex < width) { - odata[index] = tile[threadIdx.y][threadIdx.x]; + odata[index + i * width] = tile[threadIdx.y + i][threadIdx.x]; } } } @@ -596,6 +596,18 @@ int main(int argc, char **argv) (size_x * size_y), 1, TILE_DIM * BLOCK_ROWS); + + // Reset d_odata to zero before starting the next loop iteration to avoid + // carrying over results from previous kernels. Without this reset, residual + // data from a prior kernel (e.g., 'copy') could make a subsequent + // kernel (e.g., 'copySharedMem') appear correct even if it performs no work, + // leading to false positives in compareData. + for (int i = 0; i < (size_x * size_y); ++i) { + h_odata[i] = 0; + } + // copy host data to device + checkCudaErrors( + cudaMemcpy(d_odata, h_odata, mem_size, cudaMemcpyHostToDevice)); } // cleanup From 555353b4b5796677da4d584592cc4c881812f96c Mon Sep 17 00:00:00 2001 From: shawnz Date: Fri, 11 Jul 2025 10:50:57 +0800 Subject: [PATCH 3/4] Bug 5376426: Update README and CMakeLists.txt for freeglut and glew on WOA --- README.md | 9 +++++++++ Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt | 10 ++++++++-- .../0_Introduction/simpleTexture3D/CMakeLists.txt | 10 ++++++++-- .../FunctionPointers/CMakeLists.txt | 10 ++++++++-- .../boxFilter/CMakeLists.txt | 10 ++++++++-- .../imageDenoising/CMakeLists.txt | 10 ++++++++-- .../particles/CMakeLists.txt | 10 ++++++++-- .../3_CUDA_Features/bindlessTexture/CMakeLists.txt | 10 ++++++++-- Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt | 10 ++++++++-- Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt | 10 ++++++++-- Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt | 10 ++++++++-- Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt | 10 ++++++++-- .../5_Domain_Specific/bicubicTexture/CMakeLists.txt | 10 ++++++++-- .../5_Domain_Specific/bilateralFilter/CMakeLists.txt | 10 ++++++++-- Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt | 10 ++++++++-- Samples/5_Domain_Specific/nbody/CMakeLists.txt | 10 ++++++++-- .../5_Domain_Specific/postProcessGL/CMakeLists.txt | 10 ++++++++-- .../recursiveGaussian/CMakeLists.txt | 10 ++++++++-- Samples/5_Domain_Specific/simpleGL/CMakeLists.txt | 10 ++++++++-- .../5_Domain_Specific/smokeParticles/CMakeLists.txt | 10 ++++++++-- .../5_Domain_Specific/volumeFiltering/CMakeLists.txt | 12 +++++++++--- .../5_Domain_Specific/volumeRender/CMakeLists.txt | 10 ++++++++-- 22 files changed, 178 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 252fe75f..fe18b86c 100644 --- a/README.md +++ b/README.md @@ -390,11 +390,20 @@ OpenGL is a graphics library used for 2D and 3D rendering. On systems which supp OpenGL ES is an embedded systems graphics library used for 2D and 3D rendering. On systems which support OpenGL ES, NVIDIA's OpenGL ES implementation is provided with the CUDA Driver. +#### Freeglut + +Freeglut is an open-source software library that serves as a replacement for the original OpenGL Utility Toolkit (GLUT). Its primary purpose is to make it easier for developers to create and manage windows containing OpenGL contexts, as well as handle input from devices like the mouse, keyboard, and joystick, across a wide range of platforms. To set up Freeglut on a Windowson on ARM system, you need to build freeglut on your system, and copy the freeglut.lib into the folder `./Common/lib/x64` and copy the freeglut.dll file into the `./bin/win64/${BUILD_TYPE}` execution folder. + #### Vulkan Vulkan is a low-overhead, cross-platform 3D graphics and compute API. Vulkan targets high-performance realtime 3D graphics applications such as video games and interactive media across all platforms. On systems which support Vulkan, NVIDIA's Vulkan implementation is provided with the CUDA Driver. For building and running Vulkan applications one needs to install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/). +#### GLEW + +GLEW (OpenGL Extension Wrangler Library) is a cross-platform, open-source C/C++ library designed to simplify the process of using modern OpenGL features and extensions. Its main function is to dynamically load OpenGL function pointers at runtime, allowing developers to access both core OpenGL functions and additional features provided by hardware vendors, known as extensions. To set up GLEW on a Windows on ARM system, you need to build GLEW on your system, and copy the glew32.lib into the folder `./Common/lib/x64` and the glew32.dll into the `./bin/win64/${BUILD_TYPE}` execution folder. + #### GLFW + GLFW is a lightweight, open-source library designed for managing OpenGL, OpenGL ES, and Vulkan contexts. It simplifies the process of creating and managing windows, handling user input (keyboard, mouse, and joystick), and working with multiple monitors in a cross-platform manner. To set up GLFW on a Windows system, Download the pre-built binaries from [GLFW website](https://www.glfw.org/download.html) and extract the zip file into the folder, pass the GLFW include header folder as `-DGLFW_INCLUDE_DIR` and lib folder as `-DGLFW_LIB_DIR` for cmake configuring. diff --git a/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt b/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt index d2f39715..64a46f06 100644 --- a/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt +++ b/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() @@ -56,7 +62,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(simpleCUDA2GL ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET simpleCUDA2GL @@ -69,7 +75,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET simpleCUDA2GL POST_BUILD COMMAND ${CMAKE_COMMAND} -E - copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt b/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt index a9dc496f..9dc04d43 100644 --- a/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt +++ b/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(simpleTexture3D ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET simpleTexture3D @@ -73,7 +79,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET simpleTexture3D POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt index 8b8b5193..af85634f 100644 --- a/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(FunctionPointers ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET FunctionPointers @@ -73,7 +79,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET FunctionPointers POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt index 43752cce..1a3e3668 100644 --- a/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -74,7 +80,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(boxFilter ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET boxFilter @@ -87,7 +93,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET boxFilter POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt index d6fc5bf6..a7ec3b89 100644 --- a/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() @@ -61,7 +67,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(imageDenoising ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET imageDenoising @@ -74,7 +80,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET imageDenoising POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt index e6e061ea..777a466d 100644 --- a/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ target_compile_features(particles PRIVATE cxx_std_17 cuda_std_17) if(WIN32) target_link_libraries(particles ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET particles @@ -73,7 +79,7 @@ target_compile_features(particles PRIVATE cxx_std_17 cuda_std_17) add_custom_command(TARGET particles POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt b/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt index 6e768b45..bf2be94c 100644 --- a/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt +++ b/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ target_compile_features(bindlessTexture PRIVATE cxx_std_17 cuda_std_17) if(WIN32) target_link_libraries(bindlessTexture ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET bindlessTexture @@ -73,7 +79,7 @@ target_compile_features(bindlessTexture PRIVATE cxx_std_17 cuda_std_17) add_custom_command(TARGET bindlessTexture POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt b/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt index ce04c2bd..c0d8ceb7 100644 --- a/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() @@ -62,7 +68,7 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17) if(WIN32) target_link_libraries(oceanFFT ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET oceanFFT @@ -75,7 +81,7 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17) add_custom_command(TARGET oceanFFT POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt b/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt index 9ae1f3c3..b7c27e2f 100644 --- a/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -62,7 +68,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(randomFog ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET randomFog @@ -75,7 +81,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET randomFog POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt b/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt index aeb990a9..b8cfcfa3 100644 --- a/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt +++ b/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ target_compile_features(Mandelbrot PRIVATE cxx_std_17 cuda_std_17) if(WIN32) target_link_libraries(Mandelbrot ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET Mandelbrot @@ -73,7 +79,7 @@ target_compile_features(Mandelbrot PRIVATE cxx_std_17 cuda_std_17) add_custom_command(TARGET Mandelbrot POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt b/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt index 263ec622..bc4f1848 100644 --- a/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt +++ b/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -59,7 +65,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(SobelFilter ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET SobelFilter @@ -72,7 +78,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET SobelFilter POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt b/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt index 26a9e3ed..b8c8aade 100644 --- a/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt +++ b/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(bicubicTexture ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET bicubicTexture @@ -73,7 +79,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET bicubicTexture POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt b/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt index 43a3410e..fe574eb6 100644 --- a/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt +++ b/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -60,7 +66,7 @@ target_compile_features(bilateralFilter PRIVATE cxx_std_17 cuda_std_17) if(WIN32) target_link_libraries(bilateralFilter ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET bilateralFilter @@ -73,7 +79,7 @@ target_compile_features(bilateralFilter PRIVATE cxx_std_17 cuda_std_17) add_custom_command(TARGET bilateralFilter POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt b/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt index 573a29e3..2a30ef43 100644 --- a/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt +++ b/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -61,7 +67,7 @@ target_compile_features(fluidsGL PRIVATE cxx_std_17 cuda_std_17) if(WIN32) target_link_libraries(fluidsGL ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET fluidsGL @@ -74,7 +80,7 @@ target_compile_features(fluidsGL PRIVATE cxx_std_17 cuda_std_17) add_custom_command(TARGET fluidsGL POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/nbody/CMakeLists.txt b/Samples/5_Domain_Specific/nbody/CMakeLists.txt index 8842aec4..8b748611 100644 --- a/Samples/5_Domain_Specific/nbody/CMakeLists.txt +++ b/Samples/5_Domain_Specific/nbody/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -53,7 +59,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(nbody ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET nbody @@ -66,7 +72,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET nbody POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/postProcessGL/CMakeLists.txt b/Samples/5_Domain_Specific/postProcessGL/CMakeLists.txt index d8bb22c9..7fcfb276 100644 --- a/Samples/5_Domain_Specific/postProcessGL/CMakeLists.txt +++ b/Samples/5_Domain_Specific/postProcessGL/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -59,7 +65,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(postProcessGL ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET postProcessGL @@ -72,7 +78,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET postProcessGL POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/recursiveGaussian/CMakeLists.txt b/Samples/5_Domain_Specific/recursiveGaussian/CMakeLists.txt index 4d84f047..38c4d37c 100644 --- a/Samples/5_Domain_Specific/recursiveGaussian/CMakeLists.txt +++ b/Samples/5_Domain_Specific/recursiveGaussian/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -59,7 +65,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(recursiveGaussian ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET recursiveGaussian @@ -72,7 +78,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET recursiveGaussian POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/simpleGL/CMakeLists.txt b/Samples/5_Domain_Specific/simpleGL/CMakeLists.txt index 9aedcc3f..193db054 100644 --- a/Samples/5_Domain_Specific/simpleGL/CMakeLists.txt +++ b/Samples/5_Domain_Specific/simpleGL/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -53,7 +59,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(simpleGL ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET simpleGL @@ -66,7 +72,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET simpleGL POST_BUILD COMMAND ${CMAKE_COMMAND} -E - copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + copy ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/smokeParticles/CMakeLists.txt b/Samples/5_Domain_Specific/smokeParticles/CMakeLists.txt index 1604e34b..a756cb1b 100644 --- a/Samples/5_Domain_Specific/smokeParticles/CMakeLists.txt +++ b/Samples/5_Domain_Specific/smokeParticles/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -59,7 +65,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(smokeParticles ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET smokeParticles @@ -72,7 +78,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET smokeParticles POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/volumeFiltering/CMakeLists.txt b/Samples/5_Domain_Specific/volumeFiltering/CMakeLists.txt index e7df4ca9..cef805a3 100644 --- a/Samples/5_Domain_Specific/volumeFiltering/CMakeLists.txt +++ b/Samples/5_Domain_Specific/volumeFiltering/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -59,7 +65,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(volumeFiltering ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET volumeFiltering @@ -72,8 +78,8 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET volumeFiltering POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll - ${CMAKE_CURRENT_BINARY_DIR}/$ + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll + ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() diff --git a/Samples/5_Domain_Specific/volumeRender/CMakeLists.txt b/Samples/5_Domain_Specific/volumeRender/CMakeLists.txt index 249668ba..ceac35d8 100644 --- a/Samples/5_Domain_Specific/volumeRender/CMakeLists.txt +++ b/Samples/5_Domain_Specific/volumeRender/CMakeLists.txt @@ -22,6 +22,12 @@ include_directories(../../../Common) if(WIN32) set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common") set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64") + # The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default. + if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib") + set(GLEW_LIB_NAME "glew32") + else() + set(GLEW_LIB_NAME "glew64") + endif() endif() find_package(OpenGL) @@ -59,7 +65,7 @@ if(${OpenGL_FOUND}) if(WIN32) target_link_libraries(volumeRender ${PC_GLUT_LIBRARY_DIRS}/freeglut.lib - ${PC_GLUT_LIBRARY_DIRS}/glew64.lib + ${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib ) add_custom_command(TARGET volumeRender @@ -72,7 +78,7 @@ if(${OpenGL_FOUND}) add_custom_command(TARGET volumeRender POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/glew64.dll + ${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$/${GLEW_LIB_NAME}.dll ${CMAKE_CURRENT_BINARY_DIR}/$ ) endif() From 688fff15b27f5ffb75b68e0ebe4f7471925cc353 Mon Sep 17 00:00:00 2001 From: shawnz Date: Fri, 11 Jul 2025 11:05:18 +0800 Subject: [PATCH 4/4] Update README for freeglut and glew --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe18b86c..71aaba56 100644 --- a/README.md +++ b/README.md @@ -392,7 +392,7 @@ OpenGL ES is an embedded systems graphics library used for 2D and 3D rendering. #### Freeglut -Freeglut is an open-source software library that serves as a replacement for the original OpenGL Utility Toolkit (GLUT). Its primary purpose is to make it easier for developers to create and manage windows containing OpenGL contexts, as well as handle input from devices like the mouse, keyboard, and joystick, across a wide range of platforms. To set up Freeglut on a Windowson on ARM system, you need to build freeglut on your system, and copy the freeglut.lib into the folder `./Common/lib/x64` and copy the freeglut.dll file into the `./bin/win64/${BUILD_TYPE}` execution folder. +Freeglut is an open-source software library that serves as a replacement for the original OpenGL Utility Toolkit (GLUT). Its primary purpose is to make it easier for developers to create and manage windows containing OpenGL contexts, as well as handle input from devices like the mouse, keyboard, and joystick, across a wide range of platforms. To set up Freeglut on a Windowson on ARM system, you need to download the source from [Freeglut website](https://freeglut.sourceforge.net/), build freeglut on your system, and copy the freeglut.lib into the folder `./Common/lib/x64` and copy the freeglut.dll file into the `./bin/win64/${BUILD_TYPE}` execution folder. #### Vulkan @@ -400,7 +400,7 @@ Vulkan is a low-overhead, cross-platform 3D graphics and compute API. Vulkan tar #### GLEW -GLEW (OpenGL Extension Wrangler Library) is a cross-platform, open-source C/C++ library designed to simplify the process of using modern OpenGL features and extensions. Its main function is to dynamically load OpenGL function pointers at runtime, allowing developers to access both core OpenGL functions and additional features provided by hardware vendors, known as extensions. To set up GLEW on a Windows on ARM system, you need to build GLEW on your system, and copy the glew32.lib into the folder `./Common/lib/x64` and the glew32.dll into the `./bin/win64/${BUILD_TYPE}` execution folder. +GLEW (OpenGL Extension Wrangler Library) is a cross-platform, open-source C/C++ library designed to simplify the process of using modern OpenGL features and extensions. Its main function is to dynamically load OpenGL function pointers at runtime, allowing developers to access both core OpenGL functions and additional features provided by hardware vendors, known as extensions. To set up GLEW on a Windows on ARM system, you need to download the source from [GLEW website](https://glew.sourceforge.net/), build GLEW on your system, and copy the glew32.lib into the folder `./Common/lib/x64` and the glew32.dll into the `./bin/win64/${BUILD_TYPE}` execution folder. #### GLFW