ClampToEdge mode for textures; cocoa termination exception fix

This commit is contained in:
Jack Andersen
2017-11-16 22:55:51 -10:00
parent bffdf43f9e
commit a99bddc905
10 changed files with 129 additions and 11 deletions

View File

@@ -69,13 +69,18 @@ enum class TextureFormat
enum class TextureClampMode
{
Repeat,
ClampToWhite
ClampToWhite,
ClampToEdge
};
/** Typeless texture */
struct ITexture : IObj
{
TextureType type() const { return m_type; }
/* Only applies on GL and Vulkan. Use shader semantics on other platforms */
virtual void setClampMode(TextureClampMode mode) {}
protected:
TextureType m_type;
explicit ITexture(TextureType type) : m_type(type) {}

View File

@@ -44,7 +44,7 @@ struct VulkanContext
VkRenderPass m_pass;
VkCommandPool m_loadPool;
VkCommandBuffer m_loadCmdBuf;
VkSampler m_linearSamplers[2];
VkSampler m_linearSamplers[3];
VkFormat m_displayFormat;
struct Window