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
95e88bb6
Commit
95e88bb6
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[18]remove test renderpass creation and remove depth buffer from triangle renderpass
parent
b4ea70f5
No related branches found
No related tags found
4 merge requests
!12
Resolve "Swapchain Class"
,
!7
Resolve "Shader Program Class"
,
!5
Resolve "Pipeline State Object"
,
!4
Resolve "Renderpass Class"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/first_triangle/src/main.cpp
+14
-28
14 additions, 28 deletions
projects/first_triangle/src/main.cpp
with
14 additions
and
28 deletions
projects/first_triangle/src/main.cpp
+
14
−
28
View file @
95e88bb6
...
@@ -40,36 +40,22 @@ int main(int argc, const char** argv) {
...
@@ -40,36 +40,22 @@ int main(int argc, const char** argv) {
}
}
// an example attachment for passes that output to the window
// an example attachment for passes that output to the window
vkcv
::
AttachmentDescription
present_color_attachment
(
vkcv
::
AttachmentLayout
::
UNDEFINED
,
const
vkcv
::
AttachmentDescription
present_color_attachment
(
vkcv
::
AttachmentLayout
::
COLOR_ATTACHMENT
,
vkcv
::
AttachmentLayout
::
UNDEFINED
,
vkcv
::
AttachmentLayout
::
PRESENTATION
,
vkcv
::
AttachmentLayout
::
COLOR_ATTACHMENT
,
vkcv
::
AttachmentOperation
::
STORE
,
vkcv
::
AttachmentLayout
::
PRESENTATION
,
vkcv
::
AttachmentOperation
::
CLEAR
);
vkcv
::
AttachmentOperation
::
STORE
,
// an example attachment for passes that output to a depth buffer
vkcv
::
AttachmentOperation
::
CLEAR
);
vkcv
::
AttachmentDescription
present_depth_attachment
(
vkcv
::
AttachmentLayout
::
UNDEFINED
,
vkcv
::
AttachmentLayout
::
DEPTH_STENCIL_ATTACHMENT
,
vkcv
::
AttachmentLayout
::
DEPTH_STENCIL_READ_ONLY
,
vkcv
::
AttachmentOperation
::
STORE
,
vkcv
::
AttachmentOperation
::
CLEAR
);
// this pass will output to the window, and produce a depth buffer
vkcv
::
Renderpass
trianglePassDefinition
;
vkcv
::
Renderpass
test_pass
{};
trianglePassDefinition
.
attachments
.
push_back
(
present_color_attachment
);
test_pass
.
attachments
.
push_back
(
present_color_attachment
);
vkcv
::
RenderpassHandle
trianglePass
;
test_pass
.
attachments
.
push_back
(
present_depth_attachment
);
std
::
vector
<
vkcv
::
RenderpassHandle
>
test_handles
{};
if
(
!
core
.
createRenderpass
(
trianglePassDefinition
,
trianglePass
))
// render pass creation test
{
for
(
uint32_t
i
=
0
;
i
<
1000
;
i
++
)
std
::
cout
<<
"Error. Could not create renderpass. Exiting."
<<
std
::
endl
;
{
return
EXIT_FAILURE
;
vkcv
::
RenderpassHandle
tmp_handle
{};
}
if
(
!
core
.
createRenderpass
(
test_pass
,
tmp_handle
))
{
std
::
cout
<<
"Oops. Something went wrong in the renderpass creation. Exiting."
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
test_handles
.
push_back
(
tmp_handle
);
}
std
::
cout
<<
"Wow. You just made 1000 render passes. (That are all identical, though...)"
<<
std
::
endl
;
/*
/*
* BufferHandle triangleVertices = core.createBuffer(vertices);
* BufferHandle triangleVertices = core.createBuffer(vertices);
...
...
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