Add sRgbCapable field to sfContextSettings

This commit is contained in:
Mika Attila committed 2016-10-31 14:05:21 +01:00
1 parent 2e47e5dbda
commit aed28415ed
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -75,6 +75,7 @@ typedef struct
unsigned int majorVersion; ///< Major number of the context version to create
unsigned int minorVersion; ///< Minor number of the context version to create
sfUint32 attributeFlags; ///< The attribute flags to create the context with
sfBool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
} sfContextSettings;
+3 -1
View File
@@ -33,7 +33,7 @@ namespace priv
////////////////////////////////////////////////////////////
sfContextSettings sfContextSettings_null()
{
sfContextSettings settings = {0, 0, 0, 0, 0, 0};
sfContextSettings settings = {0, 0, 0, 0, 0, 0, sfFalse};
return settings;
}
@@ -48,6 +48,7 @@ void sfContextSettings_readFromCpp(const sf::ContextSettings& from, sfContextSet
to.majorVersion = from.majorVersion;
to.minorVersion = from.minorVersion;
to.attributeFlags = from.attributeFlags;
to.sRgbCapable = from.sRgbCapable ? sfTrue : sfFalse;
}
@@ -60,6 +61,7 @@ void sfContextSettings_writeToCpp(const sfContextSettings& from, sf::ContextSett
to.majorVersion = from.majorVersion;
to.minorVersion = from.minorVersion;
to.attributeFlags = from.attributeFlags;
to.sRgbCapable = from.sRgbCapable == sfTrue;
}
} // namespace priv