- my past OpenGL wrongdogins
- my JOLT Physics wrongdoings
hi stranger. welcome to my saloon in the middle of nowhere in this empty, digital wasteland. knowing its width and boredom of it, it still startles me how does anyone get stumbling across this place. well now that you're here, why not take a look? what it will be, just spit it and i'll give it, let's have fun until our ways split up again.
on the left side, there is a list of all available notes. manipulation is as simple as it gets, just click through them. enjoy.
.my past OpenGL wrongdoings
history will repeat without looking back or something like thattttt
Following is a list of bugs i lost more hair over than i should have, and so i am leaving this on here both for me and any other sad soul that is condemned to debug an OpenGL app... some of these are elementary, other more specific, it's just a mix as i went and learned.
- glDrawElementsInstanced: wrong element type. i had unsigned short instead of unsigned int.
- attribPointer: usual misconception, so lets get this straight: stride is a size of a whole Vertex, offset is only for the particular attribute you are setting. also, watch out for the correct layout setting in shader (and is the correct one even used?)
- standard X / Y / Z is different in OpenGL where by convention it is X / Z / Y
- GLSL shader's are prone to misstype variables. look out for writing down *.0 to numbers when doing operations with numbers expected to be float/double: so instead of `float x = otherFloat / 2`(wrong) do `float x = otherFloat / 2.0`.
- not all vendors provide a default .vert shader. ALWAYS define a .vert shader, even the most trivial. the same applicaton (without .vert defined) was running okay on my NVIDIA card but failed miserably (and very invisibly) on on-board Intel card.
- skybox: always do them of size 2.0. (vertices at +- 1.0f) and turn the glDepthMask off (`glDepthMask(false)`).. (with some insightful nudging of glDepthFunc it's up to you to decide whether to render it first or last). i incorrectly tried to wrap my whole large terrain (also, the terrain was dynamically LOD-ed using tessellation shaders) with that skybox, but the floating point inprecision kicked in and produced an ugly artifacts in places where my skybox with the terrain met.
- too small nearplane for projection matrix. 0.01f produced ugly artifacts at my distant LOD tessellated terrain.
.my past JOLT Physics wrongdoings
I was talking shit about debugging OpenGL. and then i got hit with implementning Jolt. don't get me wrong, im a big fan, but the learning curve is just ughhhhh...
- when defining a body settings, materialsIndices and materials are reqired (even though having nullptr as default in documentation and having no mention about it). otherwise: SIGSEGV.
- be wary about keeping created interfaces that have to be user-defined and used to define a physics_system in scope - use the new() and keep the pointer
- visualize your hitboxes - they may overlap and thus work incorrectly.
- i was initializing a terrain body as a HeightFieldShape: be super-catious about the sizes (inSampleCount*inSampleCount <-> inSamples.size()) you provide through body settings. if the inSampleCount does not fit, you must've quit (SIGSEGV)