Relative Content

Tag Archive for csdlsdl-2

Created textures break in SDL2 when resizing a window

I’m trying to create and render a large number of textures in a window with a SDL_WINDOW_RESIZABLE flag, but when I’m resizing it, some textures sometimes break. I haven’t noticed this issue if I’m creating a texture in some other way, for example, by rendering a glyph and converting it to a texture. Here’s full code:

How to return an object with C functions?

this questions might be very stupid for some of you but i’m very new to C programming. I’m currently creating a 3D engine in pure C and i’d like to know how to return an object with C functions.

How to return an object with C functions?

this questions might be very stupid for some of you but i’m very new to C programming. I’m currently creating a 3D engine in pure C and i’d like to know how to return an object with C functions.

Can not find -lSDL2 and -lSDL2main when trying to compile my code

I’m pretty new to this and I’ve just been trying to set up a window for my C++.
I have no idea how any of this works so I tried watching a video on youtube explaining how to set it up. I followed this video: text and managed to set it up the same as what he did however whenever I try to compile the code it comes up with this in the terminal:

SDL2: How to draw without clearing

I’m trying to make a program that draws parametric equations using SDL2, meaning that I want all points generated from the parametric equation to stay on screen. Here is my full code so far: