Giter Site home page Giter Site logo

gum's People

Contributors

borgleader avatar rapptz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

borgleader

gum's Issues

File Stream

SDL offers a generic way of doing file I/O streaming. However, its API is very C-like. It'd be a good idea to offer a similar iostream interface though that might prove difficult.

Higher performance shape drawables

At the moment, there are some singular shapes that are drawables such as:

  • point
  • rectangle
  • line

However, they use the singular form of the drawable using SDL_RenderDrawShape instead of SDL_RenderDrawShapes. For batching, there should be an alternative that uses the latter since the former would invoke a malloc and free call for only one and batching would invoke a malloc and free call for multiple instead of one.

Finish wrapping up window.

There are a lot of member functions that aren't provided by sdl::window. Would be a good idea to finish those.

Provide a way to refer to the SDL documentation.

There are a lot of references to the underlying SDL functions but the documentation doesn't externally link to them. It'd be cool if we could have a special directive for it. Something akin to :sdl:title. Should be worth researching to find out how to do this.

Provide different ways of error handling.

At the moment all errors are exceptions that are thrown. When I initially went into this, this seemed like a sensible thing to do because I assumed all errors that SDL reports must be substantial enough to warrant an exception thrown.

However, I soon realised this isn't the case. SDL decides to report errors for relatively small and silly things such as simple setters and getters. It might be a good idea to have a macro to change the error handling. Example:

#ifndef GUM_ERROR_HANDLER
#if defined(GUM_NO_EXCEPTIONS)
#define GUM_ERROR_HANDLER(x) SDL_Log("%s", sdl::last_error())
#else
#define GUM_ERROR_HANDLER(x) throw error()
#endif // GUM_NO_EXCEPTIONS
#endif // GUM_ERROR_HANDLER

Filesystem

Wrap up the small filesystem functions provided by SDL. Maybe provide other small utilities.

Events

Possibly wrap up SDL_Event. There's nothing inherently wrong with it, so just typedefs for consistency would do.

Display Mode

Wrap up SDL_DisplayMode and allow it to interact with sdl::window.

Message Boxes

SDL2 offers a nice platform independent way of doing message boxes. Would be nice to wrap them up a little.

Sprites

Would be cool to have an sdl::sprite that encapsulates a drawable object. I might work on this last though. This depends on issues:

Input

SDL offers a nice way to do input facilities. Wrapping them up would be good to do to make some distinctions clear.

Images

Find a way to wrap up SDL2_image. This allows loading of pngs, jpegs, etc.

Texture

There's currently no way to create a texture to render anything to. Should probably wrap it around. This is relevant to issue #9 due to textures also being in part images/surfaces.

Audio

Wrap up SDL_audio.h. Note that this would probably mean wrapping up SDL_mixer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.