mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 21:36:13 +01:00
Add sRgbCapable field to sfContextSettings
This commit is contained in:
1 parent
2e47e5dbda
commit
aed28415ed
2 files changed
+4
-1
No files matched your search
@@ -75,6 +75,7 @@ typedef struct
|
|||||||
unsigned int majorVersion; ///< Major number of the context version to create
|
unsigned int majorVersion; ///< Major number of the context version to create
|
||||||
unsigned int minorVersion; ///< Minor 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
|
sfUint32 attributeFlags; ///< The attribute flags to create the context with
|
||||||
|
sfBool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
|
||||||
} sfContextSettings;
|
} sfContextSettings;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace priv
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
sfContextSettings sfContextSettings_null()
|
sfContextSettings sfContextSettings_null()
|
||||||
{
|
{
|
||||||
sfContextSettings settings = {0, 0, 0, 0, 0, 0};
|
sfContextSettings settings = {0, 0, 0, 0, 0, 0, sfFalse};
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
@@ -48,6 +48,7 @@ void sfContextSettings_readFromCpp(const sf::ContextSettings& from, sfContextSet
|
|||||||
to.majorVersion = from.majorVersion;
|
to.majorVersion = from.majorVersion;
|
||||||
to.minorVersion = from.minorVersion;
|
to.minorVersion = from.minorVersion;
|
||||||
to.attributeFlags = from.attributeFlags;
|
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.majorVersion = from.majorVersion;
|
||||||
to.minorVersion = from.minorVersion;
|
to.minorVersion = from.minorVersion;
|
||||||
to.attributeFlags = from.attributeFlags;
|
to.attributeFlags = from.attributeFlags;
|
||||||
|
to.sRgbCapable = from.sRgbCapable == sfTrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
Reference in new issue
Block a user