Clang Vector Extension support

This commit is contained in:
Jon Daniel 2024-11-10 09:18:58 +01:00
commit 51f336d2ec

View file

@ -3722,7 +3722,7 @@ int GuiColorPicker(Rectangle bounds, const char *text, Color *color)
// NOTE: this conversion can cause low hue-resolution, if the r, g and b value are very similar, which causes the hue bar to shift around when only the GuiColorPanel is used.
Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ (*color).r/255.0f, (*color).g/255.0f, (*color).b/255.0f });
GuiColorBarHue(boundsHue, NULL, &hsv.x);
GuiColorBarHue(boundsHue, NULL, (float*)&hsv);
//color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f);
Vector3 rgb = ConvertHSVtoRGB(hsv);
@ -3756,7 +3756,7 @@ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv)
const Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height };
GuiColorBarHue(boundsHue, NULL, &colorHsv->x);
GuiColorBarHue(boundsHue, NULL, (float*)&colorHsv);
return result;
}
@ -5718,4 +5718,4 @@ static int GetCodepointNext(const char *text, int *codepointSize)
}
#endif // RAYGUI_STANDALONE
#endif // RAYGUI_IMPLEMENTATION
#endif // RAYGUI_IMPLEMENTATION