getSignature() returns an object which means expression like:
className = it->getSignature().mPlayerClassName;
assigns a temporary object to className that does not outlive the statement.
Having className a string view such code leads to a dangling pointer.
Return a reference from getSignature to save on redundant copying.
Change getSignature implementation to make it visible that it finds a maximum
element.
Do not call getSignature multiple times when possible to avoid seaching for the
same max element multiple times.
DebugCustomDraw owns the vector of drawcalls and the line geometry.
There are two DebugCustomDraw, so anything they own is double buffered.
Because DebugDrawer has a ref_ptr on the DebugCustomDraw, they live at least as long as DebugDrawer, making memory access from it safe.
removed redundent this
To avoid warnings like following after clang-format applied:
apps/launcher/utils/profilescombobox.cpp:85:9: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
emit(signalProfileChanged(mOldProfile, currentText()));
^
apps/launcher/utils/profilescombobox.cpp:82:5: note: previous statement is here
if (index == -1)
^
toUtf8 returns a string view to the input when input string is ASCII and nothing
is written to the buffer which means output string of Reader::getStringImpl is
not modified.
Move input to the output string and resize it in this case.
remove debug draw shader, now that debug and debugdraw serve the same function
remove debug draw code from actors to clean
replaced int uniforms with bool for better readability
clang format
cleanup, remove unused func, and mistake whitespace
fix namespace
added more colors
fixed missing whitespace
renamed files
roundabout way to change case with windows noticing
fixed type
fix filename in cmakelist.txt
ported shader and c++ code so glsl 120 can be used instead of 330
new debug shader and old one are almost unified
for some reason, even though I get no compilation issue, old debug draws don't work, only the new one implemented by this MR
remove useless const cast
changes when the buffers are reset -> at the end of the draw, because that's when we are certain the data isn't needed anymore
removed useless variable
fixed typo
include osg::vec3 instead of osg vec3f
compile linux
compile ?
applied clang format to the new files
Moved debug draw to components, fixed some whitespace issues, added include guard
fixed uniform name, removed old files
Fixes some more whitespace weirdness
lines need the same synchronisation system as the other primitives
This two points are there because if I resize to 0 it crashes, si I need a pice of line at 0.,0.,0. so there is no crash.Not ideal
Lines are colored
didn't commit updated shader file
remove include to non existing file
Actors code displays different ways to use debug draw
oups, forgot to remove parameter in function
fix include case sensitivity
Jopefully fixes all linux issues
moves some code pieces, and the debug draw now has a group node to have different types of objects to draw