mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 14:10:06 +00:00
GL color buffer should be cleared at the start of the frame
This commit is contained in:
parent
8bd6838438
commit
37a850a778
4 changed files with 20 additions and 0 deletions
|
|
@ -136,6 +136,14 @@ void GlContext::Initialize()
|
|||
p->InitializeGL();
|
||||
}
|
||||
|
||||
void GlContext::StartFrame()
|
||||
{
|
||||
auto& gl = p->gl_;
|
||||
|
||||
gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
gl.glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
std::size_t GlContext::Impl::GetShaderKey(
|
||||
std::initializer_list<std::pair<GLenum, std::string>> shaders)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public:
|
|||
GLuint GetTextureAtlas();
|
||||
|
||||
void Initialize();
|
||||
void StartFrame();
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue