Skip to content

Add window wrapper with validation for get_texture_format() method #18

@coderabbitai

Description

@coderabbitai

Context

This issue tracks the need to add a window wrapper that will handle validation for the GpuWrapper::get_texture_formate() method in sdl_wrapper/sdl_wrapper.gpu.ixx.

Problem

Currently, get_texture_formate() calls SDL_GetGPUSwapchainTextureFormat with m_window, which may be nullptr if set_window() hasn't been called yet. This can cause crashes or return invalid texture formats.

Proposed Solution

Add a window wrapper that will handle the validation check before accessing the swapchain texture format.

References

Note: There is also a typo in the method name: get_texture_formate() should be get_texture_format().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions