Skip to main content

Questions tagged [sdl]

Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.

0 votes
1 answer
58 views

Trouble with Transparent Pixel Blending in PNG

When drawing transparent PNG data on to the renderer, pixel data of any previous drawing (layer beneath) is replaced with the renderer's drawing color (green). I have tried setting blend mode in the ...
AntumDeluge's user avatar
0 votes
1 answer
51 views

Render window is empty when not pushing any game object into a vector

I am trying SDL2 Gamedev for the first time so I don't know the best practices yet. Now, I have a code structure which looks something like this: main.cpp ui button.cpp and button.hpp objects.cpp ...
Divyansh undley's user avatar
1 vote
2 answers
60 views

Initial FBO creation and render in SDL app failing ERROR: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

My voxel renderer app fails to create a framebuffer object only during launch / initial window resize event. It is an ERROR: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT ...
zachaz35's user avatar
1 vote
0 answers
14 views

Audio stutter in macOS when switching from SDL app to any other app

I'm using SDL to write a program that plays arcade game-style music (i.e. chip tune music generated by an emulator core) and I have a timing loop in my code that restricts the application to 30fps. ...
Noel Whitemore's user avatar
0 votes
1 answer
488 views

How to create a SIMPLE Skybox using OpenGL and SDL

As the title is saying I'm trying to make a simple skybox to learn how it works. Using, of course OpenGL and SDL. I have tried read some sites, here are them: link 1 link 2 link 3. None of them were ...
ガブリエル Gabriel's user avatar
0 votes
0 answers
102 views

Why is my Gouraud Shading not working correctly?

I am trying to write a 3d Renderer in C using SDL and cgml but my shading seems to be not working correctly. When rendering the teapot I get seams and when I want to render a cube I get a bright white ...
Finn's user avatar
  • 1
1 vote
1 answer
305 views

Use DirectX 11 & HLSL in SDL

I saw Lazy Foo using OpenGL & GLSL in SDL, but I want to use DirectX 11 & HLSL in SDL. Is there a way to do this, and how?
M 027's user avatar
  • 123
0 votes
1 answer
78 views

Sprite goes slow with some keys while withh others faster

I'm making a SDL and C++ game engine and I don't know where I'm failing. Here iss my code: Game.cpp ...
prestamo ordenador's user avatar
0 votes
1 answer
120 views

encapsulation, structs and global variables?

I have worked on creating a gameloop and so far all of the code was inside a main.cpp file and I want to separate it into different files. Which caused several problems: My code is separated into 3 ...
snow_owl's user avatar
0 votes
0 answers
52 views

non-class type error with SDL_Rect

I am building a pong game in SDL2 as my first assignment for my game development class. I've encountered an error involving SDL_Rect that I can't figure out. I am ...
Derek Kwon's user avatar
0 votes
0 answers
58 views

How to re-design the graphics logic behind my game to preform better?

Recently, I have been working on a small "pet-project" of mine in C using the SDL library. I have noticed that without my render-calls, my project takes up 2% of the CPU and with the render-...
Renadil's user avatar
1 vote
2 answers
280 views

Bullet Physics Multi-threading Rigid Body transform jittering issues across threads

I've been working on a game using Bullet Physics for C++ as well as SDL for the windowing (with OpenGL) I've recently threaded the game, so that a separate while loop runs the Physics Simulation, ...
jasonmzx's user avatar
0 votes
1 answer
302 views

How to achieve smooth camera dragging with the mouse in SDL2?

I am working on a 2D isometric perspective game using SDL2 and I would like to implement the ability to pan the map when the right mouse button is held down. I was wondering what is best way to set ...
lancen's user avatar
  • 33
0 votes
0 answers
187 views

Separating Game code and Engine code

I've decided to take on a challenge of making 16 c++ games based on this challenge from FamTrinli, I'm using SDL + OpenGL. I've created a simple 2D game in the past, but I didn't like the code ...
koogel's user avatar
  • 79
0 votes
1 answer
342 views

How do you load/store assets?

I'm new to C++ and SDL2 and for the past few days I've been trying to figure out what to do with/how to handle assets for my game. I'm using an asset pack that includes 4 characters and each character ...
Konjointed's user avatar

15 30 50 per page
1
2 3 4 5
30