mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Make irrArray backed by std::vector (#101)
This commit is contained in:
@ -70,9 +70,9 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
|
||||
|
||||
const u32 WORD_BUFFER_LENGTH = 512;
|
||||
|
||||
core::array<core::vector3df, core::irrAllocatorFast<core::vector3df> > vertexBuffer(1000);
|
||||
core::array<core::vector3df, core::irrAllocatorFast<core::vector3df> > normalsBuffer(1000);
|
||||
core::array<core::vector2df, core::irrAllocatorFast<core::vector2df> > textureCoordBuffer(1000);
|
||||
core::array<core::vector3df> vertexBuffer(1000);
|
||||
core::array<core::vector3df> normalsBuffer(1000);
|
||||
core::array<core::vector2df> textureCoordBuffer(1000);
|
||||
|
||||
SObjMtl * currMtl = new SObjMtl();
|
||||
Materials.push_back(currMtl);
|
||||
|
@ -112,12 +112,12 @@ bool COGLES1Driver::genericDriverInit(const core::dimension2d<u32>& screenSize,
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
|
||||
UserClipPlane.reallocate(MaxUserClipPlanes);
|
||||
UserClipPlaneEnabled.reallocate(MaxUserClipPlanes);
|
||||
UserClipPlaneEnabled.resize(MaxUserClipPlanes);
|
||||
|
||||
for (s32 i = 0; i < MaxUserClipPlanes; ++i)
|
||||
{
|
||||
UserClipPlane.push_back(core::plane3df());
|
||||
UserClipPlaneEnabled.push_back(false);
|
||||
UserClipPlaneEnabled[i] = false;
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < ETS_COUNT; ++i)
|
||||
|
@ -363,7 +363,7 @@ namespace video
|
||||
|
||||
SMaterial Material, LastMaterial;
|
||||
core::array<core::plane3df> UserClipPlane;
|
||||
core::array<bool> UserClipPlaneEnabled;
|
||||
std::vector<bool> UserClipPlaneEnabled;
|
||||
|
||||
core::stringc VendorName;
|
||||
|
||||
|
@ -231,6 +231,9 @@ namespace scene
|
||||
|
||||
struct DefaultNodeEntry
|
||||
{
|
||||
DefaultNodeEntry()
|
||||
{ }
|
||||
|
||||
DefaultNodeEntry(ISceneNode* n) :
|
||||
Node(n), TextureValue(0)
|
||||
{
|
||||
@ -251,6 +254,9 @@ namespace scene
|
||||
//! sort on distance (center) to camera
|
||||
struct TransparentNodeEntry
|
||||
{
|
||||
TransparentNodeEntry()
|
||||
{ }
|
||||
|
||||
TransparentNodeEntry(ISceneNode* n, const core::vector3df& camera)
|
||||
: Node(n)
|
||||
{
|
||||
|
@ -1042,7 +1042,7 @@ void CSkinnedMesh::finalize()
|
||||
|
||||
for (i=0; i<LocalBuffers.size(); ++i)
|
||||
{
|
||||
Vertices_Moved.push_back( core::array<bool>() );
|
||||
Vertices_Moved.push_back( core::array<char>() );
|
||||
Vertices_Moved[i].set_used(LocalBuffers[i]->getVertexCount());
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,9 @@ private:
|
||||
core::array<SJoint*> AllJoints;
|
||||
core::array<SJoint*> RootJoints;
|
||||
|
||||
core::array< core::array<bool> > Vertices_Moved;
|
||||
// bool can't be used here because std::vector<bool>
|
||||
// doesn't allow taking a reference to individual elements.
|
||||
core::array< core::array<char> > Vertices_Moved;
|
||||
|
||||
core::aabbox3d<f32> BoundingBox;
|
||||
|
||||
|
Reference in New Issue
Block a user