Simplify in-class initializer expressions
This commit is contained in:
parent
259b57d9b9
commit
9a4426fb35
@ -95,9 +95,9 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
std::uint8_t r{0}; //!< Red component
|
std::uint8_t r{}; //!< Red component
|
||||||
std::uint8_t g{0}; //!< Green component
|
std::uint8_t g{}; //!< Green component
|
||||||
std::uint8_t b{0}; //!< Blue component
|
std::uint8_t b{}; //!< Blue component
|
||||||
std::uint8_t a{255}; //!< Alpha (opacity) component
|
std::uint8_t a{255}; //!< Alpha (opacity) component
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -339,9 +339,9 @@ private:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int width{0}; //!< Current width of the row
|
unsigned int width{}; //!< Current width of the row
|
||||||
unsigned int top; //!< Y position of the row into the texture
|
unsigned int top; //!< Y position of the row into the texture
|
||||||
unsigned int height; //!< Height of the row
|
unsigned int height; //!< Height of the row
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -144,8 +144,8 @@ struct Vector4
|
|||||||
copyVector(color, *this);
|
copyVector(color, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
T x{0}; //!< 1st component (X) of the 4D vector
|
T x{}; //!< 1st component (X) of the 4D vector
|
||||||
T y{0}; //!< 2nd component (Y) of the 4D vector
|
T y{}; //!< 2nd component (Y) of the 4D vector
|
||||||
T z{0}; //!< 3rd component (Z) of the 4D vector
|
T z{}; //!< 3rd component (Z) of the 4D vector
|
||||||
T w{0}; //!< 4th component (W) of the 4D vector
|
T w{}; //!< 4th component (W) of the 4D vector
|
||||||
};
|
};
|
||||||
|
@ -44,9 +44,9 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
float advance{0}; //!< Offset to move horizontally to the next character
|
float advance{}; //!< Offset to move horizontally to the next character
|
||||||
int lsbDelta{0}; //!< Left offset after forced autohint. Internally used by getKerning()
|
int lsbDelta{}; //!< Left offset after forced autohint. Internally used by getKerning()
|
||||||
int rsbDelta{0}; //!< Right offset after forced autohint. Internally used by getKerning()
|
int rsbDelta{}; //!< Right offset after forced autohint. Internally used by getKerning()
|
||||||
FloatRect bounds; //!< Bounding rectangle of the glyph, in coordinates relative to the baseline
|
FloatRect bounds; //!< Bounding rectangle of the glyph, in coordinates relative to the baseline
|
||||||
IntRect textureRect; //!< Texture coordinates of the glyph inside the font's texture
|
IntRect textureRect; //!< Texture coordinates of the glyph inside the font's texture
|
||||||
};
|
};
|
||||||
|
@ -127,10 +127,10 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
T left{0}; //!< Left coordinate of the rectangle
|
T left{}; //!< Left coordinate of the rectangle
|
||||||
T top{0}; //!< Top coordinate of the rectangle
|
T top{}; //!< Top coordinate of the rectangle
|
||||||
T width{0}; //!< Width of the rectangle
|
T width{}; //!< Width of the rectangle
|
||||||
T height{0}; //!< Height of the rectangle
|
T height{}; //!< Height of the rectangle
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -113,8 +113,8 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
BlendMode blendMode{BlendAlpha}; //!< Blending mode
|
BlendMode blendMode{BlendAlpha}; //!< Blending mode
|
||||||
Transform transform; //!< Transform
|
Transform transform; //!< Transform
|
||||||
const Texture* texture{nullptr}; //!< Texture
|
const Texture* texture{}; //!< Texture
|
||||||
const Shader* shader{nullptr}; //!< Shader
|
const Shader* shader{}; //!< Shader
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -485,7 +485,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool enable; //!< Is the cache enabled?
|
bool enable; //!< Is the cache enabled?
|
||||||
bool glStatesSet{false}; //!< Are our internal GL states set yet?
|
bool glStatesSet{}; //!< Are our internal GL states set yet?
|
||||||
bool viewChanged; //!< Has the current view changed since last draw?
|
bool viewChanged; //!< Has the current view changed since last draw?
|
||||||
BlendMode lastBlendMode; //!< Cached blending mode
|
BlendMode lastBlendMode; //!< Cached blending mode
|
||||||
std::uint64_t lastTextureId; //!< Cached texture
|
std::uint64_t lastTextureId; //!< Cached texture
|
||||||
@ -500,7 +500,7 @@ private:
|
|||||||
View m_defaultView; //!< Default view
|
View m_defaultView; //!< Default view
|
||||||
View m_view; //!< Current view
|
View m_view; //!< Current view
|
||||||
StatesCache m_cache; //!< Render states cache
|
StatesCache m_cache; //!< Render states cache
|
||||||
std::uint64_t m_id{0}; //!< Unique number that identifies the RenderTarget
|
std::uint64_t m_id{}; //!< Unique number that identifies the RenderTarget
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -165,7 +165,7 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
unsigned int m_defaultFrameBuffer{0}; //!< Framebuffer to bind when targeting this window
|
unsigned int m_defaultFrameBuffer{}; //!< Framebuffer to bind when targeting this window
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -698,7 +698,7 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
unsigned int m_shaderProgram{0}; //!< OpenGL identifier for the program
|
unsigned int m_shaderProgram{}; //!< OpenGL identifier for the program
|
||||||
int m_currentTexture{-1}; //!< Location of the current texture in the shader
|
int m_currentTexture{-1}; //!< Location of the current texture in the shader
|
||||||
TextureTable m_textures; //!< Texture variables in the shader, mapped to their location
|
TextureTable m_textures; //!< Texture variables in the shader, mapped to their location
|
||||||
UniformTable m_uniforms; //!< Parameters location cache
|
UniformTable m_uniforms; //!< Parameters location cache
|
||||||
|
@ -303,11 +303,11 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
const Texture* m_texture{nullptr}; //!< Texture of the shape
|
const Texture* m_texture{}; //!< Texture of the shape
|
||||||
IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display
|
IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display
|
||||||
Color m_fillColor{Color::White}; //!< Fill color
|
Color m_fillColor{Color::White}; //!< Fill color
|
||||||
Color m_outlineColor{Color::White}; //!< Outline color
|
Color m_outlineColor{Color::White}; //!< Outline color
|
||||||
float m_outlineThickness{0}; //!< Thickness of the shape's outline
|
float m_outlineThickness{}; //!< Thickness of the shape's outline
|
||||||
VertexArray m_vertices{PrimitiveType::TriangleFan}; //!< Vertex array containing the fill geometry
|
VertexArray m_vertices{PrimitiveType::TriangleFan}; //!< Vertex array containing the fill geometry
|
||||||
VertexArray m_outlineVertices{PrimitiveType::TriangleStrip}; //!< Vertex array containing the outline geometry
|
VertexArray m_outlineVertices{PrimitiveType::TriangleStrip}; //!< Vertex array containing the outline geometry
|
||||||
FloatRect m_insideBounds; //!< Bounding rectangle of the inside (fill)
|
FloatRect m_insideBounds; //!< Bounding rectangle of the inside (fill)
|
||||||
|
@ -213,9 +213,9 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Vertex m_vertices[4]; //!< Vertices defining the sprite's geometry
|
Vertex m_vertices[4]; //!< Vertices defining the sprite's geometry
|
||||||
const Texture* m_texture{nullptr}; //!< Texture of the sprite
|
const Texture* m_texture{}; //!< Texture of the sprite
|
||||||
IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display
|
IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -428,7 +428,7 @@ private:
|
|||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
String m_string; //!< String to display
|
String m_string; //!< String to display
|
||||||
const Font* m_font{nullptr}; //!< Font used to display the string
|
const Font* m_font{}; //!< Font used to display the string
|
||||||
unsigned int m_characterSize{30}; //!< Base size of characters, in pixels
|
unsigned int m_characterSize{30}; //!< Base size of characters, in pixels
|
||||||
float m_letterSpacingFactor{1.f}; //!< Spacing factor between letters
|
float m_letterSpacingFactor{1.f}; //!< Spacing factor between letters
|
||||||
float m_lineSpacingFactor{1.f}; //!< Spacing factor between lines
|
float m_lineSpacingFactor{1.f}; //!< Spacing factor between lines
|
||||||
@ -438,9 +438,9 @@ private:
|
|||||||
float m_outlineThickness{0.f}; //!< Thickness of the text's outline
|
float m_outlineThickness{0.f}; //!< Thickness of the text's outline
|
||||||
mutable VertexArray m_vertices{PrimitiveType::Triangles}; //!< Vertex array containing the fill geometry
|
mutable VertexArray m_vertices{PrimitiveType::Triangles}; //!< Vertex array containing the fill geometry
|
||||||
mutable VertexArray m_outlineVertices{PrimitiveType::Triangles}; //!< Vertex array containing the outline geometry
|
mutable VertexArray m_outlineVertices{PrimitiveType::Triangles}; //!< Vertex array containing the outline geometry
|
||||||
mutable FloatRect m_bounds; //!< Bounding rectangle of the text (in local coordinates)
|
mutable FloatRect m_bounds; //!< Bounding rectangle of the text (in local coordinates)
|
||||||
mutable bool m_geometryNeedUpdate{false}; //!< Does the geometry need to be recomputed?
|
mutable bool m_geometryNeedUpdate{}; //!< Does the geometry need to be recomputed?
|
||||||
mutable std::uint64_t m_fontTextureId{0}; //!< The font texture id
|
mutable std::uint64_t m_fontTextureId{}; //!< The font texture id
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -610,16 +610,16 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Vector2u m_size; //!< Public texture size
|
Vector2u m_size; //!< Public texture size
|
||||||
Vector2u m_actualSize; //!< Actual texture size (can be greater than public size because of padding)
|
Vector2u m_actualSize; //!< Actual texture size (can be greater than public size because of padding)
|
||||||
unsigned int m_texture{0}; //!< Internal texture identifier
|
unsigned int m_texture{}; //!< Internal texture identifier
|
||||||
bool m_isSmooth{false}; //!< Status of the smooth filter
|
bool m_isSmooth{}; //!< Status of the smooth filter
|
||||||
bool m_sRgb{false}; //!< Should the texture source be converted from sRGB?
|
bool m_sRgb{}; //!< Should the texture source be converted from sRGB?
|
||||||
bool m_isRepeated{false}; //!< Is the texture in repeat mode?
|
bool m_isRepeated{}; //!< Is the texture in repeat mode?
|
||||||
mutable bool m_pixelsFlipped{false}; //!< To work around the inconsistency in Y orientation
|
mutable bool m_pixelsFlipped{}; //!< To work around the inconsistency in Y orientation
|
||||||
bool m_fboAttachment{false}; //!< Is this texture owned by a framebuffer object?
|
bool m_fboAttachment{}; //!< Is this texture owned by a framebuffer object?
|
||||||
bool m_hasMipmap{false}; //!< Has the mipmap been generated?
|
bool m_hasMipmap{}; //!< Has the mipmap been generated?
|
||||||
std::uint64_t m_cacheId; //!< Unique number that identifies the texture to the render target's cache
|
std::uint64_t m_cacheId; //!< Unique number that identifies the texture to the render target's cache
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -333,8 +333,8 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
unsigned int m_buffer{0}; //!< Internal buffer identifier
|
unsigned int m_buffer{}; //!< Internal buffer identifier
|
||||||
std::size_t m_size{0}; //!< Size in Vertexes of the currently allocated buffer
|
std::size_t m_size{}; //!< Size in Vertexes of the currently allocated buffer
|
||||||
PrimitiveType m_primitiveType{PrimitiveType::Points}; //!< Type of primitives to draw
|
PrimitiveType m_primitiveType{PrimitiveType::Points}; //!< Type of primitives to draw
|
||||||
Usage m_usage{Stream}; //!< How this vertex buffer is to be used
|
Usage m_usage{Stream}; //!< How this vertex buffer is to be used
|
||||||
};
|
};
|
||||||
|
@ -235,14 +235,14 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Vector2f m_center; //!< Center of the view, in scene coordinates
|
Vector2f m_center; //!< Center of the view, in scene coordinates
|
||||||
Vector2f m_size; //!< Size of the view, in scene coordinates
|
Vector2f m_size; //!< Size of the view, in scene coordinates
|
||||||
Angle m_rotation; //!< Angle of rotation of the view rectangle
|
Angle m_rotation; //!< Angle of rotation of the view rectangle
|
||||||
FloatRect m_viewport{{0, 0}, {1, 1}}; //!< Viewport rectangle, expressed as a factor of the render-target's size
|
FloatRect m_viewport{{0, 0}, {1, 1}}; //!< Viewport rectangle, expressed as a factor of the render-target's size
|
||||||
mutable Transform m_transform; //!< Precomputed projection transform corresponding to the view
|
mutable Transform m_transform; //!< Precomputed projection transform corresponding to the view
|
||||||
mutable Transform m_inverseTransform; //!< Precomputed inverse projection transform corresponding to the view
|
mutable Transform m_inverseTransform; //!< Precomputed inverse projection transform corresponding to the view
|
||||||
mutable bool m_transformUpdated{false}; //!< Internal state telling if the transform needs to be updated
|
mutable bool m_transformUpdated{}; //!< Internal state telling if the transform needs to be updated
|
||||||
mutable bool m_invTransformUpdated{false}; //!< Internal state telling if the inverse transform needs to be updated
|
mutable bool m_invTransformUpdated{}; //!< Internal state telling if the inverse transform needs to be updated
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -328,8 +328,8 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
FieldTable m_fields; //!< Fields of the header
|
FieldTable m_fields; //!< Fields of the header
|
||||||
Status m_status{Status::ConnectionFailed}; //!< Status code
|
Status m_status{Status::ConnectionFailed}; //!< Status code
|
||||||
unsigned int m_majorVersion{0}; //!< Major HTTP version
|
unsigned int m_majorVersion{}; //!< Major HTTP version
|
||||||
unsigned int m_minorVersion{0}; //!< Minor HTTP version
|
unsigned int m_minorVersion{}; //!< Minor HTTP version
|
||||||
std::string m_body; //!< Body of the response
|
std::string m_body; //!< Body of the response
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ private:
|
|||||||
TcpSocket m_connection; //!< Connection to the host
|
TcpSocket m_connection; //!< Connection to the host
|
||||||
std::optional<IpAddress> m_host; //!< Web host address
|
std::optional<IpAddress> m_host; //!< Web host address
|
||||||
std::string m_hostName; //!< Web host name
|
std::string m_hostName; //!< Web host name
|
||||||
unsigned short m_port{0}; //!< Port used for connection with host
|
unsigned short m_port{}; //!< Port used for connection with host
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -432,8 +432,8 @@ private:
|
|||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
std::vector<char> m_data; //!< Data stored in the packet
|
std::vector<char> m_data; //!< Data stored in the packet
|
||||||
std::size_t m_readPos{0}; //!< Current reading position in the packet
|
std::size_t m_readPos{}; //!< Current reading position in the packet
|
||||||
std::size_t m_sendPos{0}; //!< Current send position in the packet (for handling partial sends)
|
std::size_t m_sendPos{}; //!< Current send position in the packet (for handling partial sends)
|
||||||
bool m_isValid{true}; //!< Reading state of the packet
|
bool m_isValid{true}; //!< Reading state of the packet
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -218,9 +218,9 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
struct PendingPacket
|
struct PendingPacket
|
||||||
{
|
{
|
||||||
std::uint32_t Size{0}; //!< Data of packet size
|
std::uint32_t Size{}; //!< Data of packet size
|
||||||
std::size_t SizeReceived{0}; //!< Number of size bytes received so far
|
std::size_t SizeReceived{}; //!< Number of size bytes received so far
|
||||||
std::vector<char> Data; //!< Data of the packet
|
std::vector<char> Data; //!< Data of the packet
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -160,7 +160,7 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
float m_degrees{0}; //!< Angle value stored as degrees
|
float m_degrees{}; //!< Angle value stored as degrees
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -104,9 +104,9 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
const char* m_data{nullptr}; //!< Pointer to the data in memory
|
const char* m_data{}; //!< Pointer to the data in memory
|
||||||
std::int64_t m_size{0}; //!< Total size of the data
|
std::int64_t m_size{}; //!< Total size of the data
|
||||||
std::int64_t m_offset{0}; //!< Current reading position
|
std::int64_t m_offset{}; //!< Current reading position
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -119,7 +119,7 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
std::chrono::microseconds m_microseconds{0}; //!< Time value stored as microseconds
|
std::chrono::microseconds m_microseconds{}; //!< Time value stored as microseconds
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -209,8 +209,8 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
T x{0}; //!< X coordinate of the vector
|
T x{}; //!< X coordinate of the vector
|
||||||
T y{0}; //!< Y coordinate of the vector
|
T y{}; //!< Y coordinate of the vector
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -133,9 +133,9 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
T x{0}; //!< X coordinate of the vector
|
T x{}; //!< X coordinate of the vector
|
||||||
T y{0}; //!< Y coordinate of the vector
|
T y{}; //!< Y coordinate of the vector
|
||||||
T z{0}; //!< Z coordinate of the vector
|
T z{}; //!< Z coordinate of the vector
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -71,8 +71,8 @@ enum Axis
|
|||||||
struct SFML_WINDOW_API Identification
|
struct SFML_WINDOW_API Identification
|
||||||
{
|
{
|
||||||
String name{"No Joystick"}; //!< Name of the joystick
|
String name{"No Joystick"}; //!< Name of the joystick
|
||||||
unsigned int vendorId{0}; //!< Manufacturer identifier
|
unsigned int vendorId{}; //!< Manufacturer identifier
|
||||||
unsigned int productId{0}; //!< Product identifier
|
unsigned int productId{}; //!< Product identifier
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -99,8 +99,8 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Vector2u size; //!< Video mode width and height, in pixels
|
Vector2u size; //!< Video mode width and height, in pixels
|
||||||
unsigned int bitsPerPixel{0}; //!< Video mode pixel depth, in bits per pixels
|
unsigned int bitsPerPixel{}; //!< Video mode pixel depth, in bits per pixels
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -138,14 +138,14 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
std::unordered_map<std::uint64_t, unsigned int> m_frameBuffers; //!< OpenGL frame buffer objects per context
|
std::unordered_map<std::uint64_t, unsigned int> m_frameBuffers; //!< OpenGL frame buffer objects per context
|
||||||
std::unordered_map<std::uint64_t, unsigned int> m_multisampleFrameBuffers; //!< Optional per-context OpenGL frame buffer objects with multisample attachments
|
std::unordered_map<std::uint64_t, unsigned int> m_multisampleFrameBuffers; //!< Optional per-context OpenGL frame buffer objects with multisample attachments
|
||||||
unsigned int m_depthStencilBuffer{0}; //!< Optional depth/stencil buffer attached to the frame buffer
|
unsigned int m_depthStencilBuffer{}; //!< Optional depth/stencil buffer attached to the frame buffer
|
||||||
unsigned int m_colorBuffer{0}; //!< Optional multisample color buffer attached to the frame buffer
|
unsigned int m_colorBuffer{}; //!< Optional multisample color buffer attached to the frame buffer
|
||||||
Vector2u m_size; //!< Width and height of the attachments
|
Vector2u m_size; //!< Width and height of the attachments
|
||||||
std::unique_ptr<Context> m_context; //!< Backup OpenGL context, used when none already exist
|
std::unique_ptr<Context> m_context; //!< Backup OpenGL context, used when none already exist
|
||||||
unsigned int m_textureId{0}; //!< The ID of the texture to attach to the FBO
|
unsigned int m_textureId{}; //!< The ID of the texture to attach to the FBO
|
||||||
bool m_multisample{false}; //!< Whether we have to create a multisample frame buffer as well
|
bool m_multisample{}; //!< Whether we have to create a multisample frame buffer as well
|
||||||
bool m_stencil{false}; //!< Whether we have stencil attachment
|
bool m_stencil{}; //!< Whether we have stencil attachment
|
||||||
bool m_sRgb{false}; //!< Whether we need to encode drawn pixels into sRGB color space
|
bool m_sRgb{}; //!< Whether we need to encode drawn pixels into sRGB color space
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -224,10 +224,10 @@ struct Shader::UniformBinder
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
UniformBinder& operator=(const UniformBinder&) = delete;
|
UniformBinder& operator=(const UniformBinder&) = delete;
|
||||||
|
|
||||||
TransientContextLock lock; //!< Lock to keep context active while uniform is bound
|
TransientContextLock lock; //!< Lock to keep context active while uniform is bound
|
||||||
GLEXT_GLhandle savedProgram{0}; //!< Handle to the previously active program object
|
GLEXT_GLhandle savedProgram{}; //!< Handle to the previously active program object
|
||||||
GLEXT_GLhandle currentProgram; //!< Handle to the program object of the modified sf::Shader instance
|
GLEXT_GLhandle currentProgram; //!< Handle to the program object of the modified sf::Shader instance
|
||||||
GLint location{-1}; //!< Uniform location, used by the surrounding sf::Shader code
|
GLint location{-1}; //!< Uniform location, used by the surrounding sf::Shader code
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -232,9 +232,9 @@ private:
|
|||||||
static int getUnicode(AInputEvent* event);
|
static int getUnicode(AInputEvent* event);
|
||||||
|
|
||||||
Vector2u m_size;
|
Vector2u m_size;
|
||||||
bool m_windowBeingCreated{false};
|
bool m_windowBeingCreated{};
|
||||||
bool m_windowBeingDestroyed{false};
|
bool m_windowBeingDestroyed{};
|
||||||
bool m_hasFocus{false};
|
bool m_hasFocus{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -272,7 +272,7 @@ int findDrmDevice(drmModeResPtr& resources)
|
|||||||
{
|
{
|
||||||
static const int maxDrmDevices = 64;
|
static const int maxDrmDevices = 64;
|
||||||
|
|
||||||
drmDevicePtr devices[maxDrmDevices] = {nullptr};
|
drmDevicePtr devices[maxDrmDevices] = {};
|
||||||
|
|
||||||
const int numDevices = drmGetDevices2(0, devices, maxDrmDevices);
|
const int numDevices = drmGetDevices2(0, devices, maxDrmDevices);
|
||||||
if (numDevices < 0)
|
if (numDevices < 0)
|
||||||
|
@ -201,14 +201,14 @@ private:
|
|||||||
EGLDisplay m_display{EGL_NO_DISPLAY}; ///< The internal EGL display
|
EGLDisplay m_display{EGL_NO_DISPLAY}; ///< The internal EGL display
|
||||||
EGLContext m_context{EGL_NO_CONTEXT}; ///< The internal EGL context
|
EGLContext m_context{EGL_NO_CONTEXT}; ///< The internal EGL context
|
||||||
EGLSurface m_surface{EGL_NO_SURFACE}; ///< The internal EGL surface
|
EGLSurface m_surface{EGL_NO_SURFACE}; ///< The internal EGL surface
|
||||||
EGLConfig m_config{nullptr}; ///< The internal EGL config
|
EGLConfig m_config{}; ///< The internal EGL config
|
||||||
|
|
||||||
gbm_bo* m_currentBO{nullptr};
|
gbm_bo* m_currentBO{};
|
||||||
gbm_bo* m_nextBO{nullptr};
|
gbm_bo* m_nextBO{};
|
||||||
gbm_surface* m_gbmSurface{nullptr};
|
gbm_surface* m_gbmSurface{};
|
||||||
Vector2u m_size;
|
Vector2u m_size;
|
||||||
bool m_shown{false};
|
bool m_shown{};
|
||||||
bool m_scanOut{false};
|
bool m_scanOut{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -190,7 +190,7 @@ private:
|
|||||||
EGLDisplay m_display{EGL_NO_DISPLAY}; //!< The internal EGL display
|
EGLDisplay m_display{EGL_NO_DISPLAY}; //!< The internal EGL display
|
||||||
EGLContext m_context{EGL_NO_CONTEXT}; //!< The internal EGL context
|
EGLContext m_context{EGL_NO_CONTEXT}; //!< The internal EGL context
|
||||||
EGLSurface m_surface{EGL_NO_SURFACE}; //!< The internal EGL surface
|
EGLSurface m_surface{EGL_NO_SURFACE}; //!< The internal EGL surface
|
||||||
EGLConfig m_config{nullptr}; //!< The internal EGL config
|
EGLConfig m_config{}; //!< The internal EGL config
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -42,7 +42,7 @@ namespace priv
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
struct JoystickCaps
|
struct JoystickCaps
|
||||||
{
|
{
|
||||||
unsigned int buttonCount{0}; //!< Number of buttons supported by the joystick
|
unsigned int buttonCount{}; //!< Number of buttons supported by the joystick
|
||||||
bool axes[Joystick::AxisCount]{}; //!< Support for each axis
|
bool axes[Joystick::AxisCount]{}; //!< Support for each axis
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ struct JoystickCaps
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
struct JoystickState
|
struct JoystickState
|
||||||
{
|
{
|
||||||
bool connected{false}; //!< Is the joystick currently connected?
|
bool connected{}; //!< Is the joystick currently connected?
|
||||||
float axes[Joystick::AxisCount]{}; //!< Position of each axis, in range [-100, 100]
|
float axes[Joystick::AxisCount]{}; //!< Position of each axis, in range [-100, 100]
|
||||||
bool buttons[Joystick::ButtonCount]{}; //!< Status of each button (true = pressed)
|
bool buttons[Joystick::ButtonCount]{}; //!< Status of each button (true = pressed)
|
||||||
};
|
};
|
||||||
|
@ -219,10 +219,10 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool m_isValid{true}; ///< If any error occurs this variable is false
|
bool m_isValid{true}; ///< If any error occurs this variable is false
|
||||||
CFDataRef m_layoutData{0}; ///< CFData containing the layout
|
CFDataRef m_layoutData{}; ///< CFData containing the layout
|
||||||
UCKeyboardLayout* m_layout{nullptr}; ///< Current Keyboard Layout
|
UCKeyboardLayout* m_layout{}; ///< Current Keyboard Layout
|
||||||
IOHIDManagerRef m_manager{0}; ///< HID Manager
|
IOHIDManagerRef m_manager{}; ///< HID Manager
|
||||||
|
|
||||||
IOHIDElements m_keys[Keyboard::KeyCount]; ///< All the keys on any connected keyboard
|
IOHIDElements m_keys[Keyboard::KeyCount]; ///< All the keys on any connected keyboard
|
||||||
|
|
||||||
|
@ -122,8 +122,8 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
IOHIDManagerRef m_manager{0}; ///< HID Manager
|
IOHIDManagerRef m_manager{}; ///< HID Manager
|
||||||
unsigned int m_joystickCount{0}; ///< Number of joysticks currently connected
|
unsigned int m_joystickCount{}; ///< Number of joysticks currently connected
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -155,9 +155,9 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
NSOpenGLContextRef m_context{0}; ///< OpenGL context.
|
NSOpenGLContextRef m_context{}; ///< OpenGL context.
|
||||||
NSOpenGLViewRef m_view{0}; ///< Only for offscreen context.
|
NSOpenGLViewRef m_view{}; ///< Only for offscreen context.
|
||||||
NSWindowRef m_window{0}; ///< Only for offscreen context.
|
NSWindowRef m_window{}; ///< Only for offscreen context.
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -135,16 +135,16 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
::Window m_window{0}; ///< X identifier defining our window
|
::Window m_window{}; ///< X identifier defining our window
|
||||||
::Display* m_display; ///< Pointer to the display
|
::Display* m_display; ///< Pointer to the display
|
||||||
Atom m_clipboard; ///< X Atom identifying the CLIPBOARD selection
|
Atom m_clipboard; ///< X Atom identifying the CLIPBOARD selection
|
||||||
Atom m_targets; ///< X Atom identifying TARGETS
|
Atom m_targets; ///< X Atom identifying TARGETS
|
||||||
Atom m_text; ///< X Atom identifying TEXT
|
Atom m_text; ///< X Atom identifying TEXT
|
||||||
Atom m_utf8String; ///< X Atom identifying UTF8_STRING
|
Atom m_utf8String; ///< X Atom identifying UTF8_STRING
|
||||||
Atom m_targetProperty; ///< X Atom identifying our destination window property
|
Atom m_targetProperty; ///< X Atom identifying our destination window property
|
||||||
String m_clipboardContents; ///< Our clipboard contents
|
String m_clipboardContents; ///< Our clipboard contents
|
||||||
std::deque<XEvent> m_events; ///< Queue we use to store pending events for this window
|
std::deque<XEvent> m_events; ///< Queue we use to store pending events for this window
|
||||||
bool m_requestResponded{false}; ///< Holds whether our selection request has been responded to or not
|
bool m_requestResponded{}; ///< Holds whether our selection request has been responded to or not
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -175,11 +175,11 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
::Display* m_display{nullptr}; ///< Connection to the X server
|
::Display* m_display{}; ///< Connection to the X server
|
||||||
::Window m_window{0}; ///< Window to which the context is attached
|
::Window m_window{}; ///< Window to which the context is attached
|
||||||
GLXContext m_context{nullptr}; ///< OpenGL context
|
GLXContext m_context{}; ///< OpenGL context
|
||||||
GLXPbuffer m_pbuffer{0}; ///< GLX pbuffer ID if one was created
|
GLXPbuffer m_pbuffer{}; ///< GLX pbuffer ID if one was created
|
||||||
bool m_ownsWindow{false}; ///< Do we own the window associated to the context?
|
bool m_ownsWindow{}; ///< Do we own the window associated to the context?
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -90,11 +90,11 @@ struct VulkanLibraryWrapper
|
|||||||
return (entryPoint != nullptr);
|
return (entryPoint != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* library{nullptr};
|
void* library{};
|
||||||
|
|
||||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{nullptr};
|
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{};
|
||||||
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{nullptr};
|
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{};
|
||||||
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{nullptr};
|
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{};
|
||||||
};
|
};
|
||||||
|
|
||||||
VulkanLibraryWrapper wrapper;
|
VulkanLibraryWrapper wrapper;
|
||||||
|
@ -296,25 +296,25 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
::Window m_window{0}; ///< X identifier defining our window
|
::Window m_window{}; ///< X identifier defining our window
|
||||||
::Display* m_display; ///< Pointer to the display
|
::Display* m_display; ///< Pointer to the display
|
||||||
int m_screen; ///< Screen identifier
|
int m_screen; ///< Screen identifier
|
||||||
XIM m_inputMethod{nullptr}; ///< Input method linked to the X display
|
XIM m_inputMethod{}; ///< Input method linked to the X display
|
||||||
XIC m_inputContext{nullptr}; ///< Input context used to get unicode input in our window
|
XIC m_inputContext{}; ///< Input context used to get unicode input in our window
|
||||||
bool m_isExternal; ///< Tell whether the window has been created externally or by SFML
|
bool m_isExternal; ///< Tell whether the window has been created externally or by SFML
|
||||||
RRMode m_oldVideoMode{0}; ///< Video mode in use before we switch to fullscreen
|
RRMode m_oldVideoMode{}; ///< Video mode in use before we switch to fullscreen
|
||||||
RRCrtc m_oldRRCrtc{0}; ///< RRCrtc in use before we switch to fullscreen
|
RRCrtc m_oldRRCrtc{}; ///< RRCrtc in use before we switch to fullscreen
|
||||||
::Cursor m_hiddenCursor{0}; ///< As X11 doesn't provide cursor hiding, we must create a transparent one
|
::Cursor m_hiddenCursor{}; ///< As X11 doesn't provide cursor hiding, we must create a transparent one
|
||||||
::Cursor m_lastCursor{None}; ///< Last cursor used -- this data is not owned by the window and is required to be always valid
|
::Cursor m_lastCursor{None}; ///< Last cursor used -- this data is not owned by the window and is required to be always valid
|
||||||
bool m_keyRepeat{true}; ///< Is the KeyRepeat feature enabled?
|
bool m_keyRepeat{true}; ///< Is the KeyRepeat feature enabled?
|
||||||
Vector2i m_previousSize{-1, -1}; ///< Previous size of the window, to find if a ConfigureNotify event is a resize event (could be a move event only)
|
Vector2i m_previousSize{-1, -1}; ///< Previous size of the window, to find if a ConfigureNotify event is a resize event (could be a move event only)
|
||||||
bool m_useSizeHints{false}; ///< Is the size of the window fixed with size hints?
|
bool m_useSizeHints{}; ///< Is the size of the window fixed with size hints?
|
||||||
bool m_fullscreen{false}; ///< Is the window in fullscreen?
|
bool m_fullscreen{}; ///< Is the window in fullscreen?
|
||||||
bool m_cursorGrabbed{false}; ///< Is the mouse cursor trapped?
|
bool m_cursorGrabbed{}; ///< Is the mouse cursor trapped?
|
||||||
bool m_windowMapped{false}; ///< Has the window been mapped by the window manager?
|
bool m_windowMapped{}; ///< Has the window been mapped by the window manager?
|
||||||
Pixmap m_iconPixmap{0}; ///< The current icon pixmap if in use
|
Pixmap m_iconPixmap{}; ///< The current icon pixmap if in use
|
||||||
Pixmap m_iconMaskPixmap{0}; ///< The current icon mask pixmap if in use
|
Pixmap m_iconMaskPixmap{}; ///< The current icon mask pixmap if in use
|
||||||
::Time m_lastInputTime{0}; ///< Last time we received user input
|
::Time m_lastInputTime{}; ///< Last time we received user input
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -98,8 +98,8 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void* m_cursor{nullptr}; // Type erasure via `void*` is used here to avoid depending on `windows.h`
|
void* m_cursor{}; // Type erasure via `void*` is used here to avoid depending on `windows.h`
|
||||||
bool m_systemCursor{false};
|
bool m_systemCursor{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -103,7 +103,7 @@ namespace
|
|||||||
{
|
{
|
||||||
struct ConnectionCache
|
struct ConnectionCache
|
||||||
{
|
{
|
||||||
bool connected{false};
|
bool connected{};
|
||||||
sf::Clock timer;
|
sf::Clock timer;
|
||||||
};
|
};
|
||||||
const sf::Time connectionRefreshDelay = sf::milliseconds(500);
|
const sf::Time connectionRefreshDelay = sf::milliseconds(500);
|
||||||
|
@ -89,11 +89,11 @@ struct VulkanLibraryWrapper
|
|||||||
return (entryPoint != nullptr);
|
return (entryPoint != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
HMODULE library{nullptr};
|
HMODULE library{};
|
||||||
|
|
||||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{nullptr};
|
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{};
|
||||||
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{nullptr};
|
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{};
|
||||||
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{nullptr};
|
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{};
|
||||||
};
|
};
|
||||||
|
|
||||||
VulkanLibraryWrapper wrapper;
|
VulkanLibraryWrapper wrapper;
|
||||||
|
@ -178,11 +178,11 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
HWND m_window{nullptr}; //!< Window to which the context is attached
|
HWND m_window{}; //!< Window to which the context is attached
|
||||||
HPBUFFERARB m_pbuffer{nullptr}; //!< Handle to a pbuffer if one was created
|
HPBUFFERARB m_pbuffer{}; //!< Handle to a pbuffer if one was created
|
||||||
HDC m_deviceContext{nullptr}; //!< Device context associated to the context
|
HDC m_deviceContext{}; //!< Device context associated to the context
|
||||||
HGLRC m_context{nullptr}; //!< OpenGL context
|
HGLRC m_context{}; //!< OpenGL context
|
||||||
bool m_ownsWindow{false}; //!< Do we own the target window?
|
bool m_ownsWindow{}; //!< Do we own the target window?
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -268,19 +268,19 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
HWND m_handle{nullptr}; //!< Win32 handle of the window
|
HWND m_handle{}; //!< Win32 handle of the window
|
||||||
LONG_PTR m_callback{0}; //!< Stores the original event callback function of the control
|
LONG_PTR m_callback{}; //!< Stores the original event callback function of the control
|
||||||
bool m_cursorVisible{true}; //!< Is the cursor visible or hidden?
|
bool m_cursorVisible{true}; //!< Is the cursor visible or hidden?
|
||||||
HCURSOR m_lastCursor{
|
HCURSOR m_lastCursor{
|
||||||
LoadCursor(nullptr, IDC_ARROW)}; //!< Last cursor used -- this data is not owned by the window and is required to be always valid
|
LoadCursor(nullptr, IDC_ARROW)}; //!< Last cursor used -- this data is not owned by the window and is required to be always valid
|
||||||
HICON m_icon{nullptr}; //!< Custom icon assigned to the window
|
HICON m_icon{}; //!< Custom icon assigned to the window
|
||||||
bool m_keyRepeatEnabled{true}; //!< Automatic key-repeat state for keydown events
|
bool m_keyRepeatEnabled{true}; //!< Automatic key-repeat state for keydown events
|
||||||
Vector2u m_lastSize; //!< The last handled size of the window
|
Vector2u m_lastSize; //!< The last handled size of the window
|
||||||
bool m_resizing{false}; //!< Is the window being resized?
|
bool m_resizing{}; //!< Is the window being resized?
|
||||||
std::uint16_t m_surrogate{0}; //!< First half of the surrogate pair, in case we're receiving a Unicode character in two events
|
std::uint16_t m_surrogate{}; //!< First half of the surrogate pair, in case we're receiving a Unicode character in two events
|
||||||
bool m_mouseInside{false}; //!< Mouse is inside the window?
|
bool m_mouseInside{}; //!< Mouse is inside the window?
|
||||||
bool m_fullscreen{false}; //!< Is the window fullscreen?
|
bool m_fullscreen{}; //!< Is the window fullscreen?
|
||||||
bool m_cursorGrabbed{false}; //!< Is the mouse cursor trapped?
|
bool m_cursorGrabbed{}; //!< Is the mouse cursor trapped?
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
@ -158,12 +158,12 @@ private:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Member data
|
// Member data
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
EAGLContext* m_context; ///< The internal context
|
EAGLContext* m_context; ///< The internal context
|
||||||
GLuint m_framebuffer{0}; ///< Frame buffer associated to the context
|
GLuint m_framebuffer{}; ///< Frame buffer associated to the context
|
||||||
GLuint m_colorbuffer{0}; ///< Color render buffer
|
GLuint m_colorbuffer{}; ///< Color render buffer
|
||||||
GLuint m_depthbuffer{0}; ///< Depth render buffer
|
GLuint m_depthbuffer{}; ///< Depth render buffer
|
||||||
bool m_vsyncEnabled{false}; ///< Vertical sync activation flag
|
bool m_vsyncEnabled{}; ///< Vertical sync activation flag
|
||||||
Clock m_clock; ///< Measures the elapsed time for the fake v-sync implementation
|
Clock m_clock; ///< Measures the elapsed time for the fake v-sync implementation
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace priv
|
} // namespace priv
|
||||||
|
Loading…
Reference in New Issue
Block a user