mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-04 15:23:13 +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",
|
"label": "C/C++: g++-11 build active file",
|
||||||
"command": "/usr/bin/g++",
|
"command": "/usr/bin/g++",
|
||||||
"args": [
|
"args": [
|
||||||
"-lGL", "-lm",
|
"-Wall", "${workspaceFolder}/Engine/engine/*.cpp",
|
||||||
"-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",
|
|
||||||
"-o",
|
"-o",
|
||||||
"${workspaceFolder}/app",
|
"${workspaceFolder}/Engine/engine/match", "-lglfw", "-lGLU", "-lGL", "-lm",
|
||||||
|
|
||||||
],
|
],
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${fileDirname}"
|
"cwd": "${fileDirname}"
|
||||||
|
|||||||
Binary file not shown.
@ -1,15 +1,16 @@
|
|||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
GLFWwindow* window;
|
GLFWwindow* window;
|
||||||
|
|
||||||
/* Initialize the library */
|
/* Initialize the library */
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create a windowed mode window and its OpenGL context */
|
/* 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)
|
if (!window)
|
||||||
{
|
{
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user