Implemented GLFW
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "deps/glfw"]
|
||||||
|
path = deps/glfw
|
||||||
|
url = https://github.com/glfw/glfw.git
|
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.12.35527.113 d17.12
|
VisualStudioVersion = 17.12.35527.113
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "2dGameProject", "2dGameProject\2dGameProject.vcxproj", "{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "2dGameProject", "2dGameProject\2dGameProject.vcxproj", "{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glfw", "deps\glfw\glfw.vcxproj", "{C40453A2-A653-46A2-9AD7-F174540EF26C}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
@ -21,6 +23,14 @@ Global
|
|||||||
{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}.Release|x64.Build.0 = Release|x64
|
{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}.Release|x64.Build.0 = Release|x64
|
||||||
{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}.Release|x86.ActiveCfg = Release|Win32
|
{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}.Release|x86.ActiveCfg = Release|Win32
|
||||||
{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}.Release|x86.Build.0 = Release|Win32
|
{D74BE7C6-1564-4E2E-B3E8-9564C0A4156C}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Release|x64.Build.0 = Release|x64
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{C40453A2-A653-46A2-9AD7-F174540EF26C}.Release|x86.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -104,10 +104,12 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\piwalker\source\repos\2dGameProject\deps\glfw\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
@ -129,6 +131,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\deps\glfw\glfw.vcxproj">
|
||||||
|
<Project>{c40453a2-a653-46a2-9ad7-f174540ef26c}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
@ -1,7 +1,28 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::cout << "Hello, World!" << std::endl;
|
|
||||||
std::cin.get();
|
GLFWwindow* window;
|
||||||
|
|
||||||
|
if (!glfwInit())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
window = glfwCreateWindow(649, 480, "Test", NULL, NULL);
|
||||||
|
if (!window) {
|
||||||
|
glfwTerminate();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
glfwMakeContextCurrent(window);
|
||||||
|
|
||||||
|
while (!glfwWindowShouldClose(window)) {
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
glfwSwapBuffers(window);
|
||||||
|
glfwPollEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
glfwTerminate();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
1
deps/glfw
vendored
Submodule
1
deps/glfw
vendored
Submodule
Submodule deps/glfw added at 21fea01161
Reference in New Issue
Block a user