Replaced the P-Buffer implementation of RenderImage with a generic "in-memory context" one
This commit is contained in:
parent
3acacc8049
commit
92f70b32e9
23 changed files with 386 additions and 1103 deletions
|
@ -177,20 +177,6 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
const Image& GetImage() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check whether the system supports render images or not
|
||||
///
|
||||
/// It is very important to always call this function before
|
||||
/// trying to use the RenderImage class, as the feature may not
|
||||
/// be supported on all platforms (especially very old ones).
|
||||
/// If this function returns false, then you won't be able
|
||||
/// to use the class at all.
|
||||
///
|
||||
/// \return True if the RenderImage class can be used
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
static bool IsAvailable();
|
||||
|
||||
private :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.hpp>
|
||||
#include <SFML/Window/GlResource.hpp>
|
||||
#include <SFML/Window/ContextSettings.hpp>
|
||||
#include <SFML/System/NonCopyable.hpp>
|
||||
|
||||
|
||||
|
@ -69,8 +70,25 @@ public :
|
|||
///
|
||||
/// \param active True to activate, false to deactivate
|
||||
///
|
||||
/// \return True on success, false on failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void SetActive(bool active);
|
||||
bool SetActive(bool active);
|
||||
|
||||
public :
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a in-memory context
|
||||
///
|
||||
/// This constructor is for internal use, you don't need
|
||||
/// to bother with it.
|
||||
///
|
||||
/// \param settings Creation parameters
|
||||
/// \param width Back buffer width
|
||||
/// \param height Back buffer height
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
Context(const ContextSettings& settings, unsigned int width, unsigned int height);
|
||||
|
||||
private :
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ struct ContextSettings
|
|||
/// \param minor Minor number of the context version
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
explicit ContextSettings(unsigned int depth = 24, unsigned int stencil = 8, unsigned int antialiasing = 0, unsigned int major = 2, unsigned int minor = 0) :
|
||||
explicit ContextSettings(unsigned int depth = 0, unsigned int stencil = 0, unsigned int antialiasing = 0, unsigned int major = 2, unsigned int minor = 0) :
|
||||
DepthBits (depth),
|
||||
StencilBits (stencil),
|
||||
AntialiasingLevel(antialiasing),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue