Modified Tutorial04: introduced recommended drawing approach with arbitrary number of [command buffer, semaphore, fence] resources and command buffer recorded each frame; removed creation of a custom image and a copy operation (from custom image to swapchain); framebuffer is now created only during command buffer recording; added dynamic viewport and scissors test states.

This commit is contained in:
plapins
2016-04-22 23:23:51 +02:00
parent e9929a92a7
commit ffca3688bc
4 changed files with 309 additions and 451 deletions

View File

@@ -28,27 +28,15 @@ int main( int argc, char **argv ) {
if( !tutorial04.CreateRenderPass() ) {
return -1;
}
if( !tutorial04.CreateImage() ) {
return -1;
}
if( !tutorial04.CreateFramebuffer() ) {
return -1;
}
if( !tutorial04.CreatePipeline() ) {
return -1;
}
if( !tutorial04.CreateCommandBuffers( ) ) {
if( !tutorial04.CreateRenderingResources() ) {
return -1;
}
if( !tutorial04.CreateVertexBuffer() ) {
return -1;
}
if( !tutorial04.CreateFence() ) {
return -1;
}
if( !tutorial04.RecordRenderingCommandBuffer() ) {
return -1;
}
// Rendering loop
if( !window.RenderingLoop( tutorial04 ) ) {