mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-27 20:28:35 +01:00
thin3d: Add sampler state selection.
This commit is contained in:
1 parent
0d68a172a9
commit
05fee24ccf
7 files changed
+192
-26
No files matched your search
@@ -23,6 +23,7 @@ UIContext::~UIContext() {
|
||||
void UIContext::Init(Thin3DContext *thin3d, Thin3DShaderSet *uishader, Thin3DShaderSet *uishadernotex, Thin3DTexture *uitexture, DrawBuffer *uidrawbuffer, DrawBuffer *uidrawbufferTop) {
|
||||
thin3d_ = thin3d;
|
||||
blend_ = thin3d_->GetBlendStatePreset(T3DBlendStatePreset::BS_STANDARD_ALPHA);
|
||||
sampler_ = thin3d_->GetSamplerStatePreset(T3DSamplerStatePreset::SAMPS_LINEAR);
|
||||
depth_ = thin3d_->CreateDepthStencilState(false, false, T3DComparison::LESS);
|
||||
|
||||
uishader_ = uishader;
|
||||
@@ -39,6 +40,7 @@ void UIContext::Init(Thin3DContext *thin3d, Thin3DShaderSet *uishader, Thin3DSha
|
||||
|
||||
void UIContext::Begin() {
|
||||
thin3d_->SetBlendState(blend_);
|
||||
thin3d_->SetSamplerStates(0, 1, &sampler_);
|
||||
thin3d_->SetDepthStencilState(depth_);
|
||||
thin3d_->SetRenderState(T3DRenderState::CULL_MODE, T3DCullMode::NO_CULL);
|
||||
thin3d_->SetTexture(0, uitexture_);
|
||||
@@ -48,6 +50,7 @@ void UIContext::Begin() {
|
||||
|
||||
void UIContext::BeginNoTex() {
|
||||
thin3d_->SetBlendState(blend_);
|
||||
thin3d_->SetSamplerStates(0, 1, &sampler_);
|
||||
thin3d_->SetRenderState(T3DRenderState::CULL_MODE, T3DCullMode::NO_CULL);
|
||||
|
||||
UIBegin(uishadernotex_);
|
||||
|
||||
Reference in new issue
Block a user