A good OpenGL I/O library for C, C++ or Python?

Hello.

I have run into problems making my 2D game in python. I’ve used several libraries which gave caused problems. Pygame played music terribly, GLUT did fullscreen badly and had insufficient features and pyglet has performance issues (On OSX at least).

I can make a C/C++ extension and I could use Objective C if using platform-specific APIs is a good idea. Can someone recommend what I should use when I have the following requirements:

• Needs fullscreen mode without deleting textures and buffer objects when switching.
• Allows scaling and repositioning of screen, both manual and automatic. I also need to know the screen resolution to determine things like the screen centre.
• Allows program ownership of mouse (For the mouse control system I’m doing. Pyglet is rubbish with the mouse)
• Support ogg/mp3 sound files (I could convert to other formats but I’d like to stay with ogg/mp3)
• Supports opening png and jpg files or someway to interface with libraries that can
• Can minimise windows
• Unicode input support (I can’t compromise here. People need to be able to type whatever letter they choose, especially for the login credentials)
• Simple multisampling anti-aliasing support will be a great addition.

Thank you.

Look into Qt,

  • has Unicode support
  • Phonon (part of Qt) can play mp3 & ogg
  • has OpenGL renderable widgets (I know nothing about deleting textures when switching)
  • multiplatform
  • supports various image formats (including jpg and png)

I used it in few simple projects, but it is quite heavy lib.

Thank you for the reply. I thought it was used to create GUIs and not specifically games. Where’s the best place to look for creating games with it?

Thank you again.

Yes it is used for GUI’s, but afaik there are no libraries supporting that much of features speciffically for games.

Sorry, but I have no idea where to start game development with Qt, I created only few programs with it (not games).

I’ve looked at Qt and I’m struggling to find how it would fit in. I can’t find support for proper fullscreen mode.

I’ve been looking at platform-specific libraries (3 times the work), first Cocoa. It’s very confusing. I don’t know if there’s a way not to use the interface builder and use simple code. I’m not finding tutorials easy to follow and it will certainly be hard to implement with my existing code since it’s so different.

I might try SFML but I don’t trust it. The organisation (Website and packages) seems a little unprofessional.

It’s hard to decide. I’ll probably give SFML a go with C++ after my C++ vertex buffer object code is working.

Thanks once again. If I could discover everything I need for Qt, I’d look into it but I’m struggling.

If anyone else has any ideas, I’d appreciate any advice.

For games, I recommend SDL and it’s utility libraries:
SDL_mixer for audio support (OGG, MP3 and others)
SDL_image for image support (BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, XCF, XPM, XV)
SDL_net for networking (very thin layer over native networking API)

another option for audio is OpenAL+SDL_sound.

Be aware though: SDL does not provide any GUI elements, you’ll need to draw it all yourself (with GL if you use GL)