Skip to content

bmswgnp/OpenGL-SDL-Code-Warehouse

 
 

Repository files navigation

I'm putting this code out in the public domain. You are free to use this code in your projects.

FPSLimit.hpp and cpp is a class that sets a framerate limit on an SDL program. It's pretty simple to use.

SDLGLTexture.hpp and cpp are functions that will load textures from a file into OpenGL. You need SDL and SDL_image in order to use it.

SDLGLFont.cpp and hpp contains a class that acts as a bitmap font. I've attached a sample font I created as well. I know that GLUT has a function for a bitmap font, but sometimes it's convenient not to link GLUT into your program, so this serves as a lightweight bitmap font system in its replacement. This file depends on SDLGLTexture.hpp and cpp to do its loading.

This code is available at GitHub under the repository OpenGL-SDL-Code-Warehouse.

FPSLimit.cpp - CPP file for a frame rate limiter class.
FPSLimit.hpp - Header file for a frame rate limiter class.
SDLGLFont.cpp - CPP file for an SDL/OpenGL bitmap font class, ready to use.
SDLGLFont.hpp - Header file.
SDLGLTexture.cpp - CPP file for an assortment of SDL/OpenGL texture functions.
SDLGLTexture.hpp - Header file.
font.png - A ready-made bitmap font you can use with SDLGLFont.hpp/cpp.

About

A random assortment of ready-to-use OpenGL/SDL classes and functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%