Skip to content

Few Windows-specific fixes for Cogl

Chun-wei Fan requested to merge cogl.windows.fixes into cogl-1.22

Hi,

This MR is intended to fix some of the problems that pop up here and there when running Cogl on Windows, including:

-SDL2 rendering backend crashes on 32-bit Windows as we are not using the correct calling convention when querying Windows GL functions

-Loads of WaitForObjectEx failed spewed from GLib when running the x64 version of the cogl-crate example program on 64-bit Windows

-Update cogl-bitmask.h to avoid C4311/C4312 warnings (64-bit <->32-bit compatibility warnings that should raise alarm, due to likelihood of crashing as pointers are of the wrong sizes)

-Dynamically construct localedir for Cogl (like in GLib et al), instead of hard-coding it as COGL_LOCALEDIR

-Decorate _cogl_debug_instances in cogl-debug.h with __declspec(dllexport) [when building] and __declspec(dllimport) [when using], as that variable is referenced in Cogl-Path. Without doing so, Cogl-Path programs will crash.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports