sdl

Change window transparency in PyGame.

I want to change the transparency of a PyGame window. I don't nessicarly need to do this from PyGame as I already have an Python extension called wm_ext which controls the window which PyGame creates (it also initalizes PyGame). So, with this extension, I've got the window handle, I just need to know how to change the window transparen...

Other's library #define naming conflict

Hard to come up with a proper title for this problem. Anyway... I'm currently working on a GUI for my games in SDL. I've finished the software drawing and was on my way to start on the OpenGL part of it when a weird error came up. I included the "SDL/SDL_opengl.h" header and compile. It throws "error C2039: 'DrawTextW' : is not a member...

How to avoid tearing with pygame on Linux/X11

I've been playing with pygame (on Debian/Lenny). It seems to work nicely, except for annoying tearing of blits (fullscreen or windowed mode). I'm using the default SDL X11 driver. Googling suggests that it's a known issue with SDL that X11 provides no vsync facility (even with a display created with FULLSCREEN|DOUBLEBUF|HWSURFACE flags...

How do I use SDL to blit an image in multiply mode?

In Pygame, there is a special_flags argument to surface.blit. This let you combine pixels in ways different than simply copying them. For example, the multiply mode lets you multiply the pixels together. How do I achieve this using SDL from C? I've looked at the SDL documentation, and I don't see any obvious ways of doing this. ...

I'm trying to return a SDL Mix_Music data type, but I'm having problems.

I know I could just make all the Mix_Musics public, and not worry about the problem, but I'd still like to understand how to do it. //header.h class Music { private: Mix_Music * BGMusic, * fall, * reset, * teleport, * win, * singleCubeWin; public: Music(); bool loadMusic(); ...

Why can't I use colorkey for SDL textures?

I wrote up this simple C program to test basic SDL 1.3 functionality. Everything works, with one minor problem. The colorkey doesn't get converted. I'm loading an 8-bit PNG sprite file where palette index #0 is the background color. I'd expect to see only the sprites displayed, but what I get is the entire image, including the backgro...

C++ vector element is different when accessed at different times

OK. I'm confused. I'm developing a 3D game using SDL and OpenGL on Ubuntu 9.04 using Eclipse CDT. I've got a class to hold the mesh data in vectors for each type. Such as Vertex, Normal, UVcoord (texture coordinates), as well as a vector of faces. Each face has 3 int vectors which hold indexes to the other data. So far my game has b...

Planning a 2D tile engine - Performance concerns

As the title says, I'm fleshing out a design for a 2D platformer engine. It's still in the design stage, but I'm worried that I'll be running into issues with the renderer, and I want to avoid them if they will be a concern. I'm using SDL for my base library, and the game will be set up to use a single large array of Uint16 to hold the...

A project I'm assisting with is using freeglut for the client. Should I advise otherwise?

I'm involved in a development project that is using freeglut (based on the long defunct glut) for it's client. The client will eventually allow full interaction with a large-scale 3d environment. Should I let the development continue with freeglut (is it even possible) or should I advise they use another alternative such as libsdl, open...

Best way to rotate an image using SDL?

I am building a game and the main character's arm will be following the mouse cursor, so it will be rotating quite frequently. What would be the best way to rotate it? ...

I need help on how to rotate an image with OpenGL using SDL

I'm making a game and the arm of the character will be constantly rotating since it will be following the mouse cursor. I've never worked with openGL before and I need some help getting started. If anyone knows any good websites to start learning and one that specifically contains rotation, please let me know. I've already visited NeHe ...

I can't get the transparency in my images to work.

Stemming from this question of mine: http://stackoverflow.com/questions/1191093/im-seeing-artifacts-when-i-attempt-to-rotate-an-image In the source code there, I am loading a TIF because I can't for the life of me get any other image format to load the transparency parts correctly. I've tried PNG, GIF, & TGA. I'd would like to be able t...

Design question for an SDL\OpenGL Window & Widget library

I want to design & implement a simple windowing & widget for OpenGL running on top of SDL, much like Agar or GiGi, only much closer tied to SDL & OpenGL. My general problem is this: what is the best design for a windowing system within an OpenGL context?? I want to have windows just for controls, and, if even possible, threaded windows...

Rotating a spaceship model for a space simulator/game

I been working on a space sim for sometime now. At first I was using my own 3d engine with software rasterizer. But I gave up when the time for implementing textures was due. Now I started again after sometime and now I'm using Opengl (with SDL) instead to render the 3d models. But now I hit another brick wall. I can't figure out how ...

How to statically compile an SDL app on Windows

I just wonder if there is a solution that can statically link sdl_image,sdl_mixer and sprig into my application. I'm using VisualStudio2008 sp1,in order to compile a SDL app, I have to modify the project properties,C/C++->Code Generation->Runtime Library :debug:Multi-threaded Debug DLL(MDd)、release:Multi-threaded DLL(MD) after that, I do...

New to SDL OpenGL on Linux, whats wrong with this?

I have written some code to experiment with opengl programming on Ubuntu, its been a little while but I used to have a reasonable understanding of C. Since c++ i'm told is the language of choice for games programming I am trying to develop with it. This is my first real attempt at opengl with sdl and I have gotten to this far, it compil...

How to handle multiple keypresses at once with SDL?

Hi, been getting myself familiar with OpenGL programming using SDL on Ubuntu using c++. After some looking around and experimenting I am starting to understand. I need advice on keyboard event handling with SDL. I have a 1st person camera, and can walk fwd, back, strafe left and right and use the mouse to look around which is great. Her...

How to fix weird camera rotation while moving camera with sdl, opengl in c++

I have a camera object that I have put together from reading on the net that handles moving forward and backward, strafe left and right and even look around with the mouse. But when I move in any direction plus try to look around it jumps all over the place, but when I don't move and look around its fine. I'm hoping someone can help me ...

Minimal Linux Distrobution with SDL support and NO XWindows?

I want to setup a x86 Linux Box such that: It uses minimal system resources. Runs SDL, without XWindows Includes sufficient functionality to run QEmu. Basically I simply want it to ONLY be a host for Virtulization and be as "thin" as possible leaving nearly all resources available for the "client" OS. Is there anything like that ava...

Porting project to my laptop results in a blank screen

So I'm making something in openGL using SDL. I'm about to take a long flight, and I can't seem to get the project to work on my laptop. I've used SDL on my laptop before, so I'm left thinking it is openGL's fault. The laptop is on win xp pro, and has an intel 945 graphics "card." I've tried updating the drivers, but to no avail. The imag...