@@ -44,19 +44,17 @@ class DynamicTextureIndexingApp : public ApplicationBase
44
44
nbl::core::smart_refctd_ptr<nbl::video::IUtilities> utilities;
45
45
nbl::core::smart_refctd_ptr<nbl::video::ILogicalDevice> logicalDevice;
46
46
nbl::video::IPhysicalDevice* gpuPhysicalDevice;
47
- std::array<nbl::video::IGPUQueue*, CommonAPI::InitOutput<SC_IMG_COUNT>::EQT_COUNT > queues = { nullptr , nullptr , nullptr , nullptr };
47
+ std::array<nbl::video::IGPUQueue*, CommonAPI::InitOutput::MaxQueuesCount > queues = { nullptr , nullptr , nullptr , nullptr };
48
48
nbl::core::smart_refctd_ptr<nbl::video::ISwapchain> swapchain;
49
49
nbl::core::smart_refctd_ptr<nbl::video::IGPURenderpass> renderpass;
50
- std::array<nbl::core::smart_refctd_ptr<nbl::video::IGPUFramebuffer>, SC_IMG_COUNT > fbo;
51
- nbl::core::smart_refctd_ptr<nbl::video::IGPUCommandPool> commandPool ;
50
+ std::array<nbl::core::smart_refctd_ptr<nbl::video::IGPUFramebuffer>, CommonAPI::InitOutput::MaxSwapChainImageCount > fbo;
51
+ std::array< nbl::core::smart_refctd_ptr<nbl::video::IGPUCommandPool>, CommonAPI::InitOutput::MaxQueuesCount> commandPools ;
52
52
nbl::core::smart_refctd_ptr<nbl::system::ISystem> system;
53
53
nbl::core::smart_refctd_ptr<nbl::asset::IAssetManager> assetManager;
54
54
nbl::video::IGPUObjectFromAssetConverter::SParams cpu2gpuParams;
55
55
nbl::core::smart_refctd_ptr<nbl::system::ILogger> logger;
56
56
nbl::core::smart_refctd_ptr<CommonAPI::InputSystem> inputSystem;
57
-
58
- nbl::core::smart_refctd_ptr<video::IGPUFence> gpuTransferFence;
59
- nbl::core::smart_refctd_ptr<video::IGPUFence> gpuComputeFence;
57
+
60
58
nbl::video::IGPUObjectFromAssetConverter cpu2gpu;
61
59
62
60
asset::ICPUMesh* meshRaw = nullptr ;
@@ -70,8 +68,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
70
68
using GpuDescriptoSetPair = std::pair<core::smart_refctd_ptr<IGPUDescriptorSet>, core::smart_refctd_ptr<IGPUDescriptorSet>>;
71
69
core::vector<GpuDescriptoSetPair> desc;
72
70
73
- CommonAPI::InputSystem::ChannelReader<IMouseEventChannel> mouse;
74
- CommonAPI::InputSystem::ChannelReader<IKeyboardEventChannel> keyboard;
71
+ CommonAPI::InputSystem::ChannelReader<ui:: IMouseEventChannel> mouse;
72
+ CommonAPI::InputSystem::ChannelReader<ui:: IKeyboardEventChannel> keyboard;
75
73
Camera camera = Camera(vectorSIMDf(0 , 0 , 0 ), vectorSIMDf(0 , 0 , 0 ), matrix4SIMD());
76
74
77
75
core::smart_refctd_ptr<video::IDescriptorPool> descriptorPool;
@@ -126,22 +124,68 @@ class DynamicTextureIndexingApp : public ApplicationBase
126
124
{
127
125
window = std::move (wnd);
128
126
}
127
+ nbl::ui::IWindow* getWindow () override
128
+ {
129
+ return window.get ();
130
+ }
129
131
void setSystem (core::smart_refctd_ptr<nbl::system::ISystem>&& s) override
130
132
{
131
133
system = std::move (s);
132
134
}
133
- nbl::ui::IWindow* getWindow () override
135
+ video::IAPIConnection* getAPIConnection () override
134
136
{
135
- return window.get ();
137
+ return gl.get ();
138
+ }
139
+ video::ILogicalDevice* getLogicalDevice () override
140
+ {
141
+ return logicalDevice.get ();
142
+ }
143
+ video::IGPURenderpass* getRenderpass () override
144
+ {
145
+ return renderpass.get ();
146
+ }
147
+ void setSurface (core::smart_refctd_ptr<video::ISurface>&& s) override
148
+ {
149
+ surface = std::move (s);
150
+ }
151
+ void setFBOs (std::vector<core::smart_refctd_ptr<video::IGPUFramebuffer>>& f) override
152
+ {
153
+ for (int i = 0 ; i < f.size (); i++)
154
+ {
155
+ fbo[i] = core::smart_refctd_ptr (f[i]);
156
+ }
157
+ }
158
+ void setSwapchain (core::smart_refctd_ptr<video::ISwapchain>&& s) override
159
+ {
160
+ swapchain = std::move (s);
161
+ }
162
+ uint32_t getSwapchainImageCount () override
163
+ {
164
+ return SC_IMG_COUNT;
165
+ }
166
+ virtual nbl::asset::E_FORMAT getDepthFormat () override
167
+ {
168
+ return nbl::asset::EF_D32_SFLOAT;
136
169
}
137
170
138
171
APP_CONSTRUCTOR (DynamicTextureIndexingApp)
139
172
140
173
void onAppInitialized_impl () override
141
174
{
142
- CommonAPI::InitOutput<SC_IMG_COUNT> initOutput;
175
+ const auto swapchainImageUsage = static_cast <asset::IImage::E_USAGE_FLAGS>(asset::IImage::EUF_COLOR_ATTACHMENT_BIT | asset::IImage::EUF_STORAGE_BIT);
176
+ const video::ISurface::SFormat surfaceFormat (asset::EF_B8G8R8A8_UNORM, asset::ECP_COUNT, asset::EOTF_UNKNOWN);
177
+
178
+ CommonAPI::InitOutput initOutput;
143
179
initOutput.window = core::smart_refctd_ptr (window);
144
- CommonAPI::Init<WIN_W, WIN_H, SC_IMG_COUNT>(initOutput, video::EAT_OPENGL, " DynamicTextureIndexingApp" , nbl::asset::EF_D32_SFLOAT);
180
+ CommonAPI::InitWithDefaultExt (
181
+ initOutput,
182
+ video::EAT_OPENGL,
183
+ " DynamicTextureIndexing" ,
184
+ WIN_W, WIN_H, SC_IMG_COUNT,
185
+ swapchainImageUsage,
186
+ surfaceFormat,
187
+ nbl::asset::EF_D32_SFLOAT);
188
+
145
189
window = std::move (initOutput.window );
146
190
windowCb = std::move (initOutput.windowCb );
147
191
gl = std::move (initOutput.apiConnection );
@@ -153,7 +197,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
153
197
swapchain = std::move (initOutput.swapchain );
154
198
renderpass = std::move (initOutput.renderpass );
155
199
fbo = std::move (initOutput.fbo );
156
- commandPool = std::move (initOutput.commandPool );
200
+ commandPools = std::move (initOutput.commandPools );
157
201
system = std::move (initOutput.system );
158
202
assetManager = std::move (initOutput.assetManager );
159
203
cpu2gpuParams = std::move (initOutput.cpu2gpuParams );
@@ -162,15 +206,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
162
206
163
207
descriptorPool = createDescriptorPool (1u );
164
208
165
- gpuTransferFence = logicalDevice->createFence (static_cast <video::IGPUFence::E_CREATE_FLAGS>(0 ));
166
- gpuComputeFence = logicalDevice->createFence (static_cast <video::IGPUFence::E_CREATE_FLAGS>(0 ));
167
-
168
- nbl::video::IGPUObjectFromAssetConverter cpu2gpu;
169
- {
170
- cpu2gpuParams.perQueue [nbl::video::IGPUObjectFromAssetConverter::EQU_TRANSFER].fence = &gpuTransferFence;
171
- cpu2gpuParams.perQueue [nbl::video::IGPUObjectFromAssetConverter::EQU_COMPUTE].fence = &gpuComputeFence;
172
- }
173
-
174
209
{
175
210
auto * quantNormalCache = assetManager->getMeshManipulator ()->getQuantNormalCache ();
176
211
quantNormalCache->loadCacheFromFile <asset::EF_A2B10G10R10_SNORM_PACK32>(system.get (), " ../../tmp/normalCache101010.sse" );
@@ -199,7 +234,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
199
234
// divide mesh buffers into sets, where sum of textures used by meshes in one set is <= 16
200
235
struct MBRangeTexturesPair
201
236
{
202
- core::SRange<void , core::vector<ICPUMeshBuffer*>::iterator> mbRanges;
237
+ core::SRange<core::vector<ICPUMeshBuffer*>::iterator , core::vector<ICPUMeshBuffer*>::iterator> mbRanges;
203
238
core::unordered_map<ICPUImageView*, uint32_t > textures;
204
239
};
205
240
@@ -314,14 +349,14 @@ class DynamicTextureIndexingApp : public ApplicationBase
314
349
assert (pmbData.mdiParameterCount == meshBuffersInRangeCnt);
315
350
316
351
// create draw call inputs
317
- mdiCallParams[i].indexBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem (queues[CommonAPI::InitOutput<SC_IMG_COUNT> ::EQT_TRANSFER_UP], packedMeshBuffer[i].indexBuffer .buffer ->getSize (), packedMeshBuffer[i].indexBuffer .buffer ->getPointer ());
352
+ mdiCallParams[i].indexBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem (queues[CommonAPI::InitOutput::EQT_TRANSFER_UP], packedMeshBuffer[i].indexBuffer .buffer ->getSize (), packedMeshBuffer[i].indexBuffer .buffer ->getPointer ());
318
353
319
354
auto & cpuVtxBuff = packedMeshBuffer[i].vertexBufferBindings [0 ].buffer ;
320
355
321
- gpuIndirectDrawBuffer[i] = utilities->createFilledDeviceLocalGPUBufferOnDedMem (queues[CommonAPI::InitOutput<SC_IMG_COUNT> ::EQT_TRANSFER_UP], sizeof (CustomIndirectCommand) * pmbData.mdiParameterCount , packedMeshBuffer[i].MDIDataBuffer ->getPointer ());
356
+ gpuIndirectDrawBuffer[i] = utilities->createFilledDeviceLocalGPUBufferOnDedMem (queues[CommonAPI::InitOutput::EQT_TRANSFER_UP], sizeof (CustomIndirectCommand) * pmbData.mdiParameterCount , packedMeshBuffer[i].MDIDataBuffer ->getPointer ());
322
357
mdiCallParams[i].indirectDrawBuff = core::smart_refctd_ptr (gpuIndirectDrawBuffer[i]);
323
358
324
- auto gpuVtxBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem (queues[CommonAPI::InitOutput<SC_IMG_COUNT> ::EQT_TRANSFER_UP], cpuVtxBuff->getSize (), cpuVtxBuff->getPointer ());
359
+ auto gpuVtxBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem (queues[CommonAPI::InitOutput::EQT_TRANSFER_UP], cpuVtxBuff->getSize (), cpuVtxBuff->getPointer ());
325
360
326
361
for (uint32_t j = 0u ; j < video::IGPUMeshBuffer::MAX_ATTR_BUF_BINDING_COUNT; j++)
327
362
{
@@ -352,7 +387,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
352
387
sp.MaxFilter = ISampler::E_TEXTURE_FILTER::ETF_LINEAR;
353
388
auto sampler = logicalDevice->createGPUSampler (sp);
354
389
{
355
- asset::SPushConstantRange range[1 ] = { asset::ISpecializedShader ::ESS_VERTEX, 0u , sizeof (core::matrix4SIMD) };
390
+ asset::SPushConstantRange range[1 ] = { asset::IShader ::ESS_VERTEX, 0u , sizeof (core::matrix4SIMD) };
356
391
357
392
core::smart_refctd_ptr<IGPUSampler> samplerArray[16u ] = { nullptr };
358
393
for (uint32_t i = 0u ; i < 16u ; i++)
@@ -364,7 +399,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
364
399
b[0 ].binding = 1u ;
365
400
b[0 ].count = 16u ;
366
401
b[0 ].type = EDT_COMBINED_IMAGE_SAMPLER;
367
- b[0 ].stageFlags = ISpecializedShader ::ESS_FRAGMENT;
402
+ b[0 ].stageFlags = IShader ::ESS_FRAGMENT;
368
403
b[0 ].samplers = samplerArray;
369
404
370
405
ds0layout = logicalDevice->createGPUDescriptorSetLayout (b, b + 1 );
@@ -374,7 +409,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
374
409
b[0 ].binding = 0u ;
375
410
b[0 ].count = 1u ;
376
411
b[0 ].type = EDT_STORAGE_BUFFER;
377
- b[0 ].stageFlags = ISpecializedShader ::ESS_FRAGMENT;
412
+ b[0 ].stageFlags = IShader ::ESS_FRAGMENT;
378
413
379
414
ds1layout = logicalDevice->createGPUDescriptorSetLayout (b, b + 1 );
380
415
}
@@ -384,7 +419,9 @@ class DynamicTextureIndexingApp : public ApplicationBase
384
419
IGPUSpecializedShader* shaders[2 ] = { gpuShaders->operator [](0 ).get (), gpuShaders->operator [](1 ).get () };
385
420
386
421
gpuPipelineLayout = logicalDevice->createGPUPipelineLayout (range, range + 1 , core::smart_refctd_ptr (ds0layout), core::smart_refctd_ptr (ds1layout));
387
- gpuPipeline = logicalDevice->createGPURenderpassIndependentPipeline (nullptr , core::smart_refctd_ptr (gpuPipelineLayout), shaders, shaders + 2u , packedMeshBuffer[0 ].vertexInputParams , asset::SBlendParams (), asset::SPrimitiveAssemblyParams (), SRasterizationParams ());
422
+ asset::SRasterizationParams rp;
423
+
424
+ gpuPipeline = logicalDevice->createGPURenderpassIndependentPipeline (nullptr , core::smart_refctd_ptr (gpuPipelineLayout), shaders, shaders + 2u , packedMeshBuffer[0 ].vertexInputParams , asset::SBlendParams (), asset::SPrimitiveAssemblyParams (), rp);
388
425
389
426
nbl::video::IGPUGraphicsPipeline::SCreationParams graphicsPipelineParams;
390
427
graphicsPipelineParams.renderpassIndependent = core::smart_refctd_ptr<nbl::video::IGPURenderpassIndependentPipeline>(const_cast <video::IGPURenderpassIndependentPipeline*>(gpuPipeline.get ()));
@@ -449,15 +486,15 @@ class DynamicTextureIndexingApp : public ApplicationBase
449
486
}
450
487
451
488
core::vectorSIMDf cameraPosition (-4 , 0 , 0 );
452
- matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH (core::radians (60 .0f ), float (WIN_W) / WIN_H, 0.1 , 1000 );
453
- camera = Camera (cameraPosition, core::vectorSIMDf (0 , 0 , 0 ), projectionMatrix, 10 .f , 1 .f );
489
+ matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH (core::radians (60 .0f ), float (WIN_W) / WIN_H, 0.1 , 100000 );
490
+ camera = Camera (cameraPosition, core::vectorSIMDf (0 , 0 , 0 ), projectionMatrix, 1 .f , 1 .f );
454
491
455
492
uint64_t lastFPSTime = 0 ;
456
493
457
494
for (size_t i = 0ull ; i < NBL_FRAMES_TO_AVERAGE; ++i)
458
495
dtList[i] = 0.0 ;
459
496
460
- logicalDevice->createCommandBuffers (commandPool .get (), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);
497
+ logicalDevice->createCommandBuffers (commandPools[CommonAPI::InitOutput::EQT_GRAPHICS] .get (), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);
461
498
462
499
for (uint32_t i = 0u ; i < FRAMES_IN_FLIGHT; i++)
463
500
{
@@ -513,8 +550,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
513
550
inputSystem->getDefaultKeyboard (&keyboard);
514
551
515
552
camera.beginInputProcessing (nextPresentationTimeStamp);
516
- mouse.consumeEvents ([&](const IMouseEventChannel::range_t & events) -> void { camera.mouseProcess (events); }, logger.get ());
517
- keyboard.consumeEvents ([&](const IKeyboardEventChannel::range_t & events) -> void { camera.keyboardProcess (events); }, logger.get ());
553
+ mouse.consumeEvents ([&](const ui:: IMouseEventChannel::range_t & events) -> void { camera.mouseProcess (events); }, logger.get ());
554
+ keyboard.consumeEvents ([&](const ui:: IKeyboardEventChannel::range_t & events) -> void { camera.keyboardProcess (events); }, logger.get ());
518
555
camera.endInputProcessing (nextPresentationTimeStamp);
519
556
520
557
const auto & viewMatrix = camera.getViewMatrix ();
@@ -564,76 +601,29 @@ class DynamicTextureIndexingApp : public ApplicationBase
564
601
565
602
for (uint32_t i = 0u ; i < mdiCallParams.size (); i++)
566
603
{
567
- commandBuffer->bindDescriptorSets (asset::EPBP_GRAPHICS, gpuPipeline->getLayout (), 0u , 2u , &desc[i].first .get (), nullptr );
604
+ commandBuffer->bindDescriptorSets (asset::EPBP_GRAPHICS, gpuPipeline->getLayout (), 0u , 2u , &desc[i].first .get (), 0u );
568
605
commandBuffer->bindIndexBuffer (mdiCallParams[i].indexBuff .get (), 0ull , mdiCallParams[i].indexType );
569
606
commandBuffer->bindVertexBuffers (0u , 1u , mdiCallParams[i].vtxBindingsBuffers , &mdiCallParams[i].vtxBindingsOffsets [0 ]);
570
607
commandBuffer->bindVertexBuffers (2u , 1u , mdiCallParams[i].vtxBindingsBuffers , &mdiCallParams[i].vtxBindingsOffsets [2 ]);
571
608
commandBuffer->bindVertexBuffers (3u , 1u , mdiCallParams[i].vtxBindingsBuffers , &mdiCallParams[i].vtxBindingsOffsets [3 ]);
572
- commandBuffer->pushConstants (gpuPipeline->getLayout (), video::IGPUSpecializedShader ::ESS_VERTEX, 0u , sizeof (core::matrix4SIMD), camera.getConcatenatedMatrix ().pointer ());
609
+ commandBuffer->pushConstants (gpuPipeline->getLayout (), video::IGPUShader ::ESS_VERTEX, 0u , sizeof (core::matrix4SIMD), camera.getConcatenatedMatrix ().pointer ());
573
610
574
611
commandBuffer->drawIndexedIndirect (mdiCallParams[i].indirectDrawBuff .get (), mdiCallParams[i].offset , mdiCallParams[i].maxCount , mdiCallParams[i].stride );
575
612
}
576
613
577
- /* core::vector<uint8_t> uboData(gpuubo->getSize());
578
- for (const auto& shdrIn : pipelineMetadata->m_inputSemantics)
579
- {
580
- if (shdrIn.descriptorSection.type == asset::IRenderpassIndependentPipelineMetadata::ShaderInput::ET_UNIFORM_BUFFER && shdrIn.descriptorSection.uniformBufferObject.set == 1u && shdrIn.descriptorSection.uniformBufferObject.binding == ds1UboBinding)
581
- {
582
- switch (shdrIn.type)
583
- {
584
- case asset::IRenderpassIndependentPipelineMetadata::ECSI_WORLD_VIEW_PROJ:
585
- {
586
- memcpy(uboData.data() + shdrIn.descriptorSection.uniformBufferObject.relByteoffset, mvp.pointer(), shdrIn.descriptorSection.uniformBufferObject.bytesize);
587
- } break;
588
-
589
- case asset::IRenderpassIndependentPipelineMetadata::ECSI_WORLD_VIEW:
590
- {
591
- memcpy(uboData.data() + shdrIn.descriptorSection.uniformBufferObject.relByteoffset, viewMatrix.pointer(), shdrIn.descriptorSection.uniformBufferObject.bytesize);
592
- } break;
593
-
594
- case asset::IRenderpassIndependentPipelineMetadata::ECSI_WORLD_VIEW_INVERSE_TRANSPOSE:
595
- {
596
- memcpy(uboData.data() + shdrIn.descriptorSection.uniformBufferObject.relByteoffset, viewMatrix.pointer(), shdrIn.descriptorSection.uniformBufferObject.bytesize);
597
- } break;
598
- }
599
- }
600
- }
601
-
602
- commandBuffer->updateBuffer(gpuubo.get(), 0ull, gpuubo->getSize(), uboData.data());
603
-
604
- for (size_t i = 0; i < gpumesh->getMeshBuffers().size(); ++i)
605
- {
606
- auto gpuMeshBuffer = gpumesh->getMeshBuffers().begin()[i];
607
- auto gpuGraphicsPipeline = gpuPipelines[reinterpret_cast<RENDERPASS_INDEPENDENT_PIPELINE_ADRESS>(gpuMeshBuffer->getPipeline())];
608
-
609
- const video::IGPURenderpassIndependentPipeline* gpuRenderpassIndependentPipeline = gpuMeshBuffer->getPipeline();
610
- const video::IGPUDescriptorSet* ds3 = gpuMeshBuffer->getAttachedDescriptorSet();
611
-
612
- commandBuffer->bindGraphicsPipeline(gpuGraphicsPipeline.get());
613
-
614
- const video::IGPUDescriptorSet* gpuds1_ptr = gpuds1.get();
615
- commandBuffer->bindDescriptorSets(asset::EPBP_GRAPHICS, gpuRenderpassIndependentPipeline->getLayout(), 1u, 1u, &gpuds1_ptr, nullptr);
616
- const video::IGPUDescriptorSet* gpuds3_ptr = gpuMeshBuffer->getAttachedDescriptorSet();
617
- if (gpuds3_ptr)
618
- commandBuffer->bindDescriptorSets(asset::EPBP_GRAPHICS, gpuRenderpassIndependentPipeline->getLayout(), 3u, 1u, &gpuds3_ptr, nullptr);
619
- commandBuffer->pushConstants(gpuRenderpassIndependentPipeline->getLayout(), video::IGPUSpecializedShader::ESS_FRAGMENT, 0u, gpuMeshBuffer->MAX_PUSH_CONSTANT_BYTESIZE, gpuMeshBuffer->getPushConstantsDataPtr());
620
-
621
- commandBuffer->drawMeshBuffer(gpuMeshBuffer);
622
- }*/
623
-
624
614
commandBuffer->endRenderPass ();
625
615
commandBuffer->end ();
626
616
627
617
CommonAPI::Submit (logicalDevice.get (),
628
618
swapchain.get (),
629
619
commandBuffer.get (),
630
- queues[CommonAPI::InitOutput< 1 > ::EQT_GRAPHICS],
620
+ queues[CommonAPI::InitOutput::EQT_GRAPHICS],
631
621
imageAcquire[resourceIx].get (),
632
622
renderFinished[resourceIx].get (),
633
623
fence.get ());
634
624
CommonAPI::Present (logicalDevice.get (),
635
625
swapchain.get (),
636
- queues[CommonAPI::InitOutput< 1 > ::EQT_GRAPHICS], renderFinished[resourceIx].get (), acquiredNextFBO);
626
+ queues[CommonAPI::InitOutput::EQT_GRAPHICS], renderFinished[resourceIx].get (), acquiredNextFBO);
637
627
}
638
628
639
629
bool keepRunning () override
@@ -642,24 +632,4 @@ class DynamicTextureIndexingApp : public ApplicationBase
642
632
}
643
633
};
644
634
645
- NBL_COMMON_API_MAIN (DynamicTextureIndexingApp, DynamicTextureIndexingApp::Nabla)
646
-
647
- /*
648
- driver->bindGraphicsPipeline(gpuPipeline.get());
649
-
650
- driver->beginScene(true, true, video::SColor(255, 0, 0, 255));
651
-
652
- //! This animates (moves) the camera and sets the transforms
653
- camera->OnAnimate(std::chrono::duration_cast<std::chrono::milliseconds>(device->getTimer()->getTime()).count());
654
- camera->render();
655
-
656
- driver->pushConstants(gpuPipelineLayout.get(), asset::ISpecializedShader::ESS_VERTEX, 0u, sizeof(core::matrix4SIMD), camera->getConcatenatedMatrix().pointer());
657
-
658
- for (uint32_t i = 0u; i < mdiCallParams.size(); i++)
659
- {
660
- driver->bindDescriptorSets(video::EPBP_GRAPHICS, gpuPipeline->getLayout(), 0u, 2u, &desc[i].first.get(), nullptr);
661
- driver->drawIndexedIndirect(mdiCallParams[i].vtxBindings, mdiCallParams[i].mode, mdiCallParams[i].indexType, mdiCallParams[i].indexBuff.get(), mdiCallParams[i].indirectDrawBuff.get(), mdiCallParams[i].offset, mdiCallParams[i].maxCount, mdiCallParams[i].stride);
662
- }
663
-
664
- driver->endScene();
665
- */
635
+ NBL_COMMON_API_MAIN (DynamicTextureIndexingApp, DynamicTextureIndexingApp::Nabla)
0 commit comments