float rainbow;
float speed = 3;
rainbow += speed;
if (rainbow > 1.f) rainbow = 0.f;
for (int i = 0; i < 860; i++)
{
float hue = (1.f / (float)860) * i;
hue -= rainbow;
if (hue < 0.f) hue += 1.f;
ImColor cRainbow = ImColor::HSV(hue, 1.f, 1.f);
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(pos.x, pos.y), ImVec2(pos.x + 860, pos.y + 5), cRainbow);
}
drawing a static red line
Please look here for what im trying to get
https://i.gyazo.com/1d61987648b6fbb6ffce0b9e14fb65ed.png
Ocornut dont waste your time helping this paster
I can鈥檛 help indeed, this is a general programming problem, the bug is under your nose and has nothing to do with imgui, it would be a good habit to learn to solve the problem yourself.
Most helpful comment
I can鈥檛 help indeed, this is a general programming problem, the bug is under your nose and has nothing to do with imgui, it would be a good habit to learn to solve the problem yourself.