Skip to main content
-3 votes
0 answers
35 views

LNK1181: cannot open input file 'SDL2.lib' [closed]

Trying to make a small project that needs SDL linked in. I'm relatively new to this workflow so am quite stuck. Here is my project setup: I'm using C++ 20 and am compiling to a static library I've ...
Paul Brown's user avatar
0 votes
1 answer
49 views

Fix problem with textured triangle in cpp sdl2

I make my own voxel engine and when I set texture on trinagle it looks weird and not correct here my triangle render code: vertices[0].position.x = draw_face.point0.x; vertices[0].position.y = ...
Just_Coder14's user avatar
0 votes
0 answers
39 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 ...
devMe's user avatar
  • 345
0 votes
0 answers
20 views

Is there any method to compress SDL_Texture object?

As I know that dx and opengl support compressed texture format to reduce storage usage in RAM and in VRAM. However, native SDL_Renderer seems not support compressed texture format so that ~10M of ...
Initial_Equationor's user avatar
-3 votes
0 answers
53 views

Is there a way to have SDL2 use the Windows Desktop Wallpaper as a display? [duplicate]

I want to know if instead of opening a new window as the display, you can use the Windows Desktop Wallpaper (like an animated wallpaper or desktop pet) I thought of just trying to create a window with ...
TheHolyBread's user avatar
-4 votes
0 answers
64 views

OpenGL instanced meshes rendering incorrectly when instances differ

Context: I'm working on instancing in OpenGL (version 4.6) using C++ and SDL for window creation. When I render multiple instances of a quad: If all instances are identical, the rendering works ...
mikeriin's user avatar
-1 votes
1 answer
47 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 ...
Syntax Error12's user avatar
0 votes
0 answers
18 views

How do I print generated image frames to an SDL window? [duplicate]

I have a method in my program that is generating frames from a "ray tracer" I am building for a class project and have been trying to have the frames print into an SDL window that opens. My ...
Tatenda's user avatar
0 votes
0 answers
46 views

How do I properly make SDL not scale up the SDL window or the HTML canvas size in a WASM app?

I'm making a WASM program using SDL2 and Emscripten. It creates a 1000x1000 window using SDL_CreateWindow("scribbles", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, context.w, context.h, 0)...
inhahe's user avatar
  • 331
0 votes
1 answer
93 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/...
Niteya's user avatar
  • 13
0 votes
2 answers
48 views

SDL_Init() segfaults after somehow calling my close() function?

Why does this code: /* gcc test.c -o test -lSDL2 -Wall -Wextra */ #include <SDL2/SDL.h> void close() { printf("HERE\n"); SDL_Quit(); } int main() { SDL_Init(...
user25068231's user avatar
0 votes
1 answer
58 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 ...
Dee Vee's user avatar
3 votes
1 answer
97 views

How to use SDL2 with .NET MAUI

I am trying to use SDL2 with .NET MAUI. I have tried to build the native libraries using the androidbuildlibs.sh at the buildscripts directory. it generated libSDL.so for different architectures. and ...
Hossam Fares's user avatar
0 votes
1 answer
82 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 ...
Jelka's user avatar
  • 9
-2 votes
1 answer
90 views

Display Text in SDL2 and C++

I am making a blackjack game using SDL2 and C++. I want to print text to the screen using SDL_ttf. My code compiles but does not display text to the screen. SDL_Surface* display = NULL; TTF_Font* font;...
gamer67's user avatar

15 30 50 per page
1
2 3 4 5
333