sdl

Graphic programming over video playback

I want to make some GUI mockup program for video player, so my idea is just to show some menu pictures over real video being playback. I have working program made with C and SDL just to load pictures and make a slideshow, but i don´t know how to put this over video with transparencies. Do you have a hint? ps. i usually program with pyt...

SDL causes Undefined symbols: "_main", referenced from: start in crt1.10.5.o

When I try to use SDL in my c++ program, I get the following: > g++ minimal.cpp SDLMain.m Undefined symbols: "_main", referenced from: start in crt1.10.5.o ld: symbol(s) not found collect2: ld returned 1 exit status Here's my minimal.cpp: #include <SDL/SDL.h> int main(int argc, char **argv) { return 0; } What I could ga...

wrote a SDL game using C++ and i want to deploy it.

I wrote this really simple game in SDL using C++ and now i want to show some of my friends who are on windows. I wrote my program in ubuntu 9.10 using code blocks. I want to take my source code and make a windows installer so they can install it and play. How can i go about doing this? ...

C++: Cannot instantiate a pointer directly

This is an SDL problem, however I have the strong feeling that the problem I came across is not related to SDL, but more to C++ / pointers in general. To make a long story short, this code doesn't work (edited to show what I really did): player->picture = IMG_Load("player"); SDL_BlitSurface(player->picture, NULL, screen, &pictureLocati...

How to stretch a bitmap in C and SDL?

I am making a game for my CS class and the sprites I have found online are too small. How do you 'stretch' a bitmap... make them bigger using SDL? (I need to increase there size 50%, there all the same size.) A snippet of example code would be appreciated. ...

SDL_GL_SwapBuffers Segfault

I'm getting a segfault that GDB says is coming from SDL_GL_SwapBuffers. However, I can't imagine why. The SDL documentation mentions no specific pre-conditions for calling swapBuffers except that double buffering be allowed. Is this an option I have to turn on while initializing OpenGL or is this a hardware capability thing? My code: h...

SDL. Current music position

Hi all, I load my music track using SDL_mixer function: Mix_Music * SDLCALL Mix_LoadMUS(const char *file); For synchronization with video I need to know current music position. How can I determine this? ...

MacOS. SDL. How to hide fullscreen window

Is this possible to hide fullscreen window (SDL based application)? How can I do this? ...

C++ union assignment, is there a good way to do this?

I am working on a project with a library and I must work with unions. Specifically I am working with SDL and the SDL_Event union. I need to make copies of the SDL_Events, and I could find no good information on overloading assignment operators with unions. Provided that I can overload the assignment operator, should I manually sift thro...

Read/Write protected memory?

I'm trying to learn C++ currently, but I'm having issues with the code below. class Vector2 { public: double X; double Y; Vector2(double X, double Y) { this->X = X; this->Y = Y; }; SDL_Rect * getSdlOffset() { SDL_Rect * offset = new SDL_Rect(); offset->x = this->X; of...

Mystery OpenGL/SDL memory growth

This is my first "game" I'm working on in C++ using OpenGL for graphics and SDL for the application. My code appears to work as I am able to create a functional application window and fully load and draw a texture with the Devil Texture library. The problem arises at runtime. My Memory usage, according to Windows Task Manager, starts a...

Vertex Buffer Object not drawing in SDL window

I'm just using the opengl SDL template with Xcode, and everything runs fine. I removed the Atlantis code, and changed the main extension to .mm, then added some testing code to drawGL. Drawing a simple triangle (using immediate mode) at this point inside drawGL gives me a white triangle, but when I add the code to draw using a vertex buf...

Is there an SDL module for Perl?

Is there an SDL module for Perl? ...

Using SDL to replace colors using SDL Color Keys

Hey, I am working an a simple Roguelike game, and using SDL as the display. The Graphics for the game is an image of Codepage 437, with the background being black, and the font white. Instead of using many seperate image files that are already colored, I want to use one image file, and replace the colors when it is being loaded into m...

Achieving a constant frame rate in SDL

I'm trying to make an SDL program that runs with a constant frame rate. However I'm finding that even though my program is lagging a lot and skipping a lot of frames (even though it's running at a low frame and isn't rendering much). Do you guys have any suggestions to make my program run smoother? #include "SDL.h" #include "SDL/SDL_tt...

Ret Failure with SDL using FASM on Win32

I'm using SDL with FASM, and have code that's minimally like the following: format ELF extrn _SDL_Init extrn _SDL_SetVideoMode extrn _SDL_Quit extrn _exit SDL_INIT_VIDEO equ 0x00000020 section '.text' public _SDL_main _SDL_main: ccall _SDL_Init, SDL_INIT_VIDEO ccall _SDL_SetVideoMode, 640, 480, 32, 0 ccall _SDL_Quit...

SDL doesn't detect Arrow Keys

I am working through the SDL tutorials over at http://lazyfoo.net/SDL_tutorials/index.php and I'm stuck on tutorial 8 where I'm working with key presses. I'm using the following code: //Our Main application loop while(!quit){ if(SDL_PollEvent(&curEvents)){ if(curEvents.type == SDL_QUIT){ quit = true; } ...

c++: how can i use sdl to load a bitmap into a cube in opengl ?

Hiya. I'm learning OpenGL and SDL and so far I've been able to properly draw and rotate 3d polygons ( yay for me! :) ) how can I load an image file using SDL and load that texture on the 3d shapes that i draw on screen using OpenGL. thanks!!! update I tried the following code that draw a cube, rotates it and adds a bitmap, but I don...

Perl SDL Windows Installation

I'm using Windows and I need the SDL Library to start using SDL with Perl. I've been pointed to http://www.libsdl.org/ to download it. My first queston is, which library do I want from that page? There's 3 to choose from... Then I've been pointed to 4 other SDL extensions by this page: http://arstechnica.com/gaming/news/2006/02/games-pe...

mac, netbeans 6.8, c++, sdl, opengl: compilation problems

Hiya. I'm trying to properly compile a c++ opengl+sdl application using netbeans 6.8 under Snow Leopard 64-bit. I have libSDL 1.2.14 installed using macports. The script that I try to compile is the following: #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif #if defined(__APPLE__) && defined(__MACH__) #include <Ope...