add glm, fix project name
This commit is contained in:
parent
c4abb6750f
commit
1e08c45f0c
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
|
.vs/
|
||||||
|
.vscode/
|
||||||
build/
|
build/
|
||||||
bin/
|
bin/
|
||||||
out/
|
out/
|
||||||
*.log
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ echo:
|
|||||||
echo Kopiruji exe do bin...
|
echo Kopiruji exe do bin...
|
||||||
echo:
|
echo:
|
||||||
|
|
||||||
copy %BUILD_TYPE%\MyOpenGLApp.exe ..\bin\MyOpenGLApp.exe
|
copy %BUILD_TYPE%\MyOpenGLProject.exe ..\bin\MyOpenGLProject.exe
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
echo Hotovo
|
echo Hotovo
|
||||||
|
|||||||
@ -10,12 +10,13 @@ if(WIN32)
|
|||||||
# Use FetchContent to download GLFW and ImGui
|
# Use FetchContent to download GLFW and ImGui
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
|
# download GLM
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
glad
|
glm
|
||||||
GIT_REPOSITORY https://github.com/Dav1dde/glad.git
|
GIT_REPOSITORY https://github.com/g-truc/glm.git
|
||||||
GIT_TAG v2.0.7 # Latest version at the time of writing
|
GIT_TAG bf71a834948186f4097caa076cd2663c69a10e1e #refs/tags/1.0.1
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(glad)
|
FetchContent_MakeAvailable(glm)
|
||||||
|
|
||||||
# Download GLFW
|
# Download GLFW
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
@ -55,10 +56,10 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Define your executable and include ImGui and backend sources
|
# Define your executable and include ImGui and backend sources
|
||||||
add_executable(MyOpenGLApp WIN32 ${APP_SOURCES} ${IMGUI_SOURCES})
|
add_executable(${PROJECT_NAME} WIN32 ${APP_SOURCES} ${IMGUI_SOURCES})
|
||||||
|
|
||||||
# Include directories for ImGui, GLEW, and GLFW
|
# Include directories for ImGui, GLEW, and GLFW
|
||||||
target_include_directories(MyOpenGLApp PRIVATE
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||||
${imgui_SOURCE_DIR}
|
${imgui_SOURCE_DIR}
|
||||||
${IMGUI_BACKENDS}
|
${IMGUI_BACKENDS}
|
||||||
${glfw_SOURCE_DIR}/include
|
${glfw_SOURCE_DIR}/include
|
||||||
@ -66,9 +67,10 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Link against Windows-specific libraries, GLEW, GLFW, and OpenGL
|
# Link against Windows-specific libraries, GLEW, GLFW, and OpenGL
|
||||||
target_link_libraries(MyOpenGLApp PRIVATE
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
glfw
|
glfw
|
||||||
glad
|
glad
|
||||||
|
glm::glm
|
||||||
)
|
)
|
||||||
|
|
||||||
# Define GLEW_STATIC for static linking of GLEW
|
# Define GLEW_STATIC for static linking of GLEW
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_glfw.h"
|
#include "imgui_impl_glfw.h"
|
||||||
#include "imgui_impl_opengl3.h"
|
#include "imgui_impl_opengl3.h"
|
||||||
|
//#include <glm/glm.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
@ -48,7 +49,7 @@ int main() {
|
|||||||
IMGUI_CHECKVERSION();
|
IMGUI_CHECKVERSION();
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
ImGuiIO& io = ImGui::GetIO(); //(void)io;
|
ImGuiIO& io = ImGui::GetIO(); //(void)io;
|
||||||
io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18);
|
// io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18);
|
||||||
|
|
||||||
// Setup Dear ImGui style
|
// Setup Dear ImGui style
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user