Public Types | |
| enum class | PresentModePreference { LowLatency , Vsync } |
Public Member Functions | |
| void | applyDifficulty () |
| void | applyGravity () |
| void | applyShaderEffectsToggle () |
| VK_Sprite * | attachPostProcessingShader (const std::string &fragmentShaderPath, float p1=0.0f, float p2=0.0f, float p3=0.0f, float p4=0.0f) |
| Attach a full-screen post-processing fragment shader. | |
| std::vector< VK_Sprite * > | attachPostProcessingShaders (const std::vector< PostProcessingEffect > &effects) |
| bool | canMoveDown () |
| bool | canMoveLeft () |
| bool | canMoveRight () |
| bool | canRotate () |
| int | centerX (const char *text) |
| bool | checkGameOver () |
| void | clearFlashedBlocks () |
| void | clearTextQueue () |
| Clear all queued text draw calls for the current frame. | |
| VulkanContext | context () const |
| VK_Sprite * | createSprite (const std::string &pngPath, const std::string &vertexShaderPath="", const std::string &fragmentShaderPath="") |
| Create a sprite from a PNG file and register it with this window. | |
| VK_Sprite * | createSprite (int width, int height, const std::string &vertexShaderPath="", const std::string &fragmentShaderPath="") |
| Create a blank sprite texture and register it with this window. | |
| VK_Sprite * | createSprite (SDL_Surface *surface, const std::string &vertexShaderPath="", const std::string &fragmentShaderPath="") |
| Create a sprite from an SDL surface and register it with this window. | |
| VK_Sprite3D * | createSprite3D (const std::string &pngPath, const std::string &vertexShaderPath="", const std::string &fragmentShaderPath="") |
| Create a world-space billboard sprite from a PNG file. | |
| VK_Sprite3D * | createSprite3D (SDL_Surface *surface, const std::string &vertexShaderPath="", const std::string &fragmentShaderPath="") |
| Create a world-space billboard sprite from an SDL surface. | |
| void | detachPostProcessingShader () |
| Detach the current post-processing shader and return to direct swapchain rendering. | |
| void | drawblock (float scaleX, float scaleY) |
| void | drawGame () |
| void | drawmatrix (float scaleX, float scaleY) |
| void | drawnext (float scaleX, float scaleY) |
| void | dropBlock () |
| void | enablePostProcessing (VK_Sprite *sprite) |
| bool | ensureRenderResources () |
| Ensure deferred render resources are initialized. | |
| void | event (SDL_Event &e) override |
| Handle one SDL event. | |
| bool | findMatches () |
| void | gameKeypress (SDL_Keycode key) |
| int | getCharWidth () |
| VkCommandPool | getCommandPool () const noexcept |
| Get the command pool used for graphics/upload work. | |
| VkFormat | getDepthFormat () const noexcept |
| Get the depth format used for dynamic rendering attachments. | |
| VkDevice | getDevice () const noexcept |
| Get the Vulkan logical device handle. | |
| VkQueue | getGraphicsQueue () const noexcept |
| Get the graphics queue handle. | |
| int | getMenuSpacing () |
| VkPhysicalDevice | getPhysicalDevice () const noexcept |
| Get the Vulkan physical device handle. | |
| VkPipelineCache | getPipelineCache () const noexcept |
| Get the persistent Vulkan pipeline cache used by framework pipelines. | |
| SDL_Window * | getSDLWindow () const noexcept |
| Get the underlying SDL window handle. | |
| VkExtent2D | getSwapchainExtent () const noexcept |
| Get the current swapchain extent. | |
| VkFormat | getSwapchainFormat () const noexcept |
| Get the swapchain color format. | |
| size_t | getSwapchainImageCount () const noexcept |
| Get the number of swapchain images currently allocated. | |
| bool | getTextDimensions (const std::string &text, int &width, int &height) |
| Measure text dimensions in pixels. | |
| bool | getTextDimensions (const std::string &text, int &width, int &height, const Font &font) |
| bool | getTextDimensions (const std::string &text, int &width, int &height, TTF_Font *font) |
| void | goToScoresScreen () |
| void | handleControllerButton (Uint8 button) |
| void | handleTextInput (const char *text) |
| void | initGfx () |
| virtual bool | initVulkan (bool validiation) |
| Initialize Vulkan state. | |
| void | logic () |
| void | loop () |
| Run the main event/render loop. | |
| MasterPieceWindow (const std::string &path, int wx, int wy, bool full, bool enable_vsync) | |
| void | moveBlockDown () |
| void | moveBlockLeft () |
| void | moveBlockRight () |
| virtual void | onPrepareFrameRendering (VkCommandBuffer cmd, uint32_t image_index) |
| Record resource transitions that must happen before dynamic rendering begins. | |
| bool | openGamepad (SDL_JoystickID id) |
| void | placeBlock () |
| void | pollController () |
| void | printText (const std::string &text, int x, int y, const SDL_Color &col) |
| Queue a text string for rendering during the current frame. | |
| void | printText (const std::string &text, int x, int y, const SDL_Color &col, const Font &font) |
| void | printText (const std::string &text, int x, int y, const SDL_Color &col, TTF_Font *font) |
| void | proc () override |
| Execute one processing/update step. | |
| void | release () |
| Release Vulkan and SDL resources. | |
| virtual void | render () |
| Render one frame. | |
| void | rotateBlock () |
| void | saveSnapshot (const std::string &path) |
| Save the most recently rendered window contents as a PNG file. | |
| int | scaleY (int baseY) |
| bool | screenshotEnabled () const noexcept |
| Check whether F10 screenshot capture is enabled. | |
| void | setClearColor (float r, float g, float b, float a=1.0f) |
| Set the per-frame color attachment clear color. | |
| void | setEnableScreenshot (bool enabled) noexcept |
| Enable or disable F10 screenshot capture. | |
| void | setFont (const std::string &fontPath, int fontSize=24) |
| Set the active text-render font. | |
| void | setPostProcessingEnabled (bool enabled) |
| void | setPostProcessingShaderParams (float p1=0.0f, float p2=0.0f, float p3=0.0f, float p4=0.0f) |
| Set the post-processing shader params passed as a vec4 push constant. | |
| void | setPostProcessingShaderParams (size_t effectIndex, float p1=0.0f, float p2=0.0f, float p3=0.0f, float p4=0.0f) |
| void | setPostProcessingShaderTimeEnabled (bool enabled) |
| Keep shader param 1 updated with elapsed render time in seconds. | |
| void | setPostProcessingShaderTimeEnabled (size_t effectIndex, bool enabled) |
| void | showCursor (bool on) |
| void | spawnNewBlock () |
| void | startFlash () |
| void | trimMemory () |
| Return transient Vulkan command-pool allocations to the driver when supported. | |
| void | tryOpenFirstGamepad () |
| void | updateCredits () |
| void | updateFontSize () |
| void | updateGame () |
| void | updateGameOver () |
| void | updateIntro () |
| void | updateOptions () |
| void | updateScores () |
| void | updateStart () |
| bool | validationEnabled () const |
| Check whether Vulkan validation layers are currently enabled. | |
| virtual | ~MasterPieceWindow () |
Static Public Member Functions | |
| static VkBool32 | debugCallback (VkDebugUtilsMessageSeverityFlagBitsEXT severity, VkDebugUtilsMessageTypeFlagsEXT type, const VkDebugUtilsMessengerCallbackDataEXT *callback_data, void *user_data) |
Protected Member Functions | |
| void | captureSnapshotPixels (std::vector< std::uint8_t > &rgba_pixels, uint32_t &width, uint32_t &height) |
| Capture the most recently presented swapchain image as tightly packed RGBA8 pixels. | |
| void | createDevice () |
| Create final device resources. | |
| void | createLogicalDevice () |
| Create a logical Vulkan device from the selected physical device. | |
| void | exit () |
| Request loop termination. | |
| bool | initWindow (const std::string &title, int width, int height, SDL_WindowFlags flags) |
| Initialize SDL window resources. | |
| virtual void | onConfigureDepthStencilAttachments (VkRenderingAttachmentInfo &depth_attachment, VkRenderingAttachmentInfo &stencil_attachment, uint32_t image_index) |
| Allow derived classes to customize depth/stencil attachments for the main dynamic rendering pass. | |
| virtual void | onRecordCustomRendering (VkCommandBuffer cmd, uint32_t image_index) |
| Optional hook for derived classes to record extra draw commands. | |
| virtual void | onSwapchainAboutToRecreate () |
| Called right before swapchain-dependent resources are recreated. | |
| virtual void | onSwapchainRecreated () |
| Called after swapchain and render resources are recreated. | |
| void | pickDevice () |
| Pick a suitable Vulkan physical device. | |
| void | renderStandaloneSprite (VK_Sprite &sprite, VkCommandBuffer cmd) |
| Render one standalone sprite using the window's shared sprite pipeline. | |
Static Protected Member Functions | |
| static VkShaderModule | createShaderModule (VkDevice device, const std::vector< char > &spv_bytes) |
| Create a shader module from SPIR-V bytecode. | |
| static std::vector< char > | loadSpv (const std::string &path) |
| Load a SPIR-V file from disk. | |
Protected Attributes | |
| bool | active = false |
| VkClearColorValue | clear_color {{0.0f, 0.0f, 0.0f, 1.0f}} |
| std::vector< VkCommandBuffer > | command_buffers {} |
| VkCommandPool | command_pool = VK_NULL_HANDLE |
| uint32_t | current_frame = 0 |
| VkDebugUtilsMessengerEXT | debug_messenger = VK_NULL_HANDLE |
| VkFormat | depth_format = VK_FORMAT_UNDEFINED |
| std::vector< bool > | depth_image_initialized {} |
| std::vector< VkDeviceMemory > | depth_image_memories {} |
| std::vector< VkImageView > | depth_image_views {} |
| std::vector< VkImage > | depth_images {} |
| VkDevice | device = VK_NULL_HANDLE |
| bool | font_configured = false |
| std::string | font_path {} |
| int | font_size = 24 |
| bool | force_swapchain_recreate = false |
| bool | fps_counter_enabled = false |
| Font | fps_counter_font {} |
| bool | fps_counter_font_ready = false |
| uint32_t | fps_counter_frame_count = 0 |
| std::chrono::steady_clock::time_point | fps_counter_sample_time {} |
| std::string | fps_counter_text = "FPS: --" |
| bool | framebuffer_resized = false |
| VkQueue | graphics_queue = VK_NULL_HANDLE |
| uint32_t | graphics_queue_family = invalid_queue_index |
| std::array< VkSemaphore, max_frames_in_flight > | image_available {} |
| std::vector< VkFence > | image_fences {} |
| std::array< VkFence, max_frames_in_flight > | in_flight_fences {} |
| VkInstance | instance = VK_NULL_HANDLE |
| std::chrono::steady_clock::time_point | last_memory_trim_time = std::chrono::steady_clock::now() |
| uint32_t | last_presented_image_index = invalid_queue_index |
| uint64_t | last_resize_event_ms = 0 |
| VK_Sprite * | owned_post_process_sprite = nullptr |
| std::vector< VK_Sprite * > | owned_post_process_sprites {} |
| VkPhysicalDevice | physical_device = VK_NULL_HANDLE |
| VkPipelineCache | pipeline_cache = VK_NULL_HANDLE |
| std::vector< std::array< float, 4 > > | post_process_effect_params {} |
| std::vector< std::chrono::steady_clock::time_point > | post_process_effect_start_times {} |
| std::vector< bool > | post_process_effect_time_enabled {} |
| bool | post_process_enabled = true |
| std::vector< std::vector< VkImage > > | post_process_images {} |
| std::vector< std::vector< bool > > | post_process_initialized {} |
| std::vector< std::vector< VkDeviceMemory > > | post_process_memories {} |
| std::array< float, 4 > | post_process_params {} |
| VK_Sprite * | post_process_sprite = nullptr |
| std::vector< VK_Sprite * > | post_process_sprites {} |
| std::chrono::steady_clock::time_point | post_process_start_time = std::chrono::steady_clock::now() |
| bool | post_process_time_enabled = false |
| std::vector< std::vector< VkImageView > > | post_process_views {} |
| PresentModePreference | present_mode_preference = PresentModePreference::LowLatency |
| VkQueue | present_queue = VK_NULL_HANDLE |
| uint32_t | present_queue_family = invalid_queue_index |
| std::vector< VkSemaphore > | render_finished {} |
| std::vector< VkSwapchainKHR > | retired_swapchains |
| bool | screenshot_enabled = defaultEnableScreenshot() |
| uint32_t | screenshot_index = 0 |
| std::string | screenshot_prefix = defaultExecutableName() |
| std::condition_variable | screenshot_queue_cv |
| std::mutex | screenshot_queue_mutex |
| std::deque< ScreenshotSaveTask > | screenshot_save_queue |
| std::thread | screenshot_worker |
| bool | screenshot_worker_stop = false |
| bool | sdl_initialized = false |
| VkDescriptorSetLayout | sprite_descriptor_set_layout = VK_NULL_HANDLE |
| VkPipeline | sprite_pipeline = VK_NULL_HANDLE |
| VkPipelineLayout | sprite_pipeline_layout = VK_NULL_HANDLE |
| bool | sprite_state_dirty = false |
| std::vector< std::unique_ptr< VK_Sprite > > | sprites {} |
| std::vector< std::unique_ptr< VK_Sprite3D > > | sprites3d {} |
| VkSurfaceKHR | surface = VK_NULL_HANDLE |
| VkSwapchainKHR | swapchain = VK_NULL_HANDLE |
| VkExtent2D | swapchain_extent {} |
| VkFormat | swapchain_format = VK_FORMAT_UNDEFINED |
| std::vector< bool > | swapchain_image_initialized {} |
| std::vector< VkImageView > | swapchain_image_views {} |
| std::vector< VkImage > | swapchain_images {} |
| bool | swapchain_supports_transfer_src = false |
| VkDescriptorSetLayout | text_descriptor_set_layout = VK_NULL_HANDLE |
| VkPipeline | text_pipeline = VK_NULL_HANDLE |
| VkPipelineLayout | text_pipeline_layout = VK_NULL_HANDLE |
| std::unique_ptr< VK_Text > | text_renderer {} |
| bool | text_state_dirty = false |
| bool | validation_enabled = false |
| std::unique_ptr< SDL_Window, SDLWindowDeleter > | window {} |
Static Protected Attributes | |
| static constexpr std::chrono::seconds | MEMORY_TRIM_INTERVAL {30} |
| static constexpr uint64_t | resize_settle_delay_ms = 150 |
Definition at line 222 of file acid.drop.cpp.
|
stronginherited |
|
inline |
Definition at line 261 of file acid.drop.cpp.
|
inlinevirtual |
Definition at line 272 of file acid.drop.cpp.
|
inline |
Definition at line 1062 of file acid.drop.cpp.
|
inline |
Definition at line 1018 of file acid.drop.cpp.
|
inline |
Definition at line 348 of file acid.drop.cpp.
|
inherited |
Attach a full-screen post-processing fragment shader.
The window renders the normal scene into an offscreen color target, then draws that target through the supplied sprite-compatible fragment shader into the swapchain. Shader params are passed through the existing sprite push-constant vec4.
| fragmentShaderPath | Post-process fragment shader SPIR-V path. |
| p1 | First shader parameter. |
| p2 | Second shader parameter. |
| p3 | Third shader parameter. |
| p4 | Fourth shader parameter. |
Definition at line 1154 of file mxvk.cpp.
|
inherited |
Definition at line 1159 of file mxvk.cpp.
|
inline |
Definition at line 786 of file acid.drop.cpp.
|
inline |
Definition at line 809 of file acid.drop.cpp.
|
inline |
Definition at line 832 of file acid.drop.cpp.
|
inline |
Definition at line 1092 of file acid.drop.cpp.
|
protectedinherited |
Capture the most recently presented swapchain image as tightly packed RGBA8 pixels.
This performs a synchronous GPU readback and may briefly stall rendering.
Definition at line 800 of file mxvk.cpp.
|
inline |
Definition at line 379 of file acid.drop.cpp.
|
inline |
Definition at line 1043 of file acid.drop.cpp.
|
inline |
Definition at line 993 of file acid.drop.cpp.
|
inherited |
Clear all queued text draw calls for the current frame.
|
inherited |
Definition at line 59 of file mxvk.cpp.
|
protectedinherited |
Create final device resources.
Definition at line 1645 of file mxvk.cpp.
|
protectedinherited |
Create a logical Vulkan device from the selected physical device.
Definition at line 1514 of file mxvk.cpp.
|
staticprotectedinherited |
Create a shader module from SPIR-V bytecode.
| device | Logical Vulkan device used to create the module. |
| spv_bytes | SPIR-V bytecode payload. |
| mxvk::Exception | when inputs are invalid or module creation fails. |
Definition at line 145 of file mxvk.cpp.
|
inherited |
Create a sprite from a PNG file and register it with this window.
| pngPath | Path to the PNG file. |
| vertexShaderPath | Optional custom vertex shader SPIR-V path. |
| fragmentShaderPath | Optional custom fragment shader SPIR-V path. |
Definition at line 3477 of file mxvk.cpp.
|
inherited |
Create a blank sprite texture and register it with this window.
| width | Texture width in pixels. |
| height | Texture height in pixels. |
| vertexShaderPath | Optional custom vertex shader SPIR-V path. |
| fragmentShaderPath | Optional custom fragment shader SPIR-V path. |
Definition at line 3546 of file mxvk.cpp.
|
inherited |
Create a sprite from an SDL surface and register it with this window.
| surface | Source surface pointer. |
| vertexShaderPath | Optional custom vertex shader SPIR-V path. |
| fragmentShaderPath | Optional custom fragment shader SPIR-V path. |
Definition at line 3510 of file mxvk.cpp.
|
inherited |
Create a world-space billboard sprite from a PNG file.
| pngPath | Path to the PNG file. |
| vertexShaderPath | Optional custom vertex shader SPIR-V path. |
| fragmentShaderPath | Optional custom fragment shader SPIR-V path. |
Definition at line 3578 of file mxvk.cpp.
|
inherited |
Create a world-space billboard sprite from an SDL surface.
| surface | Source surface pointer. |
| vertexShaderPath | Optional custom vertex shader SPIR-V path. |
| fragmentShaderPath | Optional custom fragment shader SPIR-V path. |
Definition at line 3604 of file mxvk.cpp.
|
staticinherited |
Definition at line 44 of file mxvk.cpp.
|
inherited |
Detach the current post-processing shader and return to direct swapchain rendering.
Definition at line 1198 of file mxvk.cpp.
|
inline |
Definition at line 671 of file acid.drop.cpp.
|
inline |
Definition at line 616 of file acid.drop.cpp.
|
inline |
Definition at line 645 of file acid.drop.cpp.
|
inline |
Definition at line 718 of file acid.drop.cpp.
|
inline |
Definition at line 1086 of file acid.drop.cpp.
|
inherited |
Definition at line 1271 of file mxvk.cpp.
|
inherited |
Ensure deferred render resources are initialized.
Definition at line 1406 of file mxvk.cpp.
|
inlineoverridevirtual |
Handle one SDL event.
| e | SDL event to process. |
Reimplemented from mxvk::VK_Window.
Definition at line 1124 of file acid.drop.cpp.
|
protectedinherited |
Request loop termination.
|
inline |
Definition at line 883 of file acid.drop.cpp.
|
inline |
Definition at line 1301 of file acid.drop.cpp.
|
inline |
Definition at line 367 of file acid.drop.cpp.
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
|
inline |
Definition at line 371 of file acid.drop.cpp.
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
Get the underlying SDL window handle.
Definition at line 165 of file mxvk.hpp.
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
|
inlinenodiscardnoexceptinherited |
|
nodiscardinherited |
Measure text dimensions in pixels.
| text | Text string to measure. |
| width | Output width in pixels. |
| height | Output height in pixels. |
Definition at line 3069 of file mxvk.cpp.
|
nodiscardinherited |
|
nodiscardinherited |
|
inline |
Definition at line 483 of file acid.drop.cpp.
|
inline |
Definition at line 1149 of file acid.drop.cpp.
|
inline |
Definition at line 1416 of file acid.drop.cpp.
|
inline |
Definition at line 279 of file acid.drop.cpp.
|
virtualinherited |
Initialize Vulkan state.
| validiation | Enables validation-related behavior when true. |
Definition at line 318 of file mxvk.cpp.
|
protectedinherited |
Initialize SDL window resources.
| title | Window title string. |
| width | Window width in pixels. |
| height | Window height in pixels. |
| flags | Additional SDL window creation flags. |
Definition at line 1059 of file mxvk.cpp.
|
staticprotectedinherited |
Load a SPIR-V file from disk.
| path | Absolute or relative path to a .spv file. |
| mxvk::Exception | when the file cannot be opened, is empty, or is not 4-byte aligned. |
Definition at line 141 of file mxvk.cpp.
|
inline |
Definition at line 744 of file acid.drop.cpp.
|
inherited |
Run the main event/render loop.
Definition at line 600 of file mxvk.cpp.
|
inline |
Definition at line 1080 of file acid.drop.cpp.
|
inline |
Definition at line 1068 of file acid.drop.cpp.
|
inline |
Definition at line 1074 of file acid.drop.cpp.
|
protectedvirtualinherited |
Allow derived classes to customize depth/stencil attachments for the main dynamic rendering pass.
Override this when custom rendering needs hardware stencil testing or a custom depth/stencil image. The callback is invoked immediately before vkCmdBeginRendering.
Reimplemented in example::StencilWindow.
Definition at line 1138 of file mxvk.cpp.
|
virtualinherited |
Record resource transitions that must happen before dynamic rendering begins.
This callback is invoked after the command buffer begins recording and before vkCmdBeginRendering. Override this for resources that need per-frame image transitions or uploads before they are sampled by custom rendering.
| cmd | Active command buffer in recording state, outside a rendering scope. |
| image_index | Current swapchain image index. |
Reimplemented in defender::DefenderWindow, example::StencilWindow, and example::WaterWindow.
Definition at line 1134 of file mxvk.cpp.
|
protectedvirtualinherited |
Optional hook for derived classes to record extra draw commands.
This callback is invoked inside the dynamic-rendering scope started by the window, after viewport/scissor are configured and before rendering ends.
| cmd | Active command buffer in recording state. |
| image_index | Current swapchain image index. |
Reimplemented in anonymous_namespace{breakout.cpp}::BreakoutWindow, anonymous_namespace{pong.cpp}::PongWindow, anonymous_namespace{puzzle_drop.cpp}::PuzzleDropWindow, anonymous_namespace{tetris.cpp}::TetrisWindow, ComputeWindow, defender::DefenderWindow, demo::PoolWindow, example::BinaryMatrixWindow, example::DarkWindow, example::ExampleWindow, example::ExampleWindow, example::ExampleWindow, example::FireworksWindow, example::FractalWindow, example::GlitchCubeWindow, example::ModelWindow, example::ModelWindow, example::MoonWindow, example::OpenCVModelWindow, example::PlanetWindow, example::PointSpriteWindow, example::StarfieldWindow, example::StarshipWindow, example::StaticWindow, example::StencilWindow, example::WaterWindow, space::Asteroids3DWindow, space::Asteroids3DWindow, viewer::ModelViewerWindow, walk::WalkWindow, and walk::WalkWindow.
Definition at line 1136 of file mxvk.cpp.
|
protectedvirtualinherited |
Called right before swapchain-dependent resources are recreated.
Derived classes can release swapchain-dependent resources here.
Reimplemented in anonymous_namespace{pong.cpp}::PongWindow, example::ExampleWindow, example::FractalWindow, example::PlanetWindow, example::StaticWindow, example::StencilWindow, and example::WaterWindow.
Definition at line 1130 of file mxvk.cpp.
|
protectedvirtualinherited |
Called after swapchain and render resources are recreated.
Derived classes can rebuild swapchain-dependent resources here.
Reimplemented in anonymous_namespace{breakout.cpp}::BreakoutWindow, anonymous_namespace{pong.cpp}::PongWindow, anonymous_namespace{puzzle_drop.cpp}::PuzzleDropWindow, anonymous_namespace{tetris.cpp}::TetrisWindow, ComputeWindow, defender::DefenderWindow, demo::PoolWindow, example::BinaryMatrixWindow, example::DarkWindow, example::ExampleWindow, example::ExampleWindow, example::ExampleWindow, example::FireworksWindow, example::FractalWindow, example::GlitchCubeWindow, example::MatrixWindow, example::ModelWindow, example::ModelWindow, example::MoonWindow, example::OpenCVModelWindow, example::PlanetWindow, example::PointSpriteWindow, example::StarfieldWindow, example::StarshipWindow, space::Asteroids3DWindow, space::Asteroids3DWindow, surface::SurfaceWindow, surface::SurfaceWindow, viewer::ModelViewerWindow, walk::WalkWindow, and walk::WalkWindow.
Definition at line 1132 of file mxvk.cpp.
|
inline |
Definition at line 315 of file acid.drop.cpp.
|
protectedinherited |
Pick a suitable Vulkan physical device.
Definition at line 1427 of file mxvk.cpp.
|
inline |
Definition at line 858 of file acid.drop.cpp.
|
inline |
Definition at line 1257 of file acid.drop.cpp.
|
inherited |
Queue a text string for rendering during the current frame.
| text | UTF-8 text. |
| x | Pixel X coordinate. |
| y | Pixel Y coordinate. |
| col | Text color. |
Definition at line 3018 of file mxvk.cpp.
|
inherited |
Definition at line 3047 of file mxvk.cpp.
|
inherited |
Definition at line 3031 of file mxvk.cpp.
|
inlineoverridevirtual |
Execute one processing/update step.
Reimplemented from mxvk::VK_Window.
Definition at line 387 of file acid.drop.cpp.
|
inherited |
Release Vulkan and SDL resources.
Safe to call multiple times.
Definition at line 218 of file mxvk.cpp.
|
virtualinherited |
Render one frame.
Reimplemented in example::FractalWindow, and viewer::ModelViewerWindow.
Definition at line 778 of file mxvk.cpp.
|
protectedinherited |
Render one standalone sprite using the window's shared sprite pipeline.
This is intended for derived classes that want to draw a sprite before or after their own scene content without registering it in the window-managed sprite list.
Definition at line 1142 of file mxvk.cpp.
|
inline |
Definition at line 1118 of file acid.drop.cpp.
|
inherited |
Save the most recently rendered window contents as a PNG file.
| path | Destination PNG path. |
This performs a synchronous GPU readback and may briefly stall rendering.
Definition at line 782 of file mxvk.cpp.
|
inline |
Definition at line 375 of file acid.drop.cpp.
|
inlinenodiscardnoexceptinherited |
|
inherited |
Set the per-frame color attachment clear color.
| r | Red channel [0, 1]. |
| g | Green channel [0, 1]. |
| b | Blue channel [0, 1]. |
| a | Alpha channel [0, 1]. |
Definition at line 593 of file mxvk.cpp.
|
inlinenoexceptinherited |
Enable or disable F10 screenshot capture.
Definition at line 159 of file mxvk.hpp.
|
inherited |
Set the active text-render font.
| fontPath | Path to a TTF font file. |
| fontSize | Font point size. |
Definition at line 2991 of file mxvk.cpp.
|
inlineinherited |
Definition at line 284 of file mxvk.hpp.
|
inherited |
Set the post-processing shader params passed as a vec4 push constant.
Definition at line 1227 of file mxvk.cpp.
|
inherited |
Definition at line 1235 of file mxvk.cpp.
|
inherited |
Keep shader param 1 updated with elapsed render time in seconds.
Definition at line 1248 of file mxvk.cpp.
|
inherited |
Definition at line 1257 of file mxvk.cpp.
|
inherited |
|
inline |
Definition at line 1035 of file acid.drop.cpp.
|
inline |
Definition at line 988 of file acid.drop.cpp.
|
inherited |
Return transient Vulkan command-pool allocations to the driver when supported.
MXVK currently uses direct Vulkan memory allocations rather than VMA, so VMA defragmentation is not applicable. This hook schedules the available Vulkan memory maintenance operation and is safe to call during idle/loading points.
Definition at line 1041 of file mxvk.cpp.
|
inline |
Definition at line 332 of file acid.drop.cpp.
|
inline |
Definition at line 542 of file acid.drop.cpp.
|
inline |
Definition at line 305 of file acid.drop.cpp.
|
inline |
Definition at line 452 of file acid.drop.cpp.
|
inline |
Definition at line 459 of file acid.drop.cpp.
|
inline |
Definition at line 420 of file acid.drop.cpp.
|
inline |
Definition at line 490 of file acid.drop.cpp.
|
inline |
Definition at line 553 of file acid.drop.cpp.
|
inline |
Definition at line 433 of file acid.drop.cpp.
|
nodiscardinherited |
Check whether Vulkan validation layers are currently enabled.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
staticconstexprprotectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
staticconstexprprotectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |