Skip to content

Conversation

hack-s
Copy link
Collaborator

@hack-s hack-s commented Jul 7, 2024

Possible fix for #823

Copy link
Member

@revmischa revmischa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments would be cool! what is Type

@hack-s hack-s changed the title Check if active present output texture is valid before copying Check if active preset output texture is valid before copying Jul 7, 2024
@hack-s hack-s force-pushed the check-present-output-texture-823 branch from 5a93a44 to 8d5f607 Compare July 7, 2024 00:30
@hack-s
Copy link
Collaborator Author

hack-s commented Jul 7, 2024

I think a better fix would be using a nullptr for the output texture initially instead of initializing it empty. But that would be a more intrusive change.

@kblaschke
Copy link
Member

I think a better fix would be using a nullptr for the output texture initially instead of initializing it empty. But that would be a more intrusive change.

I absolutely don't mind intrusive changes if they are cleaner. If there's no texture, we can surely leave the shared pointer empty. Easier to check, and not more complicated to initialize it later.

If you want to make this change, please do so, that'd be highly appreciated!

@kblaschke
Copy link
Member

Issue comes from a preset not having an output texture yet (e.g. framebuffer color attachment is not yet initialized), so the texture has to be there, but will be created when the framebuffer is resized to something larger than 0x0, which happens on the first frame draw call.

Applied a fix to check for an empty texture ID in CopyTexture, and openend PRs #826 and #827, closing this one here.

@kblaschke kblaschke closed this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants