Skip to content

Commit

Permalink
Set default blend factor for graphics context
Browse files Browse the repository at this point in the history
  • Loading branch information
mogemimi committed Aug 19, 2016
1 parent fc05254 commit 7e01bbe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RenderSystem.Direct3D11/GraphicsContextDirect3D11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ GraphicsContextDirect3D11::GraphicsContextDirect3D11(
}

textureResourceViews.fill(nullptr);

// NOTE: Set default values for graphics context
this->SetBlendFactor(Color::White);
}

GraphicsContextDirect3D11::~GraphicsContextDirect3D11()
Expand Down
3 changes: 3 additions & 0 deletions src/RenderSystem.GL4/GraphicsContextGL4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ GraphicsContextGL4::GraphicsContextGL4(

frameBuffer = CreateFrameBuffer();
primitiveTopology = ToPrimitiveTopology(PrimitiveTopology::TriangleList);

// NOTE: Set default values for graphics context
this->SetBlendFactor(Color::White);
}

GraphicsContextGL4::~GraphicsContextGL4()
Expand Down
3 changes: 3 additions & 0 deletions src/RenderSystem.Metal/GraphicsContextMetal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ void SetScissorRectangle(

// NOTE: Create a new command queue
commandQueue = [nativeDevice newCommandQueue];

// NOTE: Set default values for graphics context
this->SetBlendFactor(Color::White);
}

GraphicsContextMetal::~GraphicsContextMetal() = default;
Expand Down

0 comments on commit 7e01bbe

Please sign in to comment.