Questions tagged as 'sdl'

1
answer

What is the difference and advantages of SDL and Unity3D?

I wanted to know what the main difference between SDL and Unity3D is in terms of performance and ease of use and when one is better than the other.     
asked by 03.07.2014 / 23:22
1
answer

How to create a dialog to open files with the SDL library?

I'm making a very simple audio player in C (in Ubuntu) for a college job, and I'm using the SDL library to create windows (graphical interface) along with the SDL_mixer to play the audio. The problem is: I need a way for the user to point the...
asked by 15.02.2014 / 22:03
1
answer

SDL - C - How to check if the mouse pointer is over an image?

Hello, I'm starting a learning about the graphical interface SDL in C and I intend to make a menu. In this menu there will be the options and when the user hover over some, it will change color (yellow to green) only I'm having difficulty in this...
asked by 11.06.2016 / 19:44
0
answers

SDL2 / C ++ - Execute loop at a specific frequency

I have a project of a emulator of CHIP8 that was already stopped for a long time so I went back to work on it today, I can extract and draw sprites and I have implemented almost all instructions, but sometimes the emulator runs very fast until i...
asked by 05.11.2018 / 13:37
0
answers

How to link SDL2 statically

With a simple sdl project, it only shows an empty window. I'm using the following CMake (in CLion): cmake_minimum_required(VERSION 3.3) project(AprendendoCpp) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_MODULE_PATH ${PROJECT...
asked by 19.05.2016 / 19:06
0
answers

Encapsulation of OpenGL code in C ++ classes

I'm currently starting an SDL / OpenGL-based project based on the code for this article . At the moment, I am trying to find the best way to encapsulate the OpenGL code of the example. My main function is as follows: int main(int argc, char *...
asked by 13.08.2015 / 19:18
1
answer

How to do Tiles 2D collision in C ++

Hello. I would like to know how I can do to get Tiles crash in C ++. I am using an engine made by my friend, however, I would like to know how to do it. I'm using SDL 2! Thank you in advance Thiago     
asked by 23.05.2015 / 18:29
1
answer

How to use sdl in Clion

I'm reasonably new to C ++, and I do not know how to use sdl in Clion. I've tried it in several ways, it's currently like this: CMakeLists: project(cppsdl) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lmingw32") set(CMAKE_EXE_LINKER...
asked by 21.04.2016 / 22:47
1
answer

Executable created by CodeBlocks opens and closes alone

I have a problem with my program in CodeBlocks. When I compile and run the program, CodeBlocks creates an executable in the Debug folder that is inside the bin folder, located in the same folder where the project is. When trying to open the .exe...
asked by 28.07.2015 / 06:37
1
answer

Texture error in opengl

I'm trying to do some things in C using SDL and opengl, and when it comes to drawing textures I can easily if I only want 1 texture object but when trying to put a texture in the background and another to any object both textures are being rende...
asked by 11.06.2017 / 22:14