Skip to content

Commit 1a8be0c

Browse files
committed
aded solutions to tutorial
1 parent a7da024 commit 1a8be0c

File tree

470 files changed

+47295
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

470 files changed

+47295
-0
lines changed

.vscode/configurationCache.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"buildTargets":[],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}}

.vscode/dryrun.log

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
make --dry-run --always-make --keep-going --print-directory
2+
make: Entering directory '/home/obliterator/Euclid_Engine'
3+
make: Leaving directory '/home/obliterator/Euclid_Engine'
4+
5+
make: *** No targets specified and no makefile found. Stop.
6+

.vscode/targets.log

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
make all --print-data-base --no-builtin-variables --no-builtin-rules --question
2+
make: *** No rule to make target 'all'. Stop.
3+
4+
# GNU Make 4.3
5+
# Built for x86_64-pc-linux-gnu
6+
# Copyright (C) 1988-2020 Free Software Foundation, Inc.
7+
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
8+
# This is free software: you are free to change and redistribute it.
9+
# There is NO WARRANTY, to the extent permitted by law.
10+
11+
# Make data base, printed on Wed Jun 15 11:41:58 2022
12+
13+
# Variables
14+
15+
# environment
16+
GDK_BACKEND = x11
17+
# environment
18+
LC_ALL = C
19+
# environment
20+
GNOME_SHELL_SESSION_MODE = ubuntu
21+
# environment
22+
SSH_AGENT_LAUNCHER = gnome-keyring
23+
# environment
24+
GJS_DEBUG_OUTPUT = stderr
25+
# environment
26+
VSCODE_IPC_HOOK_EXTHOST = /run/user/1000/vscode-ipc-c0981145-4cd6-486e-99f3-f24ff3a1deb6.sock
27+
# environment
28+
MANDATORY_PATH = /usr/share/gconf/ubuntu.mandatory.path
29+
# environment
30+
VSCODE_CWD = /home/obliterator
31+
# environment
32+
WINDOWPATH = 2
33+
# default
34+
MAKE_COMMAND := make
35+
# environment
36+
QT_ACCESSIBILITY = 1
37+
# automatic
38+
@D = $(patsubst %/,%,$(dir $@))
39+
# environment
40+
VSCODE_HANDLES_UNCAUGHT_ERRORS = true
41+
# default
42+
.VARIABLES :=
43+
# environment
44+
PWD = /home/obliterator/Euclid_Engine
45+
# automatic
46+
%D = $(patsubst %/,%,$(dir $%))
47+
# environment
48+
XDG_DATA_DIRS = /usr/share/ubuntu:/home/obliterator/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
49+
# automatic
50+
^D = $(patsubst %/,%,$(dir $^))
51+
# environment
52+
VSCODE_LOG_STACK = false
53+
# automatic
54+
%F = $(notdir $%)
55+
# environment
56+
VSCODE_CODE_CACHE_PATH = /home/obliterator/.config/Code/CachedData/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
57+
# environment
58+
LANG = C
59+
# environment
60+
XAUTHORITY = /run/user/1000/gdm/Xauthority
61+
# default
62+
.LOADED :=
63+
# default
64+
.INCLUDE_DIRS = /usr/local/include /usr/include /usr/include
65+
# makefile
66+
MAKEFLAGS = pqrR
67+
# makefile
68+
CURDIR := /home/obliterator/Euclid_Engine
69+
# environment
70+
VSCODE_PIPE_LOGGING = true
71+
# environment
72+
APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = true
73+
# environment
74+
LESSOPEN = | /usr/bin/lesspipe %s
75+
# automatic
76+
*D = $(patsubst %/,%,$(dir $*))
77+
# environment
78+
MFLAGS = -pqrR
79+
# environment
80+
SSH_AUTH_SOCK = /run/user/1000/keyring/ssh
81+
# default
82+
.SHELLFLAGS := -c
83+
# environment
84+
XDG_CONFIG_DIRS = /etc/xdg/xdg-ubuntu:/etc/xdg
85+
# automatic
86+
+D = $(patsubst %/,%,$(dir $+))
87+
# environment
88+
XDG_SESSION_DESKTOP = ubuntu
89+
# makefile
90+
MAKEFILE_LIST :=
91+
# automatic
92+
@F = $(notdir $@)
93+
# environment
94+
VSCODE_VERBOSE_LOGGING = true
95+
# environment
96+
VSCODE_PID = 77894
97+
# environment
98+
XDG_SESSION_TYPE = x11
99+
# automatic
100+
?D = $(patsubst %/,%,$(dir $?))
101+
# environment
102+
SESSION_MANAGER = local/obliterator-Notebook:@/tmp/.ICE-unix/9883,unix/obliterator-Notebook:/tmp/.ICE-unix/9883
103+
# automatic
104+
*F = $(notdir $*)
105+
# environment
106+
CHROME_DESKTOP = code-url-handler.desktop
107+
# environment
108+
DBUS_SESSION_BUS_ADDRESS = unix:path=/run/user/1000/bus
109+
# automatic
110+
<D = $(patsubst %/,%,$(dir $<))
111+
# environment
112+
VSCODE_NLS_CONFIG = {"locale":"en-gb","availableLanguages":{},"_languagePackSupport":true}
113+
# default
114+
MAKE_HOST := x86_64-pc-linux-gnu
115+
# environment
116+
GNOME_DESKTOP_SESSION_ID = this-is-deprecated
117+
# makefile
118+
SHELL = /bin/sh
119+
# default
120+
MAKECMDGOALS := all
121+
# environment
122+
XMODIFIERS = @im=ibus
123+
# environment
124+
GJS_DEBUG_TOPICS = JS ERROR;JS LOG
125+
# environment
126+
SHLVL = 0
127+
# environment
128+
MAKELEVEL := 0
129+
# default
130+
MAKE = $(MAKE_COMMAND)
131+
# environment
132+
PATH = /home/obliterator/.local/bin:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/power/x86/x86_energy_perf_policy:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/power/x86/turbostat:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/power/cpupower:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/perf:/home/obliterator/.local/bin:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/power/x86/x86_energy_perf_policy:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/power/x86/turbostat:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/power/cpupower:/usr/src/linux-headers-5.17.0-9.1-liquorix-amd64/tools/perf:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
133+
# default
134+
MAKEFILES :=
135+
# environment
136+
LANGUAGE = en_IN:en
137+
# automatic
138+
^F = $(notdir $^)
139+
# environment
140+
INVOCATION_ID = 11aebd587a304650b9135a3f08a4b7a0
141+
# environment
142+
VSCODE_LOG_NATIVE = false
143+
# environment
144+
USERNAME = obliterator
145+
# environment
146+
LESSCLOSE = /usr/bin/lesspipe %s %s
147+
# automatic
148+
?F = $(notdir $?)
149+
# environment
150+
XDG_CURRENT_DESKTOP = Unity
151+
# environment
152+
LS_COLORS =
153+
# automatic
154+
+F = $(notdir $+)
155+
# environment
156+
DESKTOP_SESSION = ubuntu
157+
# environment
158+
ORIGINAL_XDG_CURRENT_DESKTOP = ubuntu:GNOME
159+
# 'override' directive
160+
GNUMAKEFLAGS :=
161+
# environment
162+
LOGNAME = obliterator
163+
# environment
164+
GIO_LAUNCHED_DESKTOP_FILE = /usr/share/applications/code.desktop
165+
# makefile
166+
.DEFAULT_GOAL :=
167+
# environment
168+
SYSTEMD_EXEC_PID = 9904
169+
# environment
170+
DISPLAY = :1
171+
# environment
172+
USER = obliterator
173+
# environment
174+
GTK_MODULES = gail:atk-bridge
175+
# environment
176+
DEFAULTS_PATH = /usr/share/gconf/ubuntu.default.path
177+
# default
178+
MAKE_VERSION := 4.3
179+
# environment
180+
MANAGERPID = 9616
181+
# environment
182+
GIO_LAUNCHED_DESKTOP_FILE_PID = 77894
183+
# environment
184+
_ = /usr/share/code/code
185+
# environment
186+
XDG_RUNTIME_DIR = /run/user/1000
187+
# environment
188+
GPG_AGENT_INFO = /run/user/1000/gnupg/S.gpg-agent:0:1
189+
# environment
190+
JOURNAL_STREAM = 8:27687
191+
# environment
192+
XDG_SESSION_CLASS = user
193+
# environment
194+
VSCODE_AMD_ENTRYPOINT = vs/workbench/api/node/extensionHostProcess
195+
# environment
196+
HOME = /home/obliterator
197+
# environment
198+
QT_IM_MODULE = ibus
199+
# environment
200+
ELECTRON_RUN_AS_NODE = 1
201+
# environment
202+
VSCODE_IPC_HOOK = /run/user/1000/vscode-ede14b62-1.67.2-main.sock
203+
# environment
204+
IM_CONFIG_PHASE = 1
205+
# default
206+
.RECIPEPREFIX :=
207+
# automatic
208+
<F = $(notdir $<)
209+
# default
210+
SUFFIXES :=
211+
# default
212+
.FEATURES := target-specific order-only second-expansion else-if shortest-stem undefine oneshell nocomment grouped-target extra-prereqs archives jobserver output-sync check-symlink load
213+
# environment
214+
XDG_MENU_PREFIX = gnome-
215+
# environment
216+
GDMSESSION = ubuntu
217+
# variable set hash-table stats:
218+
# Load=101/1024=10%, Rehash=0, Collisions=4/128=3%
219+
220+
# Pattern-specific Variable Values
221+
222+
# No pattern-specific variable values.
223+
224+
# Directories
225+
226+
# . (device 66307, inode 15601393): 7 files, no impossibilities.
227+
228+
# 7 files, no impossibilities in 1 directories.
229+
230+
# Implicit Rules
231+
232+
# No implicit rules.
233+
234+
# Files
235+
236+
# Not a target:
237+
Makefile:
238+
# Implicit rule search has been done.
239+
# File does not exist.
240+
# File has been updated.
241+
# Failed to be updated.
242+
243+
# Not a target:
244+
.DEFAULT:
245+
# Implicit rule search has not been done.
246+
247+
# Modification time never checked.
248+
# File has not been updated.
249+
250+
# Not a target:
251+
all:
252+
# Command line target.
253+
# Implicit rule search has been done.
254+
# File does not exist.
255+
# File has not been updated.
256+
257+
# Not a target:
258+
makefile:
259+
# Implicit rule search has been done.
260+
# File does not exist.
261+
# File has been updated.
262+
# Failed to be updated.
263+
264+
# Not a target:
265+
GNUmakefile:
266+
# Implicit rule search has been done.
267+
# File does not exist.
268+
# File has been updated.
269+
# Failed to be updated.
270+
271+
# files hash-table stats:
272+
# Load=6/1024=1%, Rehash=0, Collisions=0/15=0%
273+
# VPATH Search Paths
274+
275+
# No 'vpath' search paths.
276+
277+
# No general ('VPATH' variable) search path.
278+
279+
# strcache buffers: 1 (0) / strings = 15 / storage = 125 B / avg = 8 B
280+
# current buf: size = 8162 B / used = 125 B / count = 15 / avg = 8 B
281+
282+
# strcache performance: lookups = 18 / hit rate = 16%
283+
# hash-table stats:
284+
# Load=15/8192=0%, Rehash=0, Collisions=0/18=0%
285+
# Finished Make data base on Wed Jun 15 11:41:58 2022
286+
287+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#include <glad/glad.h>
2+
#include <GLFW/glfw3.h>
3+
4+
#include <iostream>
5+
6+
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
7+
void processInput(GLFWwindow *window);
8+
9+
// settings
10+
const unsigned int SCR_WIDTH = 800;
11+
const unsigned int SCR_HEIGHT = 600;
12+
13+
int main()
14+
{
15+
// glfw: initialize and configure
16+
// ------------------------------
17+
glfwInit();
18+
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
19+
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
20+
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
21+
22+
#ifdef __APPLE__
23+
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
24+
#endif
25+
26+
// glfw window creation
27+
// --------------------
28+
GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "LearnOpenGL", NULL, NULL);
29+
if (window == NULL)
30+
{
31+
std::cout << "Failed to create GLFW window" << std::endl;
32+
glfwTerminate();
33+
return -1;
34+
}
35+
glfwMakeContextCurrent(window);
36+
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
37+
38+
// glad: load all OpenGL function pointers
39+
// ---------------------------------------
40+
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
41+
{
42+
std::cout << "Failed to initialize GLAD" << std::endl;
43+
return -1;
44+
}
45+
46+
// render loop
47+
// -----------
48+
while (!glfwWindowShouldClose(window))
49+
{
50+
// input
51+
// -----
52+
processInput(window);
53+
54+
// glfw: swap buffers and poll IO events (keys pressed/released, mouse moved etc.)
55+
// -------------------------------------------------------------------------------
56+
glfwSwapBuffers(window);
57+
glfwPollEvents();
58+
}
59+
60+
// glfw: terminate, clearing all previously allocated GLFW resources.
61+
// ------------------------------------------------------------------
62+
glfwTerminate();
63+
return 0;
64+
}
65+
66+
// process all input: query GLFW whether relevant keys are pressed/released this frame and react accordingly
67+
// ---------------------------------------------------------------------------------------------------------
68+
void processInput(GLFWwindow *window)
69+
{
70+
if(glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
71+
glfwSetWindowShouldClose(window, true);
72+
}
73+
74+
// glfw: whenever the window size changed (by OS or user resize) this callback function executes
75+
// ---------------------------------------------------------------------------------------------
76+
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
77+
{
78+
// make sure the viewport matches the new window dimensions; note that width and
79+
// height will be significantly larger than specified on retina displays.
80+
glViewport(0, 0, width, height);
81+
}

0 commit comments

Comments
 (0)