Try to use vec2 for texture translation only
In stk, only setTextureTranslate is used which modify 8,9 of matrix array. Also don't update it when it is identity.
This commit is contained in:
parent
3e938a79be
commit
60908c3e1d
@ -1,7 +1,7 @@
|
|||||||
#ifdef GL_ES
|
#ifdef GL_ES
|
||||||
uniform mat4 ModelMatrix;
|
uniform mat4 ModelMatrix;
|
||||||
uniform mat4 InverseModelMatrix;
|
uniform mat4 InverseModelMatrix;
|
||||||
uniform mat4 TextureMatrix;
|
uniform vec2 texture_trans;
|
||||||
#else
|
#else
|
||||||
uniform mat4 ModelMatrix =
|
uniform mat4 ModelMatrix =
|
||||||
mat4(1., 0., 0., 0.,
|
mat4(1., 0., 0., 0.,
|
||||||
@ -14,11 +14,7 @@ uniform mat4 InverseModelMatrix =
|
|||||||
0., 0., 1., 0.,
|
0., 0., 1., 0.,
|
||||||
0., 0., 0., 1.);
|
0., 0., 0., 1.);
|
||||||
|
|
||||||
uniform mat4 TextureMatrix =
|
uniform vec2 texture_trans = vec2(0., 0.);
|
||||||
mat4(1., 0., 0., 0.,
|
|
||||||
0., 1., 0., 0.,
|
|
||||||
0., 0., 1., 0.,
|
|
||||||
0., 0., 0., 1.);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __VERSION__ >= 330
|
#if __VERSION__ >= 330
|
||||||
@ -58,6 +54,10 @@ void main(void)
|
|||||||
// Keep direction
|
// Keep direction
|
||||||
tangent = (ViewMatrix * ModelMatrix * vec4(Tangent, 0.)).xyz;
|
tangent = (ViewMatrix * ModelMatrix * vec4(Tangent, 0.)).xyz;
|
||||||
bitangent = (ViewMatrix * ModelMatrix * vec4(Bitangent, 0.)).xyz;
|
bitangent = (ViewMatrix * ModelMatrix * vec4(Bitangent, 0.)).xyz;
|
||||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
uv = (mat4(1., 0., 0., 0.,
|
||||||
|
0., 1., 0., 0.,
|
||||||
|
texture_trans.x, texture_trans.y, 1., 0.,
|
||||||
|
0., 0., 0., 1.)
|
||||||
|
* vec4(Texcoord, 1., 1.)).xy;
|
||||||
uv_bis = SecondTexcoord;
|
uv_bis = SecondTexcoord;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
uniform mat4 ModelMatrix;
|
uniform mat4 ModelMatrix;
|
||||||
uniform mat4 RSMMatrix;
|
uniform mat4 RSMMatrix;
|
||||||
|
uniform vec2 texture_trans = vec2(0., 0.);
|
||||||
uniform mat4 TextureMatrix =
|
|
||||||
mat4(1., 0., 0., 0.,
|
|
||||||
0., 1., 0., 0.,
|
|
||||||
0., 0., 1., 0.,
|
|
||||||
0., 0., 0., 1.);
|
|
||||||
|
|
||||||
#if __VERSION__ >= 330
|
#if __VERSION__ >= 330
|
||||||
layout(location = 0) in vec3 Position;
|
layout(location = 0) in vec3 Position;
|
||||||
@ -33,7 +28,11 @@ void main(void)
|
|||||||
mat4 TransposeInverseModel = transpose(inverse(ModelMatrix));
|
mat4 TransposeInverseModel = transpose(inverse(ModelMatrix));
|
||||||
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
||||||
nor = (TransposeInverseModel * vec4(Normal, 0.)).xyz;
|
nor = (TransposeInverseModel * vec4(Normal, 0.)).xyz;
|
||||||
uv = (TextureMatrix * vec4(Texcoord, 1., 1.)).xy;
|
uv = (mat4(1., 0., 0., 0.,
|
||||||
|
0., 1., 0., 0.,
|
||||||
|
texture_trans.x, texture_trans.y, 1., 0.,
|
||||||
|
0., 0., 0., 1.)
|
||||||
|
* vec4(Texcoord, 1., 1.)).xy;
|
||||||
uv_bis = SecondTexcoord;
|
uv_bis = SecondTexcoord;
|
||||||
color = Color.zyxw;
|
color = Color.zyxw;
|
||||||
}
|
}
|
||||||
|
@ -211,18 +211,18 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
tmpcol.getBlue() / 255.0f);
|
tmpcol.getBlue() / 255.0f);
|
||||||
|
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_DEFAULT])
|
for (GLMesh *mesh : node->TransparentMesh[TM_DEFAULT])
|
||||||
pushVector(ListBlendTransparentFog::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix,
|
pushVector(ListBlendTransparentFog::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans,
|
||||||
fogmax, startH, endH, start, end, col);
|
fogmax, startH, endH, start, end, col);
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_ADDITIVE])
|
for (GLMesh *mesh : node->TransparentMesh[TM_ADDITIVE])
|
||||||
pushVector(ListAdditiveTransparentFog::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix,
|
pushVector(ListAdditiveTransparentFog::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans,
|
||||||
fogmax, startH, endH, start, end, col);
|
fogmax, startH, endH, start, end, col);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_DEFAULT])
|
for (GLMesh *mesh : node->TransparentMesh[TM_DEFAULT])
|
||||||
pushVector(ListBlendTransparent::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix, 1.0f);
|
pushVector(ListBlendTransparent::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans, 1.0f);
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_ADDITIVE])
|
for (GLMesh *mesh : node->TransparentMesh[TM_ADDITIVE])
|
||||||
pushVector(ListAdditiveTransparent::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix, 1.0f);
|
pushVector(ListAdditiveTransparent::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use sun color to determine custom alpha for ghost karts
|
// Use sun color to determine custom alpha for ghost karts
|
||||||
@ -235,11 +235,11 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_TRANSLUCENT_STD])
|
for (GLMesh *mesh : node->TransparentMesh[TM_TRANSLUCENT_STD])
|
||||||
pushVector(ListTranslucentStandard::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix, custom_alpha);
|
pushVector(ListTranslucentStandard::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans, custom_alpha);
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_TRANSLUCENT_TAN])
|
for (GLMesh *mesh : node->TransparentMesh[TM_TRANSLUCENT_TAN])
|
||||||
pushVector(ListTranslucentTangents::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix, custom_alpha);
|
pushVector(ListTranslucentTangents::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans, custom_alpha);
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_TRANSLUCENT_2TC])
|
for (GLMesh *mesh : node->TransparentMesh[TM_TRANSLUCENT_2TC])
|
||||||
pushVector(ListTranslucent2TCoords::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->TextureMatrix, custom_alpha);
|
pushVector(ListTranslucent2TCoords::getInstance(), mesh, Node->getAbsoluteTransformation(), mesh->texture_trans, custom_alpha);
|
||||||
for (GLMesh *mesh : node->TransparentMesh[TM_DISPLACEMENT])
|
for (GLMesh *mesh : node->TransparentMesh[TM_DISPLACEMENT])
|
||||||
pushVector(ListDisplacement::getInstance(), mesh, Node->getAbsoluteTransformation());
|
pushVector(ListDisplacement::getInstance(), mesh, Node->getAbsoluteTransformation());
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
m_glow_pass_mesh[mesh->mb].m_scene_nodes.emplace_back(Node);
|
m_glow_pass_mesh[mesh->mb].m_scene_nodes.emplace_back(Node);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Mat != Material::SHADERTYPE_SPLATTING && mesh->TextureMatrix.isIdentity())
|
if (Mat != Material::SHADERTYPE_SPLATTING && mesh->texture_trans.getLength() == 0.0f)
|
||||||
{
|
{
|
||||||
std::pair<scene::IMeshBuffer*, RenderInfo*> meshRenderInfo(mesh->mb, mesh->m_render_info);
|
std::pair<scene::IMeshBuffer*, RenderInfo*> meshRenderInfo(mesh->mb, mesh->m_render_info);
|
||||||
m_solid_pass_mesh[Mat][meshRenderInfo].m_mesh = mesh;
|
m_solid_pass_mesh[Mat][meshRenderInfo].m_mesh = mesh;
|
||||||
@ -270,16 +270,16 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
switch (Mat)
|
switch (Mat)
|
||||||
{
|
{
|
||||||
case Material::SHADERTYPE_SOLID:
|
case Material::SHADERTYPE_SOLID:
|
||||||
ListMatDefault::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix,
|
ListMatDefault::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans,
|
||||||
(mesh->m_render_info && mesh->m_material ?
|
(mesh->m_render_info && mesh->m_material ?
|
||||||
core::vector2df(mesh->m_render_info->getHue(), mesh->m_material->getColorizationFactor()) :
|
core::vector2df(mesh->m_render_info->getHue(), mesh->m_material->getColorizationFactor()) :
|
||||||
core::vector2df(0.0f, 0.0f)));
|
core::vector2df(0.0f, 0.0f)));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_ALPHA_TEST:
|
case Material::SHADERTYPE_ALPHA_TEST:
|
||||||
ListMatAlphaRef::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatAlphaRef::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SOLID_UNLIT:
|
case Material::SHADERTYPE_SOLID_UNLIT:
|
||||||
ListMatUnlit::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatUnlit::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPLATTING:
|
case Material::SHADERTYPE_SPLATTING:
|
||||||
ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
||||||
@ -314,28 +314,28 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
switch (Mat)
|
switch (Mat)
|
||||||
{
|
{
|
||||||
case Material::SHADERTYPE_SOLID:
|
case Material::SHADERTYPE_SOLID:
|
||||||
ListMatDefault::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix,
|
ListMatDefault::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans,
|
||||||
(mesh->m_render_info && mesh->m_material ?
|
(mesh->m_render_info && mesh->m_material ?
|
||||||
core::vector2df(mesh->m_render_info->getHue(), mesh->m_material->getColorizationFactor()) :
|
core::vector2df(mesh->m_render_info->getHue(), mesh->m_material->getColorizationFactor()) :
|
||||||
core::vector2df(0.0f, 0.0f)));
|
core::vector2df(0.0f, 0.0f)));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_ALPHA_TEST:
|
case Material::SHADERTYPE_ALPHA_TEST:
|
||||||
ListMatAlphaRef::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatAlphaRef::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_NORMAL_MAP:
|
case Material::SHADERTYPE_NORMAL_MAP:
|
||||||
ListMatNormalMap::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix,
|
ListMatNormalMap::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans,
|
||||||
(mesh->m_render_info && mesh->m_material ?
|
(mesh->m_render_info && mesh->m_material ?
|
||||||
core::vector2df(mesh->m_render_info->getHue(), mesh->m_material->getColorizationFactor()) :
|
core::vector2df(mesh->m_render_info->getHue(), mesh->m_material->getColorizationFactor()) :
|
||||||
core::vector2df(0.0f, 0.0f)));
|
core::vector2df(0.0f, 0.0f)));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_DETAIL_MAP:
|
case Material::SHADERTYPE_DETAIL_MAP:
|
||||||
ListMatDetails::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatDetails::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SOLID_UNLIT:
|
case Material::SHADERTYPE_SOLID_UNLIT:
|
||||||
ListMatUnlit::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatUnlit::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPHERE_MAP:
|
case Material::SHADERTYPE_SPHERE_MAP:
|
||||||
ListMatSphereMap::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatSphereMap::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPLATTING:
|
case Material::SHADERTYPE_SPLATTING:
|
||||||
ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
||||||
@ -382,22 +382,22 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
switch (Mat)
|
switch (Mat)
|
||||||
{
|
{
|
||||||
case Material::SHADERTYPE_SOLID:
|
case Material::SHADERTYPE_SOLID:
|
||||||
ListMatDefault::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix, core::vector2df(0.0f, 0.0f));
|
ListMatDefault::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans, core::vector2df(0.0f, 0.0f));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_ALPHA_TEST:
|
case Material::SHADERTYPE_ALPHA_TEST:
|
||||||
ListMatAlphaRef::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatAlphaRef::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_NORMAL_MAP:
|
case Material::SHADERTYPE_NORMAL_MAP:
|
||||||
ListMatNormalMap::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix, core::vector2df(0.0f, 0.0f));
|
ListMatNormalMap::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans, core::vector2df(0.0f, 0.0f));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_DETAIL_MAP:
|
case Material::SHADERTYPE_DETAIL_MAP:
|
||||||
ListMatDetails::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatDetails::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SOLID_UNLIT:
|
case Material::SHADERTYPE_SOLID_UNLIT:
|
||||||
ListMatUnlit::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatUnlit::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPHERE_MAP:
|
case Material::SHADERTYPE_SPHERE_MAP:
|
||||||
ListMatSphereMap::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatSphereMap::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPLATTING:
|
case Material::SHADERTYPE_SPLATTING:
|
||||||
ListMatSplatting::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
ListMatSplatting::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
||||||
@ -453,22 +453,22 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
|
|||||||
switch (Mat)
|
switch (Mat)
|
||||||
{
|
{
|
||||||
case Material::SHADERTYPE_SOLID:
|
case Material::SHADERTYPE_SOLID:
|
||||||
ListMatDefault::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix, core::vector2df(0.0f, 0.0f));
|
ListMatDefault::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans, core::vector2df(0.0f, 0.0f));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_ALPHA_TEST:
|
case Material::SHADERTYPE_ALPHA_TEST:
|
||||||
ListMatAlphaRef::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatAlphaRef::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_NORMAL_MAP:
|
case Material::SHADERTYPE_NORMAL_MAP:
|
||||||
ListMatNormalMap::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix, core::vector2df(0.0f, 0.0f));
|
ListMatNormalMap::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans, core::vector2df(0.0f, 0.0f));
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_DETAIL_MAP:
|
case Material::SHADERTYPE_DETAIL_MAP:
|
||||||
ListMatDetails::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatDetails::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SOLID_UNLIT:
|
case Material::SHADERTYPE_SOLID_UNLIT:
|
||||||
ListMatUnlit::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatUnlit::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPHERE_MAP:
|
case Material::SHADERTYPE_SPHERE_MAP:
|
||||||
ListMatSphereMap::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
|
ListMatSphereMap::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->texture_trans);
|
||||||
break;
|
break;
|
||||||
case Material::SHADERTYPE_SPLATTING:
|
case Material::SHADERTYPE_SPLATTING:
|
||||||
ListMatSplatting::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
ListMatSplatting::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix);
|
||||||
|
@ -56,14 +56,14 @@ public:
|
|||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
class ObjectRefPass2Shader : public TextureShader<ObjectRefPass2Shader, 5,
|
class ObjectRefPass2Shader : public TextureShader<ObjectRefPass2Shader, 5,
|
||||||
core::matrix4, core::matrix4>
|
core::matrix4, core::vector2df>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObjectRefPass2Shader()
|
ObjectRefPass2Shader()
|
||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
||||||
GL_FRAGMENT_SHADER, "objectref_pass2.frag");
|
GL_FRAGMENT_SHADER, "objectref_pass2.frag");
|
||||||
assignUniforms("ModelMatrix", "TextureMatrix");
|
assignUniforms("ModelMatrix", "texture_trans");
|
||||||
assignSamplerNames(0, "DiffuseMap", ST_NEAREST_FILTERED,
|
assignSamplerNames(0, "DiffuseMap", ST_NEAREST_FILTERED,
|
||||||
1, "SpecularMap", ST_NEAREST_FILTERED,
|
1, "SpecularMap", ST_NEAREST_FILTERED,
|
||||||
2, "SSAO", ST_BILINEAR_FILTERED,
|
2, "SSAO", ST_BILINEAR_FILTERED,
|
||||||
@ -172,7 +172,7 @@ public:
|
|||||||
}; // InstancedShadowShader
|
}; // InstancedShadowShader
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
class CRSMShader : public TextureShader<CRSMShader, 1, core::matrix4, core::matrix4,
|
class CRSMShader : public TextureShader<CRSMShader, 1, core::matrix4, core::vector2df,
|
||||||
core::matrix4>
|
core::matrix4>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "rsm.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "rsm.vert",
|
||||||
GL_FRAGMENT_SHADER, "rsm.frag");
|
GL_FRAGMENT_SHADER, "rsm.frag");
|
||||||
|
|
||||||
assignUniforms("ModelMatrix", "TextureMatrix", "RSMMatrix");
|
assignUniforms("ModelMatrix", "texture_trans", "RSMMatrix");
|
||||||
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
||||||
} // CRSMShader
|
} // CRSMShader
|
||||||
}; // CRSMShader
|
}; // CRSMShader
|
||||||
@ -278,14 +278,14 @@ public:
|
|||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
class ObjectRefPass1Shader : public TextureShader<ObjectRefPass1Shader, 2, core::matrix4,
|
class ObjectRefPass1Shader : public TextureShader<ObjectRefPass1Shader, 2, core::matrix4,
|
||||||
core::matrix4, core::matrix4>
|
core::matrix4, core::vector2df>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObjectRefPass1Shader()
|
ObjectRefPass1Shader()
|
||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
||||||
GL_FRAGMENT_SHADER, "objectref_pass1.frag");
|
GL_FRAGMENT_SHADER, "objectref_pass1.frag");
|
||||||
assignUniforms("ModelMatrix", "InverseModelMatrix", "TextureMatrix");
|
assignUniforms("ModelMatrix", "InverseModelMatrix", "texture_trans");
|
||||||
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED,
|
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED,
|
||||||
1, "glosstex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
1, "glosstex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
||||||
} // ObjectRefPass1Shader
|
} // ObjectRefPass1Shader
|
||||||
@ -324,14 +324,14 @@ public:
|
|||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
class ObjectUnlitShader : public TextureShader<ObjectUnlitShader, 4, core::matrix4,
|
class ObjectUnlitShader : public TextureShader<ObjectUnlitShader, 4, core::matrix4,
|
||||||
core::matrix4>
|
core::vector2df>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObjectUnlitShader()
|
ObjectUnlitShader()
|
||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
||||||
GL_FRAGMENT_SHADER, "object_unlit.frag");
|
GL_FRAGMENT_SHADER, "object_unlit.frag");
|
||||||
assignUniforms("ModelMatrix", "TextureMatrix");
|
assignUniforms("ModelMatrix", "texture_trans");
|
||||||
assignSamplerNames(0, "DiffuseMap", ST_NEAREST_FILTERED,
|
assignSamplerNames(0, "DiffuseMap", ST_NEAREST_FILTERED,
|
||||||
1, "SpecularMap", ST_NEAREST_FILTERED,
|
1, "SpecularMap", ST_NEAREST_FILTERED,
|
||||||
2, "SSAO", ST_BILINEAR_FILTERED,
|
2, "SSAO", ST_BILINEAR_FILTERED,
|
||||||
|
@ -350,7 +350,7 @@ Shaders::ObjectPass2Shader::ObjectPass2Shader()
|
|||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
||||||
GL_FRAGMENT_SHADER, "object_pass2.frag");
|
GL_FRAGMENT_SHADER, "object_pass2.frag");
|
||||||
assignUniforms("ModelMatrix", "TextureMatrix", "color_change");
|
assignUniforms("ModelMatrix", "texture_trans", "color_change");
|
||||||
assignSamplerNames(0, "DiffuseMap", ST_NEAREST_FILTERED,
|
assignSamplerNames(0, "DiffuseMap", ST_NEAREST_FILTERED,
|
||||||
1, "SpecularMap", ST_NEAREST_FILTERED,
|
1, "SpecularMap", ST_NEAREST_FILTERED,
|
||||||
2, "SSAO", ST_BILINEAR_FILTERED,
|
2, "SSAO", ST_BILINEAR_FILTERED,
|
||||||
@ -364,7 +364,7 @@ Shaders::TransparentShader::TransparentShader()
|
|||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
||||||
GL_FRAGMENT_SHADER, "transparent.frag");
|
GL_FRAGMENT_SHADER, "transparent.frag");
|
||||||
assignUniforms("ModelMatrix", "TextureMatrix", "custom_alpha");
|
assignUniforms("ModelMatrix", "texture_trans", "custom_alpha");
|
||||||
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
||||||
} // TransparentShader
|
} // TransparentShader
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ Shaders::TransparentFogShader::TransparentFogShader()
|
|||||||
{
|
{
|
||||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
loadProgram(OBJECT, GL_VERTEX_SHADER, "object_pass.vert",
|
||||||
GL_FRAGMENT_SHADER, "transparentfog.frag");
|
GL_FRAGMENT_SHADER, "transparentfog.frag");
|
||||||
assignUniforms("ModelMatrix", "TextureMatrix", "fogmax", "startH",
|
assignUniforms("ModelMatrix", "texture_trans", "fogmax", "startH",
|
||||||
"endH", "start", "end", "col");
|
"endH", "start", "end", "col");
|
||||||
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
assignSamplerNames(0, "tex", ST_TRILINEAR_ANISOTROPIC_FILTERED);
|
||||||
} // TransparentFogShader
|
} // TransparentFogShader
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
class TransparentShader : public TextureShader<TransparentShader, 1,
|
class TransparentShader : public TextureShader<TransparentShader, 1,
|
||||||
core::matrix4, core::matrix4,
|
core::matrix4, core::vector2df,
|
||||||
float >
|
float >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -129,7 +129,7 @@ public:
|
|||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
class TransparentFogShader : public TextureShader<TransparentFogShader, 1,
|
class TransparentFogShader : public TextureShader<TransparentFogShader, 1,
|
||||||
core::matrix4, core::matrix4, float, float,
|
core::matrix4, core::vector2df, float, float,
|
||||||
float, float, float, video::SColorf >
|
float, float, float, video::SColorf >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -145,7 +145,7 @@ public:
|
|||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
class ObjectPass2Shader : public TextureShader < ObjectPass2Shader, 6,
|
class ObjectPass2Shader : public TextureShader < ObjectPass2Shader, 6,
|
||||||
core::matrix4, core::matrix4,
|
core::matrix4, core::vector2df,
|
||||||
core::vector2df >
|
core::vector2df >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -186,10 +186,18 @@ void STKAnimatedMesh::updateNoGL()
|
|||||||
for (u32 i = 0; i < m->getMeshBufferCount(); ++i)
|
for (u32 i = 0; i < m->getMeshBufferCount(); ++i)
|
||||||
{
|
{
|
||||||
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
|
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
|
||||||
if (!mb)
|
if (mb != NULL)
|
||||||
continue;
|
{
|
||||||
if (mb)
|
// Test if texture matrix needs to be updated every frame
|
||||||
GLmeshes[i].TextureMatrix = getMaterial(i).getTextureMatrix(0);
|
const core::matrix4& mat = getMaterial(i).getTextureMatrix(0);
|
||||||
|
if (mat.isIdentity())
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GLmeshes[i].texture_trans.X = mat[8];
|
||||||
|
GLmeshes[i].texture_trans.Y = mat[9];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ GLMesh allocateMeshBuffer(scene::IMeshBuffer* mb, const std::string& debug_name,
|
|||||||
}
|
}
|
||||||
for (unsigned i = 0; i < 8; i++)
|
for (unsigned i = 0; i < 8; i++)
|
||||||
result.textures[i] = mb->getMaterial().getTexture(i);
|
result.textures[i] = mb->getMaterial().getTexture(i);
|
||||||
result.TextureMatrix = 0;
|
result.texture_trans = core::vector2df(0.0f, 0.0f);
|
||||||
result.VAOType = mb->getVertexType();
|
result.VAOType = mb->getVertexType();
|
||||||
return result;
|
return result;
|
||||||
} // allocateMeshBuffer
|
} // allocateMeshBuffer
|
||||||
|
@ -53,7 +53,7 @@ struct GLMesh
|
|||||||
GLenum IndexType;
|
GLenum IndexType;
|
||||||
size_t IndexCount;
|
size_t IndexCount;
|
||||||
size_t Stride;
|
size_t Stride;
|
||||||
core::matrix4 TextureMatrix;
|
core::vector2df texture_trans;
|
||||||
size_t vaoBaseVertex;
|
size_t vaoBaseVertex;
|
||||||
size_t vaoOffset;
|
size_t vaoOffset;
|
||||||
video::E_VERTEX_TYPE VAOType;
|
video::E_VERTEX_TYPE VAOType;
|
||||||
@ -112,18 +112,18 @@ public:
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListMatDefault : public MeshList<ListMatDefault, GLMesh *, core::matrix4,
|
class ListMatDefault : public MeshList<ListMatDefault, GLMesh *, core::matrix4,
|
||||||
core::matrix4, core::matrix4,
|
core::matrix4, core::vector2df,
|
||||||
core::vector2df>
|
core::vector2df>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListMatAlphaRef : public MeshList<ListMatAlphaRef, GLMesh *, core::matrix4,
|
class ListMatAlphaRef : public MeshList<ListMatAlphaRef, GLMesh *, core::matrix4,
|
||||||
core::matrix4, core::matrix4>
|
core::matrix4, core::vector2df>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListMatNormalMap : public MeshList<ListMatNormalMap, GLMesh *, core::matrix4,
|
class ListMatNormalMap : public MeshList<ListMatNormalMap, GLMesh *, core::matrix4,
|
||||||
core::matrix4, core::matrix4,
|
core::matrix4, core::vector2df,
|
||||||
core::vector2df>
|
core::vector2df>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ class ListMatGrass : public MeshList<ListMatGrass, GLMesh *, core::matrix4,
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListMatSphereMap : public MeshList<ListMatSphereMap, GLMesh *,
|
class ListMatSphereMap : public MeshList<ListMatSphereMap, GLMesh *,
|
||||||
core::matrix4, core::matrix4,
|
core::matrix4, core::matrix4,
|
||||||
core::matrix4>
|
core::vector2df>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -145,12 +145,12 @@ class ListMatSplatting : public MeshList<ListMatSplatting, GLMesh *,
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListMatUnlit : public MeshList<ListMatUnlit, GLMesh *, core::matrix4,
|
class ListMatUnlit : public MeshList<ListMatUnlit, GLMesh *, core::matrix4,
|
||||||
core::matrix4, core::matrix4>
|
core::matrix4, core::vector2df>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListMatDetails : public MeshList<ListMatDetails, GLMesh *, core::matrix4,
|
class ListMatDetails : public MeshList<ListMatDetails, GLMesh *, core::matrix4,
|
||||||
core::matrix4, core::matrix4>
|
core::matrix4, core::vector2df>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -161,38 +161,38 @@ class MiscList : public Singleton<T>, public std::vector<STK::Tuple<Args...> >
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListBlendTransparent : public MiscList<ListBlendTransparent, GLMesh *,
|
class ListBlendTransparent : public MiscList<ListBlendTransparent, GLMesh *,
|
||||||
core::matrix4, core::matrix4,
|
core::matrix4, core::vector2df,
|
||||||
float>
|
float>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListAdditiveTransparent : public MiscList<ListAdditiveTransparent,
|
class ListAdditiveTransparent : public MiscList<ListAdditiveTransparent,
|
||||||
GLMesh *, core::matrix4,
|
GLMesh *, core::matrix4,
|
||||||
core::matrix4, float>
|
core::vector2df, float>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListTranslucentStandard : public MiscList<ListTranslucentStandard,
|
class ListTranslucentStandard : public MiscList<ListTranslucentStandard,
|
||||||
GLMesh *, core::matrix4,
|
GLMesh *, core::matrix4,
|
||||||
core::matrix4, float>
|
core::vector2df, float>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListTranslucentTangents : public MiscList<ListTranslucentTangents,
|
class ListTranslucentTangents : public MiscList<ListTranslucentTangents,
|
||||||
GLMesh *, core::matrix4,
|
GLMesh *, core::matrix4,
|
||||||
core::matrix4, float>
|
core::vector2df, float>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListTranslucent2TCoords : public MiscList<ListTranslucent2TCoords,
|
class ListTranslucent2TCoords : public MiscList<ListTranslucent2TCoords,
|
||||||
GLMesh *, core::matrix4,
|
GLMesh *, core::matrix4,
|
||||||
core::matrix4, float>
|
core::vector2df, float>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListBlendTransparentFog : public MiscList<ListBlendTransparentFog,
|
class ListBlendTransparentFog : public MiscList<ListBlendTransparentFog,
|
||||||
GLMesh *, core::matrix4,
|
GLMesh *, core::matrix4,
|
||||||
core::matrix4, float, float,
|
core::vector2df, float, float,
|
||||||
float, float, float,
|
float, float, float,
|
||||||
video::SColorf>
|
video::SColorf>
|
||||||
{};
|
{};
|
||||||
@ -200,7 +200,7 @@ class ListBlendTransparentFog : public MiscList<ListBlendTransparentFog,
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
class ListAdditiveTransparentFog : public MiscList<ListAdditiveTransparentFog,
|
class ListAdditiveTransparentFog : public MiscList<ListAdditiveTransparentFog,
|
||||||
GLMesh *, core::matrix4,
|
GLMesh *, core::matrix4,
|
||||||
core::matrix4, float, float,
|
core::vector2df, float, float,
|
||||||
float, float, float,
|
float, float, float,
|
||||||
video::SColorf>
|
video::SColorf>
|
||||||
{};
|
{};
|
||||||
|
@ -238,9 +238,18 @@ void STKMeshSceneNode::updateNoGL()
|
|||||||
for (u32 i = 0; i < Mesh->getMeshBufferCount(); ++i)
|
for (u32 i = 0; i < Mesh->getMeshBufferCount(); ++i)
|
||||||
{
|
{
|
||||||
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
|
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
|
||||||
if (!mb)
|
if (mb != NULL)
|
||||||
continue;
|
{
|
||||||
GLmeshes[i].TextureMatrix = getMaterial(i).getTextureMatrix(0);
|
// Test if texture matrix needs to be updated every frame
|
||||||
|
const core::matrix4& mat = getMaterial(i).getTextureMatrix(0);
|
||||||
|
if (mat.isIdentity())
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GLmeshes[i].texture_trans.X = mat[8];
|
||||||
|
GLmeshes[i].texture_trans.Y = mat[9];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,7 +458,7 @@ void STKMeshSceneNode::render()
|
|||||||
getTextureGLuint(mesh.textures[1]),
|
getTextureGLuint(mesh.textures[1]),
|
||||||
getTextureGLuint(mesh.textures[7]));
|
getTextureGLuint(mesh.textures[7]));
|
||||||
Shaders::ObjectPass2Shader::getInstance()->setUniforms(AbsoluteTransformation,
|
Shaders::ObjectPass2Shader::getInstance()->setUniforms(AbsoluteTransformation,
|
||||||
mesh.TextureMatrix,
|
mesh.texture_trans,
|
||||||
core::vector2df(0.0f, 0.0f));
|
core::vector2df(0.0f, 0.0f));
|
||||||
assert(mesh.vao);
|
assert(mesh.vao);
|
||||||
glBindVertexArray(mesh.vao);
|
glBindVertexArray(mesh.vao);
|
||||||
@ -534,7 +543,7 @@ void STKMeshSceneNode::render()
|
|||||||
->setTextureUnits(getTextureGLuint(mesh.textures[0]));
|
->setTextureUnits(getTextureGLuint(mesh.textures[0]));
|
||||||
}
|
}
|
||||||
Shaders::TransparentFogShader::getInstance()
|
Shaders::TransparentFogShader::getInstance()
|
||||||
->setUniforms(AbsoluteTransformation, mesh.TextureMatrix,
|
->setUniforms(AbsoluteTransformation, mesh.texture_trans,
|
||||||
fogmax, startH, endH, start, end, col);
|
fogmax, startH, endH, start, end, col);
|
||||||
|
|
||||||
assert(mesh.vao);
|
assert(mesh.vao);
|
||||||
@ -570,7 +579,7 @@ void STKMeshSceneNode::render()
|
|||||||
#endif
|
#endif
|
||||||
Shaders::TransparentShader::getInstance()->setTextureUnits(getTextureGLuint(mesh.textures[0]));
|
Shaders::TransparentShader::getInstance()->setTextureUnits(getTextureGLuint(mesh.textures[0]));
|
||||||
|
|
||||||
Shaders::TransparentShader::getInstance()->setUniforms(AbsoluteTransformation, mesh.TextureMatrix, 1.0f);
|
Shaders::TransparentShader::getInstance()->setUniforms(AbsoluteTransformation, mesh.texture_trans, 1.0f);
|
||||||
assert(mesh.vao);
|
assert(mesh.vao);
|
||||||
glBindVertexArray(mesh.vao);
|
glBindVertexArray(mesh.vao);
|
||||||
glDrawElements(ptype, count, itype, 0);
|
glDrawElements(ptype, count, itype, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user