├── .gitattributes
├── .gitignore
├── .vscode
└── settings.json
├── Directory.Build.props
├── GraphicsHostApp.Desktop
├── GraphicsHostApp.Desktop.csproj
├── Program.cs
├── Properties
│ └── launchSettings.json
└── app.manifest
├── GraphicsHostApp.OpenGL
├── CMakeLists.txt
├── Graphics
│ ├── Camera.cpp
│ ├── Camera.h
│ ├── GLObject.h
│ ├── Mesh.cpp
│ ├── Mesh.h
│ ├── MeshFactory.cpp
│ ├── MeshFactory.h
│ ├── RenderPipeline.cpp
│ ├── RenderPipeline.h
│ ├── Renderer.cpp
│ ├── Renderer.h
│ ├── Shader.cpp
│ ├── Shader.h
│ └── Vertex.h
├── GraphicsHostApp.OpenGL.cpp
├── GraphicsHostApp.OpenGL.h
└── glad
│ ├── include
│ ├── KHR
│ │ └── khrplatform.h
│ └── glad
│ │ └── glad.h
│ └── src
│ └── glad.c
├── GraphicsHostApp.sln
├── GraphicsHostApp
├── App.axaml
├── App.axaml.cs
├── Assets
│ └── avalonia-logo.ico
├── Contracts
│ └── Services
│ │ └── IDrawingService.cs
├── Graphics
│ ├── Camera.cs
│ ├── Disposable.cs
│ ├── IGraphicsHost.cs
│ ├── OpenGL
│ │ ├── Buffer.cs
│ │ ├── Frame.cs
│ │ ├── GraphicsResource.cs
│ │ ├── Mesh.cs
│ │ ├── RenderPipeline.cs
│ │ ├── Renderer.cs
│ │ ├── Shader.cs
│ │ └── Texture.cs
│ └── Vertex.cs
├── GraphicsHostApp.csproj
├── Helpers
│ ├── MathExtensions.cs
│ ├── MathHelper.cs
│ └── MeshFactory.cs
├── Resources
│ ├── Dependencies
│ │ ├── GraphicsHostApp.OpenGL.dll
│ │ └── libGraphicsHostApp.OpenGL.so
│ ├── Models
│ │ └── Sphere.glb
│ └── Shaders
│ │ ├── Canvas.frag
│ │ ├── Canvas.vert
│ │ ├── Simple.frag
│ │ ├── Simple.vert
│ │ ├── SolidColor.frag
│ │ └── SolidColor.vert
├── Services
│ ├── ExternalDrawingService.cs
│ └── SimpleDrawingService.cs
├── ViewModels
│ ├── MainViewModel.cs
│ └── ViewModelBase.cs
└── Views
│ ├── MainView.axaml
│ ├── MainView.axaml.cs
│ ├── MainWindow.axaml
│ └── MainWindow.axaml.cs
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 | build/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # Tye
67 | .tye/
68 |
69 | # ASP.NET Scaffolding
70 | ScaffoldingReadMe.txt
71 |
72 | # StyleCop
73 | StyleCopReport.xml
74 |
75 | # Files built by Visual Studio
76 | *_i.c
77 | *_p.c
78 | *_h.h
79 | *.ilk
80 | *.meta
81 | *.obj
82 | *.iobj
83 | *.pch
84 | *.pdb
85 | *.ipdb
86 | *.pgc
87 | *.pgd
88 | *.rsp
89 | *.sbr
90 | *.tlb
91 | *.tli
92 | *.tlh
93 | *.tmp
94 | *.tmp_proj
95 | *_wpftmp.csproj
96 | *.log
97 | *.vspscc
98 | *.vssscc
99 | .builds
100 | *.pidb
101 | *.svclog
102 | *.scc
103 |
104 | # Chutzpah Test files
105 | _Chutzpah*
106 |
107 | # Visual C++ cache files
108 | ipch/
109 | *.aps
110 | *.ncb
111 | *.opendb
112 | *.opensdf
113 | *.sdf
114 | *.cachefile
115 | *.VC.db
116 | *.VC.VC.opendb
117 |
118 | # Visual Studio profiler
119 | *.psess
120 | *.vsp
121 | *.vspx
122 | *.sap
123 |
124 | # Visual Studio Trace Files
125 | *.e2e
126 |
127 | # TFS 2012 Local Workspace
128 | $tf/
129 |
130 | # Guidance Automation Toolkit
131 | *.gpState
132 |
133 | # ReSharper is a .NET coding add-in
134 | _ReSharper*/
135 | *.[Rr]e[Ss]harper
136 | *.DotSettings.user
137 |
138 | # TeamCity is a build add-in
139 | _TeamCity*
140 |
141 | # DotCover is a Code Coverage Tool
142 | *.dotCover
143 |
144 | # AxoCover is a Code Coverage Tool
145 | .axoCover/*
146 | !.axoCover/settings.json
147 |
148 | # Coverlet is a free, cross platform Code Coverage Tool
149 | coverage*.json
150 | coverage*.xml
151 | coverage*.info
152 |
153 | # Visual Studio code coverage results
154 | *.coverage
155 | *.coveragexml
156 |
157 | # NCrunch
158 | _NCrunch_*
159 | .*crunch*.local.xml
160 | nCrunchTemp_*
161 |
162 | # MightyMoose
163 | *.mm.*
164 | AutoTest.Net/
165 |
166 | # Web workbench (sass)
167 | .sass-cache/
168 |
169 | # Installshield output folder
170 | [Ee]xpress/
171 |
172 | # DocProject is a documentation generator add-in
173 | DocProject/buildhelp/
174 | DocProject/Help/*.HxT
175 | DocProject/Help/*.HxC
176 | DocProject/Help/*.hhc
177 | DocProject/Help/*.hhk
178 | DocProject/Help/*.hhp
179 | DocProject/Help/Html2
180 | DocProject/Help/html
181 |
182 | # Click-Once directory
183 | publish/
184 |
185 | # Publish Web Output
186 | *.[Pp]ublish.xml
187 | *.azurePubxml
188 | # Note: Comment the next line if you want to checkin your web deploy settings,
189 | # but database connection strings (with potential passwords) will be unencrypted
190 | *.pubxml
191 | *.publishproj
192 |
193 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
194 | # checkin your Azure Web App publish settings, but sensitive information contained
195 | # in these scripts will be unencrypted
196 | PublishScripts/
197 |
198 | # NuGet Packages
199 | *.nupkg
200 | # NuGet Symbol Packages
201 | *.snupkg
202 | # The packages folder can be ignored because of Package Restore
203 | **/[Pp]ackages/*
204 | # except build/, which is used as an MSBuild target.
205 | !**/[Pp]ackages/build/
206 | # Uncomment if necessary however generally it will be regenerated when needed
207 | #!**/[Pp]ackages/repositories.config
208 | # NuGet v3's project.json files produces more ignorable files
209 | *.nuget.props
210 | *.nuget.targets
211 |
212 | # Microsoft Azure Build Output
213 | csx/
214 | *.build.csdef
215 |
216 | # Microsoft Azure Emulator
217 | ecf/
218 | rcf/
219 |
220 | # Windows Store app package directories and files
221 | AppPackages/
222 | BundleArtifacts/
223 | Package.StoreAssociation.xml
224 | _pkginfo.txt
225 | *.appx
226 | *.appxbundle
227 | *.appxupload
228 |
229 | # Visual Studio cache files
230 | # files ending in .cache can be ignored
231 | *.[Cc]ache
232 | # but keep track of directories ending in .cache
233 | !?*.[Cc]ache/
234 |
235 | # Others
236 | ClientBin/
237 | ~$*
238 | *~
239 | *.dbmdl
240 | *.dbproj.schemaview
241 | *.jfm
242 | *.pfx
243 | *.publishsettings
244 | orleans.codegen.cs
245 |
246 | # Including strong name files can present a security risk
247 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
248 | #*.snk
249 |
250 | # Since there are multiple workflows, uncomment next line to ignore bower_components
251 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
252 | #bower_components/
253 |
254 | # RIA/Silverlight projects
255 | Generated_Code/
256 |
257 | # Backup & report files from converting an old project file
258 | # to a newer Visual Studio version. Backup files are not needed,
259 | # because we have git ;-)
260 | _UpgradeReport_Files/
261 | Backup*/
262 | UpgradeLog*.XML
263 | UpgradeLog*.htm
264 | ServiceFabricBackup/
265 | *.rptproj.bak
266 |
267 | # SQL Server files
268 | *.mdf
269 | *.ldf
270 | *.ndf
271 |
272 | # Business Intelligence projects
273 | *.rdl.data
274 | *.bim.layout
275 | *.bim_*.settings
276 | *.rptproj.rsuser
277 | *- [Bb]ackup.rdl
278 | *- [Bb]ackup ([0-9]).rdl
279 | *- [Bb]ackup ([0-9][0-9]).rdl
280 |
281 | # Microsoft Fakes
282 | FakesAssemblies/
283 |
284 | # GhostDoc plugin setting file
285 | *.GhostDoc.xml
286 |
287 | # Node.js Tools for Visual Studio
288 | .ntvs_analysis.dat
289 | node_modules/
290 |
291 | # Visual Studio 6 build log
292 | *.plg
293 |
294 | # Visual Studio 6 workspace options file
295 | *.opt
296 |
297 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
298 | *.vbw
299 |
300 | # Visual Studio LightSwitch build output
301 | **/*.HTMLClient/GeneratedArtifacts
302 | **/*.DesktopClient/GeneratedArtifacts
303 | **/*.DesktopClient/ModelManifest.xml
304 | **/*.Server/GeneratedArtifacts
305 | **/*.Server/ModelManifest.xml
306 | _Pvt_Extensions
307 |
308 | # Paket dependency manager
309 | .paket/paket.exe
310 | paket-files/
311 |
312 | # FAKE - F# Make
313 | .fake/
314 |
315 | # CodeRush personal settings
316 | .cr/personal
317 |
318 | # Python Tools for Visual Studio (PTVS)
319 | __pycache__/
320 | *.pyc
321 |
322 | # Cake - Uncomment if you are using it
323 | # tools/**
324 | # !tools/packages.config
325 |
326 | # Tabs Studio
327 | *.tss
328 |
329 | # Telerik's JustMock configuration file
330 | *.jmconfig
331 |
332 | # BizTalk build output
333 | *.btp.cs
334 | *.btm.cs
335 | *.odx.cs
336 | *.xsd.cs
337 |
338 | # OpenCover UI analysis results
339 | OpenCover/
340 |
341 | # Azure Stream Analytics local run output
342 | ASALocalRun/
343 |
344 | # MSBuild Binary and Structured Log
345 | *.binlog
346 |
347 | # NVidia Nsight GPU debugger configuration file
348 | *.nvuser
349 |
350 | # MFractors (Xamarin productivity tool) working folder
351 | .mfractor/
352 |
353 | # Local History for Visual Studio
354 | .localhistory/
355 |
356 | # BeatPulse healthcheck temp database
357 | healthchecksdb
358 |
359 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
360 | MigrationBackup/
361 |
362 | # Ionide (cross platform F# VS Code tools) working folder
363 | .ionide/
364 |
365 | # Fody - auto-generated XML schema
366 | FodyWeavers.xsd
367 |
368 | ##
369 | ## Visual studio for Mac
370 | ##
371 |
372 |
373 | # globs
374 | Makefile.in
375 | *.userprefs
376 | *.usertasks
377 | config.make
378 | config.status
379 | aclocal.m4
380 | install-sh
381 | autom4te.cache/
382 | *.tar.gz
383 | tarballs/
384 | test-results/
385 |
386 | # Mac bundle stuff
387 | *.dmg
388 | *.app
389 |
390 | # content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
391 | # General
392 | .DS_Store
393 | .AppleDouble
394 | .LSOverride
395 |
396 | # Icon must end with two \r
397 | Icon
398 |
399 |
400 | # Thumbnails
401 | ._*
402 |
403 | # Files that might appear in the root of a volume
404 | .DocumentRevisions-V100
405 | .fseventsd
406 | .Spotlight-V100
407 | .TemporaryItems
408 | .Trashes
409 | .VolumeIcon.icns
410 | .com.apple.timemachine.donotpresent
411 |
412 | # Directories potentially created on remote AFP share
413 | .AppleDB
414 | .AppleDesktop
415 | Network Trash Folder
416 | Temporary Items
417 | .apdisk
418 |
419 | # content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
420 | # Windows thumbnail cache files
421 | Thumbs.db
422 | ehthumbs.db
423 | ehthumbs_vista.db
424 |
425 | # Dump file
426 | *.stackdump
427 |
428 | # Folder config file
429 | [Dd]esktop.ini
430 |
431 | # Recycle Bin used on file shares
432 | $RECYCLE.BIN/
433 |
434 | # Windows Installer files
435 | *.cab
436 | *.msi
437 | *.msix
438 | *.msm
439 | *.msp
440 |
441 | # Windows shortcuts
442 | *.lnk
443 |
444 | # JetBrains Rider
445 | .idea/
446 | *.sln.iml
447 |
448 | ##
449 | ## Visual Studio Code
450 | ##
451 | .vscode/*
452 | !.vscode/settings.json
453 | !.vscode/tasks.json
454 | !.vscode/launch.json
455 | !.vscode/extensions.json
456 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "cmake.sourceDirectory": "/home/qian-o/Code/GraphicsHostApp/GraphicsHostApp.OpenGL"
3 | }
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | enable
4 | 11.0.2
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GraphicsHostApp.Desktop/GraphicsHostApp.Desktop.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | WinExe
4 |
6 | net8.0
7 | enable
8 | true
9 | app.manifest
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/GraphicsHostApp.Desktop/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Avalonia;
4 |
5 | namespace GraphicsHostApp.Desktop;
6 |
7 | class Program
8 | {
9 | // Initialization code. Don't use any Avalonia, third-party APIs or any
10 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
11 | // yet and stuff might break.
12 | [STAThread]
13 | public static void Main(string[] args) => BuildAvaloniaApp()
14 | .StartWithClassicDesktopLifetime(args);
15 |
16 | // Avalonia configuration, don't remove; also used by visual designer.
17 | public static AppBuilder BuildAvaloniaApp()
18 | => AppBuilder.Configure()
19 | .UsePlatformDetect()
20 | .WithInterFont()
21 | .LogToTrace();
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/GraphicsHostApp.Desktop/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "GraphicsHostApp.Desktop": {
4 | "commandName": "Project",
5 | "nativeDebugging": true
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/GraphicsHostApp.Desktop/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/GraphicsHostApp.OpenGL/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # 添加编译选项
2 | add_compile_options(-fPIC)
3 |
4 | # 包含OpenGL图形库的头文件和源文件
5 | file(GLOB GRAPHICS_HEADERS "Graphics/*.h")
6 | file(GLOB GRAPHICS_SOURCES "Graphics/*.cpp")
7 |
8 | # 将头文件和源文件分组
9 | source_group("Graphics/Header Files" FILES ${GRAPHICS_HEADERS})
10 | source_group("Graphics/Source Files" FILES ${GRAPHICS_SOURCES})
11 |
12 | # 设置接口源文件和头文件
13 | set(INTERFACE_SOURCES "GraphicsHostApp.OpenGL.cpp")
14 | set(INTERFACE_HEADERS "GraphicsHostApp.OpenGL.h")
15 |
16 | # 创建名为GraphicsHostApp.OpenGL的动态链接库项目
17 | add_library(GraphicsHostApp.OpenGL SHARED ${GRAPHICS_SOURCES} ${GRAPHICS_HEADERS} ${INTERFACE_SOURCES} ${INTERFACE_HEADERS})
18 |
19 | # 添加glad库的源文件
20 | add_library(glad glad/src/glad.c)
21 |
22 | # 将glad库的包含目录添加到项目中
23 | target_include_directories(glad PUBLIC glad/include)
24 |
25 | # 将glad库链接到GraphicsHostApp.OpenGL项目中
26 | target_link_libraries(GraphicsHostApp.OpenGL glad)
27 |
28 | # 检查CMake版本并设置C++标准为C++20
29 | if (CMAKE_VERSION VERSION_GREATER 3.12)
30 | set_property(TARGET GraphicsHostApp.OpenGL PROPERTY CXX_STANDARD 20)
31 | endif()
--------------------------------------------------------------------------------
/GraphicsHostApp.OpenGL/Graphics/Camera.cpp:
--------------------------------------------------------------------------------
1 | #include "Camera.h"
2 |
3 | namespace GraphicsHostApp
4 | {
5 | void Camera::SetWidth(int width)
6 | {
7 | this->width = width;
8 | }
9 |
10 | void Camera::SetHeight(int height)
11 | {
12 | this->height = height;
13 | }
14 |
15 | void Camera::SetPosition(glm::vec3 position)
16 | {
17 | this->position = position;
18 | }
19 |
20 | void Camera::SetPitch(float pitch)
21 | {
22 | this->pitch = glm::radians(pitch);
23 | UpdateVectors();
24 | }
25 |
26 | void Camera::SetYaw(float yaw)
27 | {
28 | this->yaw = glm::radians(yaw);
29 | UpdateVectors();
30 | }
31 |
32 | void Camera::SetFov(float fov)
33 | {
34 | this->fov = glm::radians(fov);
35 | }
36 |
37 | void Camera::UpdateVectors()
38 | {
39 | front.x = cos(yaw) * cos(pitch);
40 | front.y = sin(pitch);
41 | front.z = sin(yaw) * cos(pitch);
42 |
43 | front = glm::normalize(front);
44 |
45 | right = glm::normalize(glm::cross(front, up));
46 | up = glm::normalize(glm::cross(right, front));
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/GraphicsHostApp.OpenGL/Graphics/Camera.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | namespace GraphicsHostApp
8 | {
9 | class Camera
10 | {
11 | public:
12 | int Width() const { return width; }
13 | int Height() const { return height; }
14 | glm::vec3 Position() const { return position; }
15 | glm::vec3 Front() const { return front; }
16 | glm::vec3 Up() const { return up; }
17 | glm::vec3 Right() const { return right; }
18 | float Pitch() const { return glm::degrees(pitch); }
19 | float Yaw() const { return glm::degrees(yaw); }
20 | float Fov() const { return glm::degrees(fov); }
21 | glm::mat4 View() const { return glm::lookAt(position, position + front, up); }
22 | glm::mat4 Projection() const { return glm::perspective(fov, (float)width / (float)height, 0.1f, 1000.0f); }
23 |
24 | void SetWidth(int width);
25 | void SetHeight(int height);
26 | void SetPosition(glm::vec3 position);
27 | void SetPitch(float pitch);
28 | void SetYaw(float yaw);
29 | void SetFov(float fov);
30 |
31 | private:
32 | int width = 800;
33 | int height = 600;
34 | glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f);
35 | glm::vec3 front = -glm::vec3(0.0f, 0.0f, 1.0f);
36 | glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f);
37 | glm::vec3 right = glm::vec3(1.0f, 0.0f, 0.0f);
38 | float pitch = 0.0f;
39 | float yaw = -glm::radians(90.0f);
40 | float fov = glm::radians(90.0f);
41 |
42 | void UpdateVectors();
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/GraphicsHostApp.OpenGL/Graphics/GLObject.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include