Questions tagged [sdl]

Simple DirectMedia Layer (SDL) is a cross-platform, free and open source multimedia library. Should not be confused with Security Development Lifecycle.

Simple DirectMedia Layer (SDL) is a cross-platform, free and open source multimedia library written in C that presents a simple interface to various platforms' graphics, sound, and input devices.

From SDL's home page:

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for other platforms may be found in the source code.

SDL is written in C, works natively with C++, and there are bindings available for several other languages, including C# and Python.

SDL 2.0 is distributed under the zlib license. This license allows you to use SDL freely in any software.

4893 questions
1
vote
2 answers

Link with SDL and OpenGL under Ubuntu

I want to write a simple SDL OpenGL app, Codeblocks is the IDE I use. When I create a new OpenGL project, it compiles fine, but if I try to use a function from the SDL header, le wild "undefined reference error" occurs. The same goes for the other…
Moritz Schöfl
  • 763
  • 2
  • 7
  • 19
1
vote
1 answer

Curiosity: Background C++ windows. Difference between SFML/SDL type and Qt (GUI) type

I was wondering what is the difference between the windows that will render images on the screen (such as SDL, SFML or OpenGL) and the classic GUI window (with the gray background by default) where you can implement buttons like in Qt for C++ or…
Alex
  • 565
  • 2
  • 6
  • 17
1
vote
1 answer

Is it possible to compile Pygame 1.9.2 with SDL 1.3?

In this comment, user "illume" seems to indicate that Pygame 1.9.2 will build with "new SDL". Hoping that "new SDL" meant SDL 1.3, I downloaded, compiled and installed SDL 1.3's source, then downloaded Pygame 1.9.2's source via hg and attempted to…
Mike Lawrence
  • 1,641
  • 5
  • 20
  • 40
1
vote
2 answers

SDL blitting surface on surface

Me and my friends are working on a game project, and we seem to have hit a wall. We have a system, which takes the SDL RGB surface from a namespace in different header file. We blit it to the screen, (SDL_SetVideoMode), then we blit one more from…
Rokas
  • 1,712
  • 2
  • 18
  • 35
1
vote
2 answers

What happens if src and dest are same in SDL_BlitSurface?

I am performing SDL_BlitSurface(s_pScreen, 0, s_pScreen, 0); in order to make the display black as below. It works but sometimes it seems like it crashes. I get the error message "The exception Privileged Instruction. (0xC0000096) occured in the…
user1032187
  • 201
  • 1
  • 2
  • 8
1
vote
1 answer

gluBuild2DMipmaps memory leaking

I have a function which loads an image/text into my game.I'm using gluBuild2DMipmaps() to make an OpenGL texture from the SDL surface.The problem is that everytime when I call that function, even if I load the same image and bind it on the same…
slaviber
  • 358
  • 2
  • 10
1
vote
1 answer

SDL Small Screen

When I run this code for trying to start programming a tetris clone It prints the screen to a small rectangle (<30*30) and all the other part of the screen is black (it should be green) I know i shouldn't just give all the code but i really don't…
Ahmed Nematallah
  • 112
  • 1
  • 2
  • 6
1
vote
1 answer

2d tile rendering using tmx-parser and SDL

I'm working on getting an map created in Tiled (http://mapeditor.org) to render after parsing the map with tmx-parser (http://code.google.com/p/tmx-parser/). I've got the tiles to render in the correct positions, but i can't seem to get it to render…
Kpaiva
  • 31
  • 1
  • 4
1
vote
1 answer

Undefined Reference to WinMain@16 When Compiling SDL_ttf?

I am trying to compile SDL_ttf with MinGW and Code::Blocks. I have imported the MSVC Solution to Code::Blocks, There were three projects. SDL_ttf showfont glfont the SDL_ttf project compiled fine after adding the SDL headers to the path and…
ApprenticeHacker
  • 21,351
  • 27
  • 103
  • 153
1
vote
1 answer

OpenGL test code doesn't work on mac OS X

This code works on GNU/Linux but I can't find how to make it run on Mac OS X Lion. Here is a test code. Nothing too hard to understand, only an empty window waiting for a quit event to stop. If I comment the glClear call, everything works fine... in…
lvictorino
  • 575
  • 4
  • 18
1
vote
2 answers

Glew Linking Problems in Qt Creator?

I'm trying to link GLEW (with SDL and OpenGL - note, not SDL's implementation of OpenGL) in Qt Creator via a QMake file, though I'm not having much luck. No matter what I try, I seem to get the same string errors which deals with conflicting…
zeboidlund
  • 9,731
  • 31
  • 118
  • 180
1
vote
1 answer

Object Oriented C++ Abstraction Architecture

Background Information I'm currently taking a computer graphics class. The way we're learning the main concepts is by making an abstraction that anyone could use (aka a simple 3D library). We're using SDL for the real graphics part. Actually, all we…
rodrigo-silveira
  • 12,607
  • 11
  • 69
  • 123
1
vote
1 answer

Get SDL working with OSX Lion

SDL uses some functions that no longer work using the MacOSX10.7 SDK. I am not very familiar with MacPorts and I would like to know if there is a way to tell macports to build SDL using the 10.6 SDK instead. If this is not possible, I can download…
Timulus
  • 334
  • 3
  • 12
1
vote
3 answers

Adding to arrays C++

just wondering how I would go about adding ints to an array in the following way; I am getting average framerate for my game, but from what I understand if I create an int array of [10], I have no native way of just adding a number to the start of…
1
vote
1 answer

Compiling C code with VLD

I'm trying to compile the SDL libraries with Visual C++ (2010), and with Visual Leak Detector as to find a memory leak in another program that calls SDL. The problem is that vld.h is a C++ library, and SDL.c is a C program. Accordingly, when I…
lochok
  • 363
  • 1
  • 4
  • 20