ObjLibrary
.
SpriteFont
class for drawing text on the screen using a sprite font (a.k.a. a font sheet). Oddly, Wikipedia doesn't have a page on this.
static
variables and functions.#include
the OpenGL and FreeGLUT libraries:
#include
different headers based on your system. If you find a system that it doesn't work on, and you know how the #include
s should be, please tell me.#include
s that appear in some files.double
elements:
TODO: Shader rendering example program
TODO: More example programs?
TODO: Make a page for each program?
TODO: Better documentation. A page?
zlib
and png
, and 2 files named glpng.c
and glpng.h
. These should be on the same folder level as the ObjLibrary folder. zlib
and png
libraries. ObjLibrary/ObjSettings.h
file, uncomment the line that says
#define OBJ_LIBRARY_LOAD_PNG_TEXTURES
glm
to the ObjLibrary
glm
(OpenGL Mathematics) is a math library designed to resemble GLSL, the OpenGL shader language.glm
. Inside that, there will be more files and folders, including another folder named glm
. Copy the inner glm
folder in with your code files on the same level as the ObjLibrary
folder. Everything else in the outer glm
folder is fluff, and you can delete it. glm
library only contains header files, and they are so heavily templated that they are unreadable to humans. It may be a waste of time to added them to Visual Studio. If you want to, however, you probably should Visual Studio "folders" to correspond to the glm
folder and its subfolders. ObjLibrary/ObjSettings.h
file, uncomment the line that says
#define OBJ_LIBRARY_GLM_INTERACTION
glm::vec2
s to Vector2
s and glm::vec3
to Vector3
s automatically. However, the reverse is not true (due to template issues). To convert to glm::vec2
s and glm::vec3
s, you will need explicit typecasts:
glm::vec2 ones2 = (glm::vec2)(Vector2::ONE); glm::vec3 ones3 = (glm::vec2)(Vector3::ONE);
ObjLibrary
folder, and 4 files named GetGlutWithShaders.h
, gl3w.h
, gl3w.c
, and glcorearb.h
. These should be on the same folder level as the ObjLibrary folder. ObjLibrary
folder in your Visual Studio "folder" of the same name. ObjLibrary/ObjSettings.h
file, uncomment the line that says
#define OBJ_LIBRARY_SHADER_DISPLAY
glm
interaction, as explained above.TODO: A page or subsection for each?