Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
3baef895
Commit
3baef895
authored
4 years ago
by
Sebastian Gaida
Browse files
Options
Downloads
Patches
Plain Diff
[
#8
] add CoreManager-Class and basic glfw-Functions
parent
b36bc286
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!9
Resolve "Window creation"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/Sources.cmake
+2
-0
2 additions, 0 deletions
config/Sources.cmake
src/vkcv/CoreManager.cpp
+27
-0
27 additions, 0 deletions
src/vkcv/CoreManager.cpp
src/vkcv/CoreManager.hpp
+19
-0
19 additions, 0 deletions
src/vkcv/CoreManager.hpp
with
48 additions
and
0 deletions
config/Sources.cmake
+
2
−
0
View file @
3baef895
...
...
@@ -2,4 +2,6 @@
set
(
vkcv_sources
${
vkcv_source
}
/vkcv/Context.hpp
${
vkcv_source
}
/vkcv/Context.cpp
${
vkcv_source
}
/vkcv/CoreManager.hpp
${
vkcv_source
}
/vkcv/CoreManager.cpp
)
This diff is collapsed.
Click to expand it.
src/vkcv/CoreManager.cpp
0 → 100644
+
27
−
0
View file @
3baef895
#define GLFW_INCLUDE_VULKAN
#include
"CoreManager.hpp"
namespace
vkcv
{
int
glfwCounter
=
0
;
void
initGLFW
()
{
if
(
glfwCounter
==
0
)
{
int
glfwSuccess
=
glfwInit
();
if
(
glfwSuccess
==
GLFW_FALSE
)
{
throw
std
::
runtime_error
(
"Could not initialize GLFW"
);
}
}
glfwCounter
++
;
}
void
terminateGLFW
()
{
if
(
glfwCounter
==
1
)
{
glfwTerminate
();
}
glfwCounter
--
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/vkcv/CoreManager.hpp
0 → 100644
+
19
−
0
View file @
3baef895
#ifndef VKCV_COREMANAGER_HPP
#define VKCV_COREMANAGER_HPP
#include
<GLFW/glfw3.h>
#include
<stdexcept>
namespace
vkcv
{
/**
* initialize GLFW if not initialized
*/
void
initGLFW
();
/**
* terminate GLFW
*/
void
terminateGLFW
();
}
#endif //VKCV_COREMANAGER_HPP
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment