@@ -70,7 +70,7 @@ class VulkanExample : public VulkanExampleBase
70
70
deviceCreatepNextChain = &enabledPhysicalDeviceHostImageCopyFeaturesEXT;
71
71
}
72
72
73
- ~VulkanExample ()
73
+ ~VulkanExample () override
74
74
{
75
75
if (device) {
76
76
destroyTextureImage (texture);
@@ -82,7 +82,7 @@ class VulkanExample : public VulkanExampleBase
82
82
}
83
83
84
84
// Enable physical device features required for this example
85
- virtual void getEnabledFeatures ()
85
+ void getEnabledFeatures () override
86
86
{
87
87
// Enable anisotropic filtering if supported
88
88
if (deviceFeatures.samplerAnisotropy ) {
@@ -134,7 +134,6 @@ class VulkanExample : public VulkanExampleBase
134
134
texture.height = ktxTexture->baseHeight ;
135
135
texture.mipLevels = ktxTexture->numLevels ;
136
136
ktx_uint8_t *ktxTextureData = ktxTexture_GetData (ktxTexture);
137
- ktx_size_t ktxTextureSize = ktxTexture_GetSize (ktxTexture);
138
137
139
138
const VkFormat imageFormat = VK_FORMAT_R8G8B8A8_UNORM;
140
139
@@ -271,7 +270,7 @@ class VulkanExample : public VulkanExampleBase
271
270
vkFreeMemory (device, texture.deviceMemory , nullptr );
272
271
}
273
272
274
- void buildCommandBuffers ()
273
+ void buildCommandBuffers () override
275
274
{
276
275
VkCommandBufferBeginInfo cmdBufInfo = vks::initializers::commandBufferBeginInfo ();
277
276
@@ -371,11 +370,11 @@ class VulkanExample : public VulkanExampleBase
371
370
VkPipelineMultisampleStateCreateInfo multisampleState = vks::initializers::pipelineMultisampleStateCreateInfo (VK_SAMPLE_COUNT_1_BIT, 0 );
372
371
std::vector<VkDynamicState> dynamicStateEnables = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
373
372
VkPipelineDynamicStateCreateInfo dynamicState = vks::initializers::pipelineDynamicStateCreateInfo (dynamicStateEnables);
374
- std::array<VkPipelineShaderStageCreateInfo, 2 > shaderStages;
375
-
376
- // Shaders
377
- shaderStages[ 0 ] = loadShader (getShadersPath () + " texture/texture.vert .spv" , VK_SHADER_STAGE_VERTEX_BIT);
378
- shaderStages[ 1 ] = loadShader ( getShadersPath () + " texture/texture.frag.spv " , VK_SHADER_STAGE_FRAGMENT_BIT) ;
373
+ // Shaders
374
+ std::array<VkPipelineShaderStageCreateInfo, 2 > shaderStages = {
375
+ loadShader ( getShadersPath () + " texture/texture.vert.spv " , VK_SHADER_STAGE_VERTEX_BIT),
376
+ loadShader (getShadersPath () + " texture/texture.frag .spv" , VK_SHADER_STAGE_FRAGMENT_BIT)
377
+ } ;
379
378
380
379
VkGraphicsPipelineCreateInfo pipelineCreateInfo = vks::initializers::pipelineCreateInfo (pipelineLayout, renderPass, 0 );
381
380
pipelineCreateInfo.pInputAssemblyState = &inputAssemblyState;
@@ -413,7 +412,7 @@ class VulkanExample : public VulkanExampleBase
413
412
plane.loadFromFile (getAssetPath () + " models/plane_z.gltf" , vulkanDevice, queue, glTFLoadingFlags);
414
413
}
415
414
416
- void prepare ()
415
+ void prepare () override
417
416
{
418
417
VulkanExampleBase::prepare ();
419
418
@@ -440,15 +439,15 @@ class VulkanExample : public VulkanExampleBase
440
439
VulkanExampleBase::submitFrame ();
441
440
}
442
441
443
- virtual void render ()
442
+ void render () override
444
443
{
445
444
if (!prepared)
446
445
return ;
447
446
updateUniformBuffers ();
448
447
draw ();
449
448
}
450
449
451
- virtual void OnUpdateUIOverlay (vks::UIOverlay *overlay)
450
+ void OnUpdateUIOverlay (vks::UIOverlay *overlay) override
452
451
{
453
452
if (overlay->header (" Settings" )) {
454
453
if (overlay->sliderFloat (" LOD bias" , &uniformData.lodBias , 0 .0f , (float )texture.mipLevels )) {
0 commit comments