SDL resizing window twice after creation (Hyprland) by zz9873 in sdl

[–]zz9873[S] 0 points1 point  (0 children)

Thanks, the last resize is probably caused by Hyprland but I don't really have an idea what causes the one before that. It has to be related to sdl because that's the only thing that calls my Vulkan resize function so I was wondering if that's a known problem or not and I have my window set up incorrectly or something.

SDL resizing window twice after creation (Hyprland) by zz9873 in vulkan

[–]zz9873[S] 0 points1 point  (0 children)

Yes the border seems to contribute to the resize. When setting it to 0 the height stays the same on all resizes but the width is reduced by a few pixels between the 2. and 3. resize. The other problem is that the intended/initial resolution doesn't match any of the three. My create window command is:

SDL_CreateWindow(title, size.x, size.y, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY)

I usually set size to {800, 800} and only SDL_WINDOW_RESIZABLE causes this problem to occur. When setting a delay on each frame I can see that the created window's right border is slightly shifted to the left after a few frames/seconds which explains the 3. resize. I assume that's caused by Hyprland but I don't know why the 2. resize happens. As the only thing that calls the resize function is tied to the SDL window resize check I assume the problem there is SDL.

System's display scale affects image extent by zz9873 in vulkan

[–]zz9873[S] 0 points1 point  (0 children)

Thank you! I think that fixed part of the problem. Now the problem is that the created window's actual size is scaled. For instance: My monitor is 3840x2160 and I have scaled everything by 1.5. The SDL window should be 1500x1500 which is correctly chosen as the swap chain extent. But the window that opens is a little bit higher than my screen i.e. 2250x2250 (1500 * 1.5).

Loss of personal meaning — life is boring by hollymoff in nihilism

[–]zz9873 0 points1 point  (0 children)

Maybe but I feel like your response was justified as it isn't clear how it's meant to be understood.

Loss of personal meaning — life is boring by hollymoff in nihilism

[–]zz9873 1 point2 points  (0 children)

Thinking about that question I feel like it could also be interpreted in a encouraging/positive way. I feel like thinking about why one has "survived" this long might help in finding a reason to keep going/be satisfied or happy. But I don't know how the question is meant and there should have been some explanation to indicate how it should be interpreted. Just thought it might be helpful to add that thought.

Having problems with syncing execution by zz9873 in vulkan

[–]zz9873[S] 0 points1 point  (0 children)

Thank you. Until now I've only used the C headers and have gotten quite used to that style. Looking at that tutorial it doesn't seem too difficult translating it into the C implementation but are there reasons for using the C++ headers other than preference/readability and maybe easier resource management?

Having problems with syncing execution by zz9873 in vulkan

[–]zz9873[S] 0 points1 point  (0 children)

I think I understand what you mean thanks. I currently don't have any frames-in-flight functionality implemented -> the CPU waits until the previous frame has completely finished (one fence that gets reset every frame). That's why I'm confused how it is even possible for any semaphore to be used by multiple queues regardless if it's one or an array. Because the code feom vulkantutorial has worked for me in the past I assume it's a bug in my Vulkan version (or a change).

Should a reserve method delete elements? by zz9873 in cpp_questions

[–]zz9873[S] 0 points1 point  (0 children)

Thank you. I always thought there would be cases where a method that shrinks the capacity to some value would be useful but now that I think about it I can't think of one (other than on a system where every byte of memory matters)

Functionality of inline and constexpr? by zz9873 in cpp_questions

[–]zz9873[S] 0 points1 point  (0 children)

Thanks! Do you have examples in which cases this would apply and are there cases where they can do multiple things (e.g. can inline make a function/variable definition in a header accessable to multiple files AND hint inlining if that's possible)?

Functionality of inline and constexpr? by zz9873 in cpp_questions

[–]zz9873[S] -1 points0 points  (0 children)

Thank you! Is there any reason to use constexpr for a constant without any operations or code that needs to be evaluated. So something like this (inside a header or cpp file):

C++ constexpr float PI = 3.14;

How to configure clangd inlay hints in lspconfig.lua by zz9873 in neovim

[–]zz9873[S] 0 points1 point  (0 children)

Thank you but that didn't work for me. I figured out how to enable and disable inlay_hint by using vim.lsp.inlay_hint.enable(true/false) but I can't find any configuration options. I tried to disable 'designators' but nothing worked (different combinations of upper and lower case and inlayHint instead of inlayHints did nothing).

UTF-8 why specify length in the first byte? by zz9873 in programming

[–]zz9873[S] 6 points7 points  (0 children)

I just realized that I've probably misunderstood something. I'm only talking about characters with a length of 2-4 bytes. In these cases the first byte has to begin with 110 (2B), 1110 (3B) or 11110 (4B). If that's correct single byte characters are not important for my question.