mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
fix: Rendering on macOS being broken
This commit is contained in:
@@ -492,7 +492,7 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid
|
||||
if (useFontShaders)
|
||||
Gamma = 1.0f;
|
||||
else
|
||||
Gamma = -1.0f;
|
||||
Gamma = 0.0f;
|
||||
// IMHEX PATCH END
|
||||
const float ortho_projection[4][4] =
|
||||
{
|
||||
@@ -936,7 +936,7 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
|
||||
"{\n"
|
||||
// IMHEX PATCH BEGIN
|
||||
" float Gamma = Frag_mat[0][2];\n"
|
||||
" if (Gamma <= 0.0)\n"
|
||||
" if (Gamma <= 0.0001)\n"
|
||||
// IMHEX PATCH END
|
||||
" Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
|
||||
// IMHEX PATCH BEGIN
|
||||
|
||||
@@ -7,14 +7,15 @@ namespace hex::fonts {
|
||||
class AntialiasPicker : public ContentRegistry::Settings::Widgets::DropDown {
|
||||
public:
|
||||
AntialiasPicker() : DropDown(
|
||||
#if defined(OS_WEB)
|
||||
// Only allow subpixel rendering on Windows and Linux
|
||||
#if defined(OS_WINDOWS) || defined(OS_LINUX)
|
||||
std::vector<UnlocalizedString>({"hex.fonts.setting.font.antialias_none", "hex.fonts.setting.font.antialias_grayscale", "hex.fonts.setting.font.antialias_subpixel"}),
|
||||
std::vector<nlohmann::json>({"none", "grayscale" , "subpixel"}),
|
||||
nlohmann::json("subpixel")
|
||||
#else
|
||||
std::vector<UnlocalizedString>({"hex.fonts.setting.font.antialias_none", "hex.fonts.setting.font.antialias_grayscale"}),
|
||||
std::vector<nlohmann::json>({"none", "grayscale"}),
|
||||
nlohmann::json("grayscale")
|
||||
#else
|
||||
std::vector<UnlocalizedString>({"hex.fonts.setting.font.antialias_none", "hex.fonts.setting.font.antialias_grayscale", "hex.fonts.setting.font.antialias_subpixel"}),
|
||||
std::vector<nlohmann::json>({"none", "grayscale" , "subpixel"}),
|
||||
nlohmann::json("subpixel")
|
||||
#endif
|
||||
){}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user