sdl

Compiler issues on VC++ 2008 Express, Seemingly correct code throws errors.

Hi there, I've been trying to get back into coding for a while, so I figured I'd start with some simple SDL, now, without the file i/o, this compiles fine, but when I throw in the stdio code, it starts throwing errors. This I'm not sure about, I don't see any problem with the code itself, however, like I said, I might as well be a newbie...

SDL_Surface to IDirect3DTexture

Can anybody help with converting an SDL_Surface object, a texture loaded from a file, into an IDirect3DTexture9 object. ...

moving SDL video surface

Does anyone know how to move my SDL.net video surface around the screen programtically? Surface videoContext = Video.SetVideoMode(1024, 768, 32, false, false, false, true, true); var a = System.Windows.Forms.Control.FromHandle(Video.WindowHandle); var b = System.Windows.Forms.NativeWindow.FromHandle(Video.WindowHandle); I can't find ...

Unwanted SDL_QUIT Event on mouseclick.

I'm having a slight problem with my SDL/Opengl code, specifically, when i try to do something on a mousebuttondown event, the program sends an sdl_quit event to the stack, closing my application. I know this because I can make the program work (sans the ability to quit out of it :| ) by checking for SDL_QUIT during my event loop, and ma...

What is a good book to use as a reference/learning resource for Specification and Description Language - Real Time?

What is a good book to use as a reference/learning resource for Specification and Description Language - Real Time? Also, is there any good UML software that supports SDL-RT? ...

2D Platformer Collision Problems With Both Axes

I'm working on a little 2D platformer/fighting game with C++ and SDL, and I'm having quite a bit of trouble with the collision detection. The levels are made up of an array of tiles, and I use a for loop to go through each one (I know it may not be the best way to do it, and I may need help with that too). For each side of the character...

Can't get my object to point at the mouse.

I'm using a combination of SDL and OpenGL in a sort of crash course project to teach myself how this all works. I'm really only interested in OpenGL as a way to use acceleration in 2D games so I just need this to work in a 2D plane. I have been having a lot of problems today with my current issue, I would like an object to point toward...

Implementation of APIs on diferent platforms

OK, this is basicly just about any non-default OS API running on all different OS. But for my example let´s consider platform Windows, API SDL (Simple DirectMedia Layer). Actually this question came to my mind when I was reading about SDL. Originally, I thought that on Windows (and basicly any other OS) you must use OS API to make cert...

Multithreaded SDL error in C++

I'm building a program in C++, using SDL, and am occasionally receiving this error: * glibc detected * ./assistant: double free or corruption (!prev) It's difficult to replicate, so I can't find exactly what's causing it, but I just added a second thread to the program, and neither thread run on its own seems to cause the error. The t...

Can someone code review my small SDL app? Want to make sure I didn't make any beginner mistakes

In an effort to teach myself the SDL library (hence my stack overflow handle :) ) I wanted to try my hand at a side-scroller. My code is complete but I want some feedback (mostly because I have an atrocious amount of if and else statements for what seems like some simple logic). My "program" is a c++ side-scroller where you move a singl...

How do I build SDL_TTF?

Okay, so I'm on Windows Vista, and I want to use SDL_TTF, but the idiots who made it decided you have to build everything from source, so I to build the .lib files and all that other stuff, but I'm on Windows, so how am I suppose to do this? ...

Which is better: SDL or SFML?

I'm thinking about switching from SDL to SFML, but before I do I want to know which is better. I'm mainly looking for easy sound/music, sprite rotations that are easy on the framerate/cpu, portability, and ease of installation. ...

difference between SDL and GLUT

Hi, I am learning the Opengl graphic programming at Eclipse. Can someone tell me the difference between GLUT application and SDL application, so that I can dig into either one of them? Tks. ...

SDL+OpenGL app: blank screen

I spent the last three days trying to create a small app using SDL + OpenGL. The app itself runs fine -- except it never outputs any graphics; just a black screen. I've condensed it down to a minimal C file, and I'm hoping someone can give me some guidance. I'm running out of ideas. I'm using Windows Vista, MinGW & MSYS. Thanks in adva...

SDL side-scroller scrolls inconsistantly

So I'm working on an upgrade from my previous project (that I posted here for code review) this time implementing a repeating background (like what is used on cartoons) so that SDL doesn't have to load really big images for a level. There's a strange inconsistency in the program, however: the first time the user scrolls all the way to th...

C++: FFMPEG and SDL resources

I'm looking for resources (preferably books, but websites are fine too) for using FFmpeg and/or SDL with C++. Stuff I'd like to be able to do (eventually): Decode and play videos in realtime to a QT widget (the QT part isn't a problem) Overlay text and images on the video (in realtime) Loop video Cross-fade from one video to another (...

SDL/Pygame failing to load PNG images with cx_Freeze

I'm running Python 3.1 on Windows and I'm trying to distribute my Pygame script as an executable via cx_Freeze. Right now it seems to be working except that the exe build can't load any of my images: Cannot load image: C:\path\to\build\exe.win32-3.1\resources\image.png File is not a Windows BMP file Googling has revealed that this hap...

What library to choose to build a user interface for a C++ software that uses SDL

Dear all, I have a simulation software (C++) that runs on the command line. It is platform independent (currently compiling and running on Windows, MacOS X and Linux). When the simulation ends, I visualize the result with SDL; it is a very basic 2d view, mainly color squares next to each other. I would like to have a user interface o...

gluNewQuadric() before opengl's initialization

Hello, I'm working on a c++ code that uses SDL/opengl. Is this possible to create a pointer to a quadric with gluNewQuadric() before having initialized opengl with SDL_SetVideoMode? The idea is to create a class with a (pointer to a) quadric class member that has to be instantiate before the SDL_SetVideoMode call. This pointer is ini...

When using SDL_SetVideoMode, is there a way to get the internal SDL_Window pointer or ID?

Hello, If you create a window by using SDL_SetVideoMode(), you are returned a surface, not a window handle. Is there a way to get the SDL_Window handle? I know there is a SDL_GetWindowFromID function, but I'm also not sure how to get the ID, other than the SDL_GetWindowID function, which would require me to already have the window handl...