IQM Support Implemented
More info to come
This commit is contained in:
parent
dbd6a9dea1
commit
08f520f1c6
49 changed files with 1356 additions and 62 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include "gl_shader.h"
|
||||
#include "gl_renderer.h"
|
||||
#include "hw_lightbuffer.h"
|
||||
#include "hw_bonebuffer.h"
|
||||
#include "gl_renderbuffers.h"
|
||||
#include "gl_hwtexture.h"
|
||||
#include "gl_buffers.h"
|
||||
|
|
@ -133,6 +134,7 @@ bool FGLRenderState::ApplyShader()
|
|||
activeShader->muTimer.Set((double)(screen->FrameTime - firstFrame) * (double)mShaderTimer / 1000.);
|
||||
activeShader->muAlphaThreshold.Set(mAlphaThreshold);
|
||||
activeShader->muLightIndex.Set(-1);
|
||||
activeShader->muBoneIndexBase.Set(-1);
|
||||
activeShader->muClipSplit.Set(mClipSplit);
|
||||
activeShader->muSpecularMaterial.Set(mGlossiness, mSpecularLevel);
|
||||
activeShader->muAddColor.Set(mStreamData.uAddColor);
|
||||
|
|
@ -210,6 +212,21 @@ bool FGLRenderState::ApplyShader()
|
|||
}
|
||||
|
||||
activeShader->muLightIndex.Set(index);
|
||||
|
||||
index = mBoneIndexBase;
|
||||
if (!screen->mBones->GetBufferType() && index >= 0) // Uniform buffer fallback support
|
||||
{
|
||||
size_t start, size;
|
||||
index = screen->mBones->GetBinding(index, &start, &size);
|
||||
|
||||
if (start != mLastMappedBoneIndexBase || screen->mPipelineNbr > 1) // If multiple buffers always bind
|
||||
{
|
||||
mLastMappedBoneIndexBase = start;
|
||||
static_cast<GLDataBuffer*>(screen->mBones->GetBuffer())->BindRange(nullptr, start, size);
|
||||
}
|
||||
}
|
||||
activeShader->muBoneIndexBase.Set(index);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue