16 class GL4GraphicsObject;
34 inline bool MeetsRequirements()
const;
38 virtual bool IsActive()
const = 0;
39 virtual void MakeActive() = 0;
43 virtual bool Initialize(
int requiredMajor,
int requiredMinor,
bool saveDriverInfo);
45 void CreateDefaultFont();
46 void DestroyDefaultFont();
57 bool EnableShaders(std::shared_ptr<VisualEffect>
const& effect,
GLuint program);
58 void DisableShaders(std::shared_ptr<VisualEffect>
const& effect,
GLuint program);
98 void ReleaseUnit(
unsigned index);
99 unsigned GetUnitLinkCount(
unsigned unit)
const;
100 bool GetUnitProgramIndex(
unsigned unit,
GLint &program,
GLint &index)
const;
125 virtual void SetViewport(
int x,
int y,
int w,
int h)
override;
126 virtual void GetViewport(
int&
x,
int&
y,
int&
w,
int&
h)
const override;
127 virtual void SetDepthRange(
float zmin,
float zmax)
override;
128 virtual void GetDepthRange(
float& zmin,
float&
zmax)
const override;
131 virtual bool Resize(
unsigned int w,
unsigned int h)
override;
134 virtual void ClearColorBuffer()
override;
135 virtual void ClearDepthBuffer()
override;
136 virtual void ClearStencilBuffer()
override;
137 virtual void ClearBuffers()
override;
141 virtual void SetBlendState(std::shared_ptr<BlendState>
const& state)
override;
142 virtual void SetDepthStencilState(std::shared_ptr<DepthStencilState>
const& state)
override;
143 virtual void SetRasterizerState(std::shared_ptr<RasterizerState>
const& state)
override;
148 virtual void Enable(std::shared_ptr<DrawTarget>
const&
target)
override;
149 virtual void Disable(std::shared_ptr<DrawTarget>
const&
target)
override;
152 virtual bool Update(std::shared_ptr<Buffer>
const&
buffer)
override;
153 virtual bool Update(std::shared_ptr<TextureSingle>
const&
texture)
override;
154 virtual bool Update(std::shared_ptr<TextureSingle>
const&
texture,
unsigned int level)
override;
155 virtual bool Update(std::shared_ptr<TextureArray>
const& textureArray)
override;
156 virtual bool Update(std::shared_ptr<TextureArray>
const& textureArray,
unsigned int item,
unsigned int level)
override;
159 virtual bool CopyCpuToGpu(std::shared_ptr<Buffer>
const&
buffer)
override;
160 virtual bool CopyCpuToGpu(std::shared_ptr<TextureSingle>
const&
texture)
override;
161 virtual bool CopyCpuToGpu(std::shared_ptr<TextureSingle>
const&
texture,
unsigned int level)
override;
162 virtual bool CopyCpuToGpu(std::shared_ptr<TextureArray>
const& textureArray)
override;
163 virtual bool CopyCpuToGpu(std::shared_ptr<TextureArray>
const& textureArray,
unsigned int item,
unsigned int level)
override;
166 virtual bool CopyGpuToCpu(std::shared_ptr<Buffer>
const&
buffer)
override;
167 virtual bool CopyGpuToCpu(std::shared_ptr<TextureSingle>
const&
texture)
override;
168 virtual bool CopyGpuToCpu(std::shared_ptr<TextureSingle>
const&
texture,
unsigned int level)
override;
169 virtual bool CopyGpuToCpu(std::shared_ptr<TextureArray>
const& textureArray)
override;
170 virtual bool CopyGpuToCpu(std::shared_ptr<TextureArray>
const& textureArray,
unsigned int item,
unsigned int level)
override;
176 virtual void CopyGpuToGpu(
177 std::shared_ptr<Buffer>
const& buffer0,
178 std::shared_ptr<Buffer>
const& buffer1)
override;
180 virtual void CopyGpuToGpu(
181 std::shared_ptr<TextureSingle>
const& texture0,
182 std::shared_ptr<TextureSingle>
const& texture1)
override;
184 virtual void CopyGpuToGpu(
185 std::shared_ptr<TextureSingle>
const& texture0,
186 std::shared_ptr<TextureSingle>
const& texture1,
187 unsigned int level)
override;
189 virtual void CopyGpuToGpu(
190 std::shared_ptr<TextureArray>
const& textureArray0,
191 std::shared_ptr<TextureArray>
const& textureArray1)
override;
193 virtual void CopyGpuToGpu(
194 std::shared_ptr<TextureArray>
const& textureArray0,
195 std::shared_ptr<TextureArray>
const& textureArray1,
196 unsigned int item,
unsigned int level)
override;
199 virtual bool GetNumActiveElements(std::shared_ptr<StructuredBuffer>
const&
buffer)
override;
206 virtual bool BindProgram(std::shared_ptr<ComputeProgram>
const&
program)
override;
207 virtual void Execute(std::shared_ptr<ComputeProgram>
const&
program,
208 unsigned int numXGroups,
unsigned int numYGroups,
unsigned int numZGroups)
override;
211 virtual void WaitForFinish()
override;
214 virtual void Flush()
override;
221 virtual uint64_t DrawPrimitive(
222 std::shared_ptr<VertexBuffer>
const& vbuffer,
223 std::shared_ptr<IndexBuffer>
const& ibuffer,
224 std::shared_ptr<VisualEffect>
const& effect)
override;
230 return mMeetsRequirements;
ProgramIndexUnitMap mUniformUnitMap
std::vector< LinkInfo > mLinkMap
ProgramIndexUnitMap mShaderStorageUnitMap
GLbitfield GLuint program
ProgramIndexUnitMap mTextureImageUnitMap
bool MeetsRequirements() const
GLubyte GLubyte GLubyte GLubyte w
ProgramIndexUnitMap mTextureSamplerUnitMap
GLfloat GLfloat GLfloat GLfloat h
std::vector< std::shared_ptr< RawBuffer > > mAtomicCounterRawBuffers