Classes | |
| class | Camera |
| Basic GL camera class that uses quaternions for internal rotation. More... | |
| class | TextureRenderTarget |
| An interface enabling render-to-texture using FBO and/or glCopyTexImage depending on hardware extensions. More... | |
| class | FBOTextureRenderTarget |
| An implementation of the TextureRenderTarget that uses FBO (Frame Buffer Objects). Thanks to Rob. More... | |
| class | TextureRectangleFBOTextureRenderTarget |
| A version of the FBO texture render target that doesn't *have* to have npow2 support (for older cards such as GeForce FX 5200). Instead it uses ARB_texture_rectangle. More... | |
| class | CopyTextureRenderTarget |
| An implementation of the TextureRenderTarget that uses glCopyTexSubImage2D and the like; this is intended for hardware that does not support FBO. It is dramatically slower and uglier. More... | |
| class | Log |
| A singleton for maintaining HTML logs. More... | |
| struct | _BitmapChar |
| A structure containing the representation of an individual character. More... | |
| class | Font |
| A class for rendering AngelCode bitmap fonts. More... | |
| struct | Coordinate |
| Basic coordinate unit. More... | |
| class | RefCounter |
| Wrapper class that handles reference counts, and deletes unused items. More... | |
| class | SharedPtr |
| A smart pointer, similar to boost::shared_ptr. More... | |
| class | Singleton |
| Singleton base type. NOT thread safe. More... | |
Namespaces | |
| namespace | Exception |
| Exceptions that Propane Injector may throw. | |
| namespace | Game2D |
| Game engine oriented methods and classes for a 2D game. | |
| namespace | Image |
| Routines and classes that handle image files and image data (textures). | |
| namespace | Input |
| The namespace that is primarily concerned with obtaining input from external input devices, such as joysticks, brain implants and other fun devices. | |
| namespace | Map |
| 3D/2D "map" data that's used to represent game levels. | |
| namespace | Material |
| Stateful changes to the OpenGL pipeline that alter the appearance of vertices rendered after their application. | |
| namespace | Math |
| Classes and methods that provide helpful math functionality. | |
| namespace | Shader |
| Functions and classes that have to do with GLSL support in Propane Injector. | |
Functions | |
| TextureRenderTarget * | getNewTextureRenderTarget (int w, int h) |
| Obtains the specific TextureRenderTarget for your hardware. A factory method that will automatically return a new render target, appropriate for the current hardware. | |
| int | initGL (int screenW, int screenH) |
| Obtain a SDL context, then use this to initialize a 2D OpenGL context. | |
| int | initGL3D (int screenW, int screenH, float fov=75.0f) |
| Obtain a SDL context, then use this to initialize a 3D OpenGL context. | |
| Propane::Coordinate | project (float x, float y, float z) |
| Projects a screen coordinate into OpenGL space based on the current matrices. | |
| Propane::Coordinate | unproject (float x, float y, float z=0.0f) |
| Projects a OpenGL coordinate to screen space based on the current matrices. | |
| int | initSDL (int screenW, int screenH, bool fullscreen=false) |
| Use this to obtain a SDL context. Returns < 0 on failure. | |
| int | initMixer (int rate, int channels) |
| Use this method to initialize the sound driver. Must use before MusicManager. | |
| int | setWindowTitle (char *buf) |
| Set the title of the window holding the SDL context. | |
| int | getMonth () |
| Returns the current month. | |
| int | getYear () |
| Returns the current year. | |
| int | getDay () |
| Returns the current day. | |
| int | getMinute () |
| Returns the current minute [0..59]. | |
| int | getHour () |
| Returns the current hour [0..23]. | |
| std::string | getMODFileTitle (const std::string &filename) |
| Get the 20-byte title from a MOD file. | |
| void | flip () |
| Flip the backbuffer to the display. Equivalent to D3D Present. | |
| bool | hasExtension (char *extensionname) |
| Check for the presence of a named OpenGL extension. Must initialize OpenGL before executing this. | |
| char * | getExtensions () |
| Returns a large string containing the extensions supported on this video card. Must initialize OpenGL before using this. | |
| void | delay (int ms) |
| Delay this thread for a given number of milliseconds. Use this in your inner loop to prevent your game from taking up 100% CPU usage. | |
| float | getNewDelta (bool noOverDeltaCheck=false) |
| Get the delta time value for this frame, and do some light logic. Set the argument to TRUE to eliminate framerate capping (to avoid "warping" on slow PCs). | |
| long | getFPS () |
| Return the FPS (Updated by Propane::getNewDelta). | |
| long | getTicks () |
| Return the number of ticks since program initialization (1 tick = 1 ms). | |
| void | clearScreen () |
| Wipe the screen and replace it with the glClearColor. | |
| void | takeScreenshot (char *filename, int screen_width, int screen_height) |
| Save a picture of the screen to a given file name. | |
| float | getFOVForResolution (int width, int height) |
| Gets the ideal horizontal FOV for a given resolution. | |
| void * | getProcedureAddress (const std::string &proc) |
| Gets an address for a function from GL. | |
| void | internalGLErrorCheck (const std::string &file, int line, const std::string &message) |
| Test for a GL error. | |
| template<class T> | |
| std::string | toString (T &o) |
| Cast any object type to a STL string as long as ostringstream supports it. | |
| std::vector< std::string > | tokenizeString (const std::string &str, const std::string &delimiters) |
| int | getMonth () |
| Returns the current month. | |
| int | getDay () |
| Returns the current day. | |
| int | getYear () |
| Returns the current year. | |
| int | getMinute () |
| Returns the current minute [0..59]. | |
| int | getHour () |
| Returns the current hour [0..23]. | |
|
|
Wipe the screen and replace it with the glClearColor. Tell OpenGL to clear the depth and colour buffers. This does NOT clear the stencil buffer.
|
|
|
Delay this thread for a given number of milliseconds. Use this in your inner loop to prevent your game from taking up 100% CPU usage. Tells SDL to sleep the current thread for a given number of milliseconds. SDL will probably sleep for *at least* 20ms no matter what you provide.
|
|
|
Flip the backbuffer to the display. Equivalent to D3D Present. Tell SDL to swap the OpenGL backbuffer, incrementing global frame count
|
|
|
Returns the current day. Get the current day number (0 to 30)
|
|
|
Returns the current day. Get the current day number (0 to 30)
|
|
|
Returns a large string containing the extensions supported on this video card. Must initialize OpenGL before using this. Returns a string listing all of the OpenGL extensions, space delimited
|
|
||||||||||||
|
Gets the ideal horizontal FOV for a given resolution. Returns a FOV value for gluPerspective that is useful for our needs based on the screen resolution; for example, 16:10 displays will require a wider FOV than a 4:3 screen. It even supports portrait displays.
|
|
|
Return the FPS (Updated by Propane::getNewDelta). Get the FPS from the internal counter. Call getNewDelta to update your FPS counter
|
|
|
Returns the current hour [0..23]. Get the current hour (0 to 23)
|
|
|
Returns the current hour [0..23]. Get the current hour (0 to 23)
|
|
|
Returns the current minute [0..59]. Get the current minute (0 to 59)
|
|
|
Returns the current minute [0..59]. Get the current minute (0 to 59)
|
|
|
Returns the current month. Get the current month number (1 to 12)
|
|
|
Returns the current month. Get the current month number (1 to 12)
|
|
|
Get the delta time value for this frame, and do some light logic. Set the argument to TRUE to eliminate framerate capping (to avoid "warping" on slow PCs). Performs delta time calculations, and returns the delta from the previous frame. Updates the FPS counter and frame counters, as well as the internal delta variables _PI_OldDelta and _PI_OldStart. This function should be called each frame. By default, this function will clamp the delta to 0.150f if it is too big; this is so that if your player has a slow computer things will not make enormous jumps (potentially through walls). To disable this behaviour, pass TRUE to disableOver.
|
|
||||||||||||
|
Obtains the specific TextureRenderTarget for your hardware. A factory method that will automatically return a new render target, appropriate for the current hardware. As of this release it supports three targets:
|
|
|
Gets an address for a function from GL. Returns the address of a given procedure using SDL's GL support. Useful if you're on Windows and need the address of, well, any procedure made in the last 10 years. Generally used to get the function pointers to OpenGL extensions, though you might also need to use this if you are loading the GL library at runtime using something like SDL_GL_LoadLibrary.
|
|
|
Return the number of ticks since program initialization (1 tick = 1 ms). Get the number of 'ticks' (milliseconds) since program initialization.
|
|
|
Returns the current year. Get the current year in 4-digit form (1900 to ????)
|
|
|
Returns the current year. Get the current year in 4-digit form (1900 to ????)
|
|
|
Check for the presence of a named OpenGL extension. Must initialize OpenGL before executing this. Checks if OpenGL supports the given extension name, using Propane::getExtensions
|
|
||||||||||||
|
Obtain a SDL context, then use this to initialize a 2D OpenGL context. Initialize a 2D (orthogonal) OpenGL context with the given width and height for viewport. Uses gluOrtho2D. Automatically enables: textures, smooth shading model, blending, nicest perspective correction, LEQUAL depth function, 1.0f clear depth, black clear colour, SDL style coordinate system (y positive = down)
|
|
||||||||||||||||
|
Obtain a SDL context, then use this to initialize a 3D OpenGL context. Initializes a 3D (perspective) OpenGL context, with a given width, height and Field of View (fov) Defines the perspective with the field of view, default ratio of width:height, NEARPLANE and FARPLANE clipping planes, smooth shading model, no lighting, LEQUAL depth function, textures, blending, nicest perspective correction, light gray clear colour.
|
|
||||||||||||
|
Use this method to initialize the sound driver. Must use before MusicManager. Initializes SDL_mixer. Starts with AUDIO_S16SYS, 1024 buffer size.
|
|
||||||||||||||||
|
Use this to obtain a SDL context. Returns < 0 on failure. Initializes SDL. You must do this before initializing OpenGL, always. Sets SDL_OPENGL, SDL_ANYFORMAT, SDL_GL_DOUBLEBUFFER, enables Unicode and sets the window caption to "Propane Injector" by default. Initializes SDL_INIT_EVERYTHING.
|
|
||||||||||||||||
|
Projects a screen coordinate into OpenGL space based on the current matrices. Use gluProject to turn a world coordinate into a screen coordinate. Useful for reverse picking (such as target indicators, etc)
|
|
|
Set the title of the window holding the SDL context. Use SDL to set the window title for your application. Does not support setting icons.
|
|
||||||||||||||||
|
Save a picture of the screen to a given file name. Save a BMP screenshot of the current window contents to filename, with the given width and height of the viewport. Endian-independent.
|
|
||||||||||||
|
Splits a string into many tokens depending on delimiters. For example, handing "key=value hello xyz" to the machine with the delimeters "= " will produce ["key", "value", "hello", "xyz"]
|
|
||||||||||||||||
|
Projects a OpenGL coordinate to screen space based on the current matrices. Uses gluUnProject to turn a screen coordinate into a world coordinate. Useful for picking.
|
1.4.6