sdl

Finding a suitable 2D graphics API

We are in the first stages of making a 2D game at the moment, which will focus on destructible environments and objects. However, we have already encountered serious problems with the choice of the right graphics API At the moment, we use SDL - but the problem we see with it is that it isn't really performant, and has no hardware-accel...

C++ and SDL: How does SDL_Rect work exactly?

Hello there, I'm working on some SDL stuff and I've run into some trouble when trying to set the location of a loaded BMP. Here's the code. while(event.type != SDL_QUIT) //The game loop that does everything { SDL_Rect *location; location = SDL_Rect(600,400,0,0); SDL_PollEvent(&event); //This "polls" the event //Drawing ...

What is most commonly used as a window manager for OpenGL nowadays?

Glut seems rather old, and SDL also as if it's not the youngest anymore - what is being used as (cross-platform) window manager for OpenGL nowadays? ...

SDL.NET wrapper: how to rotate a sprite ?

Hi guys, i'm trying to develop my first and simple videogame. I'm using SDL.NET (wrapper .NET of famous SDL) and c#. I'm trying to rotate my sprite (my "car") when user press down array, up array .. I'm using something like this.Surface = this.Surface.CreateRotatedSurface(90); But it not work ! I've error on screen... :( I know i ...

Why Is SDL_image not working

I am new to C++ and SDL; I am trying to add a new SDL extension libary using instructions found here: http://www.lazyfoo.net/SDL_tutorials/lesson03/windows/devcpp/index.php But I get these errors: 3 C:\Documents and Settings\Edmund\My Documents\C++\myprojects\SDL\SDLevent.cpp SDL/SDL_image.h: No such file or directory. C:\Documents ...

SDL program freezes

I'm writing a simple program for testing mouse. It compiles fine, but doesn't work. When I launch it, the window freezes. What am I doing wrong? #include <SDL/SDL.h> #undef main int main() { if (SDL_Init (SDL_INIT_EVERYTHING) != 0) return 1; SDL_Surface* Scr; if ((Scr = SDL_SetVideoMode (300, 200, 32, 0)) == 0) ...

2d Light effect with SDL

Hi, i would like to create a light effect on a 2d car racing written in SDL.NET (and c#). The psychs Light effect is simple: the car headlights (classic conic light effect). Does somebody know where can i look for some example of light managemnt via SDL ? Or maybe tell me how to solve this issue ? Thank you for your support ! ...

SDL_SetVideoMode problems

I'm using SDL_Image to display a JPEG on screen and having some issues with the resolution it's being displayed at. I understand that if I pass 0 to width, height and bits when calling SDL_SetVideoMode that SDL takes the current modes values, however these seem to be wrong in my case. I'm running this on an embedded linux system with a...

How can I change the cursor image in python soya?

Soya is a 3D game framework for python. How can I change the cursor image to/from a different image? ...

SDL_SetVideoMode hangs the process

During initialisation of my program I call SDL_SetVideoMode() just after SDL_Init() and it is hanging my program. When executing the program, if I press Ctrl-C during the hang it will continue as normal and all works fine. Obviously having to interupt SDL_SetVideoMode() every time isn't ideal! Anyone have any ideas on what this could b...

How do I statically link SDL on Windows with MinGW?

See title. I'm using Code::Blocks. Googling results in info involving the sdl-config sh script, which I obviously can't use on Windows. ...

Compiling SDL on a MAC

#include "ffmpeg/libavcodec/avcodec.h" #include "ffmpeg/libavformat/avformat.h" #include "ffmpeg/libswscale/swscale.h" #include "ffmpeg/libswscale/rgb2rgb.h" #include "ffmpeg/libswscale/swscale_internal.h" #include <stdio.h> #ifdef __MINGW32__ #undef main /* Prevents SDL from overriding main() */ #endif #include "SDL.framework/Heade...

Timer working improperly

I have a problem with a timer class based on a SDL timer. class CTimer { public: CTimer(): startTick(0), endTick(0), curTime(0), running(false) {}; void Start() { startTick += SDL_GetTicks() - endTick; running = true; }; void Stop() { endTick = SDL_GetTicks(); running = false; }; void Reset() { startTick = 0; endTick...

Changing keymapping in SDL program (aDosbox)

aDosbox is hard-coded to use a keymapping suitable for the T-Mobile G1. I'm using a G2, and that is a fairly inconvenient mapping. I'm completely new to android development, sadly. I've been poring over the code, and have managed to substitute a few characters, but I think I must be missing something pretty basic. Can anyone point me...

What is a mask value?

I'm learning the SDL library and one of the functions to create a surface is SDL_CreateRGBSurface. The four parameters I'm wondering about are R, G, B, and A masks. What exactly is a mask in this context? I'm also following a book about SDL and the author passed in 5 bits of red, 5 bits of blue, and 6 bits of green for the mask values....

sdl remote desktop

Hello, for a simple demo program I am using the SDL library to play a mpeg movie file. Unfortunately the demo app should be executed on one of our windows 7 servers and it should be looked at remotely. The problem is, that when I connect via RDP to the server the SDL window stays black - although the movie becomes played (I hear the ...

Im using SDL and my program use CPU a lot.

how can I use graphic card instead of CPU when I call SDL functions? ...

SDL changing cursor to Windows default

I'm making a simple windowed game and I want a standard system cursor instead of SDL's black one. Is this possible without manual creation of cursor? ...