4,995 questions
-6
votes
0
answers
73
views
Undesired Pulsating in Rendering and Cumulative Slowdown When Implementing Fixed Physics Timestep in Multithreaded Physics [closed]
INTRO
I am getting unwanted pulsing and slowing down in rendering 2d particles, which should be drawn faintly (low alpha) and leave a fading trail under the influence of gravity. Below is a ...
0
votes
1
answer
82
views
Bounds-checking SDL_Surface::pixels?
In the SDL_Surface structure, is there
a way to calculate the bounds of the pixels
Member?
I need a quicker way of doing this, so my code doesn't catch seg-faults while running.
On my Linux Laptop, ...
0
votes
1
answer
95
views
`vkGetMemoryWin32HandleKHR` tries to dereference a null address
I'm trying to create a shared texture between Vulkan and OpenGL, and as I understand the process, it's split in two parts: exporting the memory during allocation and then getting a Windows HANDLE to ...
0
votes
1
answer
218
views
Imgui can not find SDL3/SDL.h file
I am trying to learn imgui by first create a project using its library. But, first I wanted to run one of the examples found in the github repository. I am not using an IDE, only my mac terminal. ...
1
vote
0
answers
267
views
SDL program can't find available video device on NixOS
I'm using NixOS and trying to learn SDL, yesterday I got a code example to build and work but today it stopped working, I tried rebuilding everything in a different directory with no success. I'm ...
0
votes
0
answers
155
views
SDL3 Android Manual Build - App won't start
I'm automating the Android build process for an SDL3-based project without using Gradle. While SDL provides an Android project template, it doesn't fully cover my case, so I'm customizing it to ...
0
votes
0
answers
143
views
SDL_GL_CreateContext() fails without an error message
I'm building an OpenGL 4.6 application using SDL3 and GLAD, compiled with g++:
// g++ -Wall -Ofast main.cpp include/glad/glad.c -Iinclude/SDL3 -Linclude/SDL3 -lSDL3 -lopengl32 -o build/program
#define ...
2
votes
1
answer
239
views
SDL3 window wont show the presented D3D11 swapchain
I've been writing my own game engine using SDL3 and DX11. I've been able to get the HWND and set it to swapChainDesc.OutputWindow and set the color to pink:
#define SDL_MAIN_USE_CALLBACKS 1
#include &...
0
votes
1
answer
709
views
SDL2 on WSL not working, trying to create a renderer causes libEGL warnings?
I'm trying to simply create a window, running in wsl2, but I'm unable to. Every function call is fine until renderer = SDL_CreateRenderer(). This causes it to spit out:
libEGL warning: failed to open /...
2
votes
1
answer
121
views
Why is my Stippled Line Code (C99/SDL2) not working properly?
A few weeks back i was prototyping something in SDL2 (using SDL Surfaces) to make stippled lines for my app PGM. I did conplete the code; At first I assumed it was working as intended but when i ...
1
vote
1
answer
96
views
Getting the wl_display without an SDL_Window?
SDL2 constructs and initializes a video device within the SDL_Init() call. If SDL2 decides to use Wayland, this calls Wayland_CreateDevice, which connects to the Wayland server and stores a ...
0
votes
0
answers
47
views
Problem with synchronise changes textures in SDL
I want to make sure that I have visualization in one stream and all calculations in the other, I need some changes to be visible during the calculations, for this I wanted to change the variables ...
2
votes
1
answer
91
views
Making GET requests in a C GUI (e.g. SDL2) app: How to use libcurl without blocking the main loop?
I'm sorry if this has been asked before, or it's a really basic C question - I am more used to creating websites, in which case you can just use JS's fetch function to make network requests ...
2
votes
1
answer
841
views
Recieve input from keyboard in SDL3 inside of the main loop?
I want to make it so hitting keys changes the displayed image on my window but I don't really know how to set that up.
Here is the beginning of the main loop that I am trying to use:
while (!...
1
vote
0
answers
99
views
"conflicting types for 'SDL_main'" while trying to install the sdl2-image haskell module with stack
I am trying to install sdl2-image with stack and I get the following error:
sdl2-image> error: Image.hsc:77:5: error: conflicting types for 'SDL_main'
sdl2-image> int main (void)
sdl2-image> ...
2
votes
1
answer
688
views
Can't link to SDL3 using MinGW [closed]
I build using following command
gcc project.c -IC:\Users\john\SDL3-3.2.2\x86_64-w64-mingw32\include -LC:\Users\john\SDL3-3.2.2\x86_64-w64-mingw32\lib -lSDL3 -o project
the project file is simply
#...
2
votes
1
answer
878
views
cannot find -lSDL3main: No such file or directory
I recently installed SDL3. I wanted to make an easy test file just to get familiar with SDL, but it doesn't work.
To compile my code I use:
g++ test.cpp -lmingw32 -lSDL3main -lSDL3 -Lsrc/lib
...but I ...
0
votes
1
answer
137
views
SDL_AppIterate callback with multiple windows on multiple displays with different refresh rates
When there are multiple displays, their refresh rate can be different. Lets assume one window on 60Hz display and other is on 30Hz, and also vsync is on. How would SDL_AppIterate() be called? Once and ...
0
votes
0
answers
26
views
Unity obtains sdl and collects RGB raw data
I need to collect video streams from a microscope and used SDL's library to obtain the data frameData. However, I didn't know how to parse the video stream data in frameData to create videos that ...
0
votes
0
answers
53
views
Issue with rendering window in SDL2
i am working with a chip8 emulator and I'm trying to implement the display. i got finalized to show a window with white rectangle the issue is when i use the function outside of the while loop the ...
0
votes
1
answer
113
views
Huge amout of FPS fluctuation in SDL2 game [closed]
I started making a game in C using SDL2 library. I just got the classic rect moving on a blank screen, and used the following to calculate delta_time :
Uint64 now = SDL_GetPerformanceCounter();
Uint64 ...
0
votes
1
answer
359
views
Why do I get "SDL2.dll not found" error when loading .png files with SDL3 and SDL2_image library
To load .png file to window using SDL3 and SDL2_image library, I downloaded the following code from the link below:
https://lazyfoo.net/tutorials/SDL/...
0
votes
1
answer
125
views
Problem with using SDL_ttf in CLion on Windows (C++)
I am trying to use SDL_ttf in CLion on Windows to display text on screen within a game loop.
I don't have any issues with standard SDL, which I installed in
C:/Programs/SDL/SDL2-2.30.2 (original ...
0
votes
1
answer
113
views
SDL_CreateRenderer freezes/hangs
I used GDB and found out that SDL_Init and SDL_CreateWindow works, but when the code comes to SDL_CreateRenderer it calls it and hangs, it never returns and GDB just waits. Also, the CPU usage for the ...
0
votes
1
answer
172
views
pygame._sdl2 and SDL2 - Efficient Texture Storage on GPU with Multple Renderers
I'm working in pygame._sdl2 so that I can create multiple (2) windows simultaneously. I think this is an SDL2 question, not specific to pygame:
I want to be able to blit() the same textures into both ...