mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-04 13:23:09 +02:00
feat: working glfw hello world
This commit is contained in:
parent
a03099eb23
commit
8f60f623cd
14
.vscode/tasks.json
vendored
14
.vscode/tasks.json
vendored
@ -5,18 +5,10 @@
|
||||
"label": "C/C++: g++-11 build active file",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-lGL", "-lm",
|
||||
"-lX11", "-lpthread", "-lXi", "-lXrandr", "-ldl",
|
||||
"-std=c++17",
|
||||
"-fdiagnostics-color=always",
|
||||
"-Wall",
|
||||
"-g",
|
||||
"-I${workspaceFolder}/dependencies/include",
|
||||
"-LI${workspaceFolder}/dependencies/library",
|
||||
"${workspaceFolder}/dependencies/library/libglfw3.a",
|
||||
"${workspaceFolder}/Engine/engine/*.cpp",
|
||||
"-Wall", "${workspaceFolder}/Engine/engine/*.cpp",
|
||||
"-o",
|
||||
"${workspaceFolder}/app",
|
||||
"${workspaceFolder}/Engine/engine/match", "-lglfw", "-lGLU", "-lGL", "-lm",
|
||||
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
|
||||
Binary file not shown.
@ -1,15 +1,16 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
GLFWwindow* window;
|
||||
|
||||
/* Initialize the library */
|
||||
if (!glfwInit())
|
||||
if (!glfwInit())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Create a windowed mode window and its OpenGL context */
|
||||
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
|
||||
window = glfwCreateWindow(640, 480, "xD", NULL, NULL);
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user