Skip to content
/ esAux7 Public

An OpenGL ES 1.1 framework for rendering Vertex Colors.

License

Notifications You must be signed in to change notification settings

mrbid/esAux7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An OpenGL ES 1.1 framework for rendering Vertex Colors

This code will operate on pretty much any device including web browsers using Emscripten.

I prefer to use GLFW to render OpenGL graphics to a window, but SDL is not bad too and includes more than just a graphics and input subsystem, such as an audio subsystem too.

The code includes the PLY to C Header File conversion utilities PTO and PTF, the simplified render esAux7.h, and a concise Matrix & Vector library although I recommend that you write most vector and matrix operations in-line and not to use external helper functions where reasonable as using canned functions can easily lead to oversights that lead to inefficiencies. Don't rely on canned functions all the time!

⚠️ Be weary of using esRand() as it uses the modulo operator and that tends to not function the same across different platforms, for example using this function with Emscripten will lead to overruns by 1, e.g esRand(3, 6) will return 3-7 in WASM and 3-6 on Linux and Windows. Stick to using esRandFloat() and casting back to integer or fRand() in vec.h.

The fastest random functions for real-time usage are in vec.h with srandf() (seed rand), randf() (0-1), randfc() (-1 to +1), randfn() (normal distribution).