2009-04-18 19:00:33 +02:00
|
|
|
/* Copyright (C) 2009 Wildfire Games.
|
|
|
|
* This file is part of 0 A.D.
|
|
|
|
*
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2009-04-18 19:51:05 +02:00
|
|
|
/*
|
|
|
|
* Implementation of HWLightingModelRenderer
|
2005-10-25 03:43:07 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "precompiled.h"
|
|
|
|
|
2006-06-02 04:10:27 +02:00
|
|
|
#include "lib/ogl.h"
|
2005-10-25 03:43:07 +02:00
|
|
|
#include "lib/res/graphics/ogl_shader.h"
|
2006-06-02 04:10:27 +02:00
|
|
|
#include "maths/Vector3D.h"
|
|
|
|
#include "maths/Vector4D.h"
|
2005-10-25 03:43:07 +02:00
|
|
|
|
|
|
|
#include "ps/CLogger.h"
|
|
|
|
|
|
|
|
#include "graphics/Color.h"
|
2006-02-13 15:18:20 +01:00
|
|
|
#include "graphics/LightEnv.h"
|
2005-10-25 03:43:07 +02:00
|
|
|
#include "graphics/Model.h"
|
|
|
|
#include "graphics/ModelDef.h"
|
|
|
|
|
|
|
|
#include "renderer/HWLightingModelRenderer.h"
|
|
|
|
#include "renderer/Renderer.h"
|
|
|
|
#include "renderer/RenderModifiers.h"
|
|
|
|
#include "renderer/RenderPathVertexShader.h"
|
|
|
|
#include "renderer/VertexArray.h"
|
|
|
|
|
|
|
|
|
2009-11-03 22:46:35 +01:00
|
|
|
#define LOG_CATEGORY L"graphics"
|
2005-10-25 03:43:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HWLightingModelRenderer implementation
|
|
|
|
|
|
|
|
struct HWLModelDef : public CModelDefRPrivate
|
|
|
|
{
|
|
|
|
/// Indices are the same for all models, so share them
|
|
|
|
u16* m_Indices;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
|
2008-07-17 16:23:51 +02:00
|
|
|
HWLModelDef(const CModelDefPtr& mdef);
|
2005-10-30 22:01:42 +01:00
|
|
|
~HWLModelDef() { delete[] m_Indices; }
|
2005-10-25 03:43:07 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-07-17 16:23:51 +02:00
|
|
|
HWLModelDef::HWLModelDef(const CModelDefPtr& mdef)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
|
|
|
m_Indices = new u16[mdef->GetNumFaces()*3];
|
|
|
|
ModelRenderer::BuildIndices(mdef, m_Indices);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct HWLModel
|
|
|
|
{
|
|
|
|
/// Dynamic per-CModel vertex array
|
|
|
|
VertexArray m_Array;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
/// Position and normals are recalculated on CPU every frame
|
|
|
|
VertexArray::Attribute m_Position;
|
|
|
|
VertexArray::Attribute m_Normal;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
/// UV is stored per-CModel in order to avoid space wastage due to alignment
|
|
|
|
VertexArray::Attribute m_UV;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
HWLModel() : m_Array(true) { }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct HWLightingModelRendererInternals
|
|
|
|
{
|
|
|
|
/// Currently used RenderModifier
|
|
|
|
RenderModifierPtr modifier;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
/// Previously prepared modeldef
|
|
|
|
HWLModelDef* hwlmodeldef;
|
2006-03-26 01:54:20 +01:00
|
|
|
|
|
|
|
/// If true, primary color will only contain the diffuse term
|
|
|
|
bool colorIsDiffuseOnly;
|
2005-10-25 03:43:07 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Construction and Destruction
|
2006-03-26 01:54:20 +01:00
|
|
|
HWLightingModelRenderer::HWLightingModelRenderer(bool colorIsDiffuseOnly)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
|
|
|
m = new HWLightingModelRendererInternals;
|
2005-11-06 00:15:23 +01:00
|
|
|
m->hwlmodeldef = 0;
|
2006-03-26 01:54:20 +01:00
|
|
|
m->colorIsDiffuseOnly = colorIsDiffuseOnly;
|
2005-10-25 03:43:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HWLightingModelRenderer::~HWLightingModelRenderer()
|
|
|
|
{
|
|
|
|
delete m;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Check hardware support
|
|
|
|
bool HWLightingModelRenderer::IsAvailable()
|
|
|
|
{
|
|
|
|
return g_Renderer.m_VertexShader != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Build model data (and modeldef data if necessary)
|
|
|
|
void* HWLightingModelRenderer::CreateModelData(CModel* model)
|
|
|
|
{
|
|
|
|
CModelDefPtr mdef = model->GetModelDef();
|
|
|
|
HWLModelDef* hwlmodeldef = (HWLModelDef*)mdef->GetRenderData(m);
|
|
|
|
|
|
|
|
if (!hwlmodeldef)
|
|
|
|
{
|
|
|
|
hwlmodeldef = new HWLModelDef(mdef);
|
|
|
|
mdef->SetRenderData(m, hwlmodeldef);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Build the per-model data
|
|
|
|
HWLModel* hwlmodel = new HWLModel;
|
|
|
|
|
|
|
|
hwlmodel->m_Position.type = GL_FLOAT;
|
|
|
|
hwlmodel->m_Position.elems = 3;
|
|
|
|
hwlmodel->m_Array.AddAttribute(&hwlmodel->m_Position);
|
|
|
|
|
|
|
|
hwlmodel->m_UV.type = GL_FLOAT;
|
|
|
|
hwlmodel->m_UV.elems = 2;
|
|
|
|
hwlmodel->m_Array.AddAttribute(&hwlmodel->m_UV);
|
|
|
|
|
|
|
|
hwlmodel->m_Normal.type = GL_FLOAT;
|
|
|
|
hwlmodel->m_Normal.elems = 3;
|
|
|
|
hwlmodel->m_Array.AddAttribute(&hwlmodel->m_Normal);
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
hwlmodel->m_Array.SetNumVertices(mdef->GetNumVertices());
|
|
|
|
hwlmodel->m_Array.Layout();
|
|
|
|
|
|
|
|
// Fill in static UV coordinates
|
|
|
|
VertexArrayIterator<float[2]> UVit = hwlmodel->m_UV.GetIterator<float[2]>();
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
ModelRenderer::BuildUV(mdef, UVit);
|
|
|
|
|
|
|
|
return hwlmodel;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Fill in and upload dynamic vertex array
|
had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).
it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.
after several hours, the code now requires fewer casts and less
guesswork.
other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.
This was SVN commit r5942.
2008-05-11 20:48:32 +02:00
|
|
|
void HWLightingModelRenderer::UpdateModelData(CModel* model, void* data, int updateflags)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
|
|
|
HWLModel* hwlmodel = (HWLModel*)data;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
if (updateflags & RENDERDATA_UPDATE_VERTICES)
|
|
|
|
{
|
|
|
|
// build vertices
|
|
|
|
VertexArrayIterator<CVector3D> Position = hwlmodel->m_Position.GetIterator<CVector3D>();
|
|
|
|
VertexArrayIterator<CVector3D> Normal = hwlmodel->m_Normal.GetIterator<CVector3D>();
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
ModelRenderer::BuildPositionAndNormals(model, Position, Normal);
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
// upload everything to vertex buffer
|
|
|
|
hwlmodel->m_Array.Upload();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Cleanup per-model data.
|
|
|
|
// Note that per-CModelDef data is deleted by the CModelDef itself.
|
2005-10-31 17:26:51 +01:00
|
|
|
void HWLightingModelRenderer::DestroyModelData(CModel* UNUSED(model), void* data)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
|
|
|
HWLModel* hwlmodel = (HWLModel*)data;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
delete hwlmodel;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
// Setup one rendering pass
|
had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).
it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.
after several hours, the code now requires fewer casts and less
guesswork.
other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.
This was SVN commit r5942.
2008-05-11 20:48:32 +02:00
|
|
|
void HWLightingModelRenderer::BeginPass(int streamflags, const CMatrix3D* texturematrix)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
2006-03-26 01:54:20 +01:00
|
|
|
debug_assert(streamflags == (streamflags & (STREAM_POS|STREAM_UV0|STREAM_COLOR|STREAM_TEXGENTOUV1)));
|
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
glEnableClientState(GL_VERTEX_ARRAY);
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
if (streamflags & STREAM_UV0) glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
|
|
if (streamflags & STREAM_COLOR)
|
|
|
|
{
|
2006-03-26 01:54:20 +01:00
|
|
|
RenderPathVertexShader* rpvs = g_Renderer.m_VertexShader;
|
2006-02-13 15:18:20 +01:00
|
|
|
const CLightEnv& lightEnv = g_Renderer.GetLightEnv();
|
2006-03-26 01:54:20 +01:00
|
|
|
VS_GlobalLight* lightConfig;
|
|
|
|
|
|
|
|
if (streamflags & STREAM_TEXGENTOUV1)
|
|
|
|
{
|
|
|
|
ogl_program_use(rpvs->m_ModelLightP);
|
|
|
|
lightConfig = &rpvs->m_ModelLightP_Light;
|
|
|
|
|
|
|
|
rpvs->m_ModelLightP_PosToUV1.SetMatrix(*texturematrix);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ogl_program_use(rpvs->m_ModelLight);
|
|
|
|
lightConfig = &rpvs->m_ModelLight_Light;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m->colorIsDiffuseOnly)
|
|
|
|
lightConfig->SetAmbient(RGBColor(0,0,0));
|
|
|
|
else
|
|
|
|
lightConfig->SetAmbient(lightEnv.m_UnitsAmbientColor);
|
|
|
|
lightConfig->SetSunDir(lightEnv.GetSunDir());
|
|
|
|
lightConfig->SetSunColor(lightEnv.m_SunColor);
|
2005-11-06 00:15:23 +01:00
|
|
|
|
|
|
|
glEnableClientState(GL_NORMAL_ARRAY);
|
|
|
|
}
|
2006-03-26 01:54:20 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (streamflags & STREAM_TEXGENTOUV1)
|
|
|
|
{
|
|
|
|
pglActiveTextureARB(GL_TEXTURE1);
|
|
|
|
|
|
|
|
float tmp[4];
|
|
|
|
|
|
|
|
glEnable(GL_TEXTURE_GEN_S);
|
|
|
|
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
|
|
|
|
tmp[0] = texturematrix->_11;
|
|
|
|
tmp[1] = texturematrix->_12;
|
|
|
|
tmp[2] = texturematrix->_13;
|
|
|
|
tmp[3] = texturematrix->_14;
|
|
|
|
glTexGenfv(GL_S, GL_OBJECT_PLANE, tmp);
|
|
|
|
|
|
|
|
glEnable(GL_TEXTURE_GEN_T);
|
|
|
|
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
|
|
|
|
tmp[0] = texturematrix->_21;
|
|
|
|
tmp[1] = texturematrix->_22;
|
|
|
|
tmp[2] = texturematrix->_23;
|
|
|
|
tmp[3] = texturematrix->_24;
|
|
|
|
glTexGenfv(GL_T, GL_OBJECT_PLANE, tmp);
|
|
|
|
|
|
|
|
glEnable(GL_TEXTURE_GEN_R);
|
|
|
|
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
|
|
|
|
tmp[0] = texturematrix->_31;
|
|
|
|
tmp[1] = texturematrix->_32;
|
|
|
|
tmp[2] = texturematrix->_33;
|
|
|
|
tmp[3] = texturematrix->_34;
|
|
|
|
glTexGenfv(GL_R, GL_OBJECT_PLANE, tmp);
|
|
|
|
|
|
|
|
pglActiveTextureARB(GL_TEXTURE0);
|
|
|
|
}
|
|
|
|
}
|
2005-10-25 03:43:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
// Cleanup one rendering pass
|
had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).
it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.
after several hours, the code now requires fewer casts and less
guesswork.
other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.
This was SVN commit r5942.
2008-05-11 20:48:32 +02:00
|
|
|
void HWLightingModelRenderer::EndPass(int streamflags)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
2005-11-06 00:15:23 +01:00
|
|
|
if (streamflags & STREAM_UV0) glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
|
|
|
if (streamflags & STREAM_COLOR)
|
|
|
|
{
|
|
|
|
pglUseProgramObjectARB(0);
|
|
|
|
|
|
|
|
glDisableClientState(GL_NORMAL_ARRAY);
|
|
|
|
}
|
2006-03-26 01:54:20 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (streamflags & STREAM_TEXGENTOUV1)
|
|
|
|
{
|
|
|
|
pglActiveTextureARB(GL_TEXTURE1);
|
|
|
|
|
|
|
|
glDisable(GL_TEXTURE_GEN_S);
|
|
|
|
glDisable(GL_TEXTURE_GEN_T);
|
|
|
|
glDisable(GL_TEXTURE_GEN_R);
|
|
|
|
|
|
|
|
pglActiveTextureARB(GL_TEXTURE0);
|
|
|
|
}
|
|
|
|
}
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
glDisableClientState(GL_VERTEX_ARRAY);
|
2005-10-25 03:43:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
// Prepare UV coordinates for this modeldef
|
2008-07-17 16:23:51 +02:00
|
|
|
void HWLightingModelRenderer::PrepareModelDef(int UNUSED(streamflags), const CModelDefPtr& def)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
2005-11-06 00:15:23 +01:00
|
|
|
m->hwlmodeldef = (HWLModelDef*)def->GetRenderData(m);
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-11-06 00:15:23 +01:00
|
|
|
debug_assert(m->hwlmodeldef);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Render one model
|
had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).
it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.
after several hours, the code now requires fewer casts and less
guesswork.
other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.
This was SVN commit r5942.
2008-05-11 20:48:32 +02:00
|
|
|
void HWLightingModelRenderer::RenderModel(int streamflags, CModel* model, void* data)
|
2005-11-06 00:15:23 +01:00
|
|
|
{
|
2005-10-25 03:43:07 +02:00
|
|
|
CModelDefPtr mdldef = model->GetModelDef();
|
|
|
|
HWLModel* hwlmodel = (HWLModel*)data;
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
u8* base = hwlmodel->m_Array.Bind();
|
|
|
|
GLsizei stride = (GLsizei)hwlmodel->m_Array.GetStride();
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
glVertexPointer(3, GL_FLOAT, stride, base + hwlmodel->m_Position.offset);
|
2005-11-06 00:15:23 +01:00
|
|
|
if (streamflags & STREAM_COLOR)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
|
|
|
CColor sc = model->GetShadingColor();
|
|
|
|
glColor3f(sc.r, sc.g, sc.b);
|
2006-02-13 15:18:20 +01:00
|
|
|
|
2005-10-25 03:43:07 +02:00
|
|
|
glNormalPointer(GL_FLOAT, stride, base + hwlmodel->m_Normal.offset);
|
|
|
|
}
|
2005-11-06 00:15:23 +01:00
|
|
|
if (streamflags & STREAM_UV0)
|
2005-10-25 03:43:07 +02:00
|
|
|
{
|
|
|
|
glTexCoordPointer(2, GL_FLOAT, stride, base + hwlmodel->m_UV.offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
// render the lot
|
|
|
|
size_t numFaces = mdldef->GetNumFaces();
|
2006-09-23 18:04:54 +02:00
|
|
|
|
|
|
|
if (!g_Renderer.m_SkipSubmit) {
|
|
|
|
pglDrawRangeElementsEXT(GL_TRIANGLES, 0, (GLuint)mdldef->GetNumVertices(),
|
|
|
|
(GLsizei)numFaces*3, GL_UNSIGNED_SHORT, m->hwlmodeldef->m_Indices);
|
|
|
|
}
|
2005-10-25 03:43:07 +02:00
|
|
|
|
|
|
|
// bump stats
|
|
|
|
g_Renderer.m_Stats.m_DrawCalls++;
|
|
|
|
g_Renderer.m_Stats.m_ModelTris += numFaces;
|
|
|
|
}
|
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
|