Renamed IndexedSurfacePatch to SurfaceMesh.
This commit is contained in:
@ -24,18 +24,18 @@ freely, subject to the following restrictions:
|
||||
#include "OpenGLImmediateModeSupport.h"
|
||||
#include "OpenGLSupport.h"
|
||||
|
||||
#include "IndexedSurfacePatch.h"
|
||||
#include "SurfaceMesh.h"
|
||||
|
||||
using namespace PolyVox;
|
||||
using namespace std;
|
||||
|
||||
void renderRegionImmediateMode(PolyVox::IndexedSurfacePatch& isp, unsigned int uLodLevel)
|
||||
void renderRegionImmediateMode(PolyVox::SurfaceMesh& mesh, unsigned int uLodLevel)
|
||||
{
|
||||
const vector<SurfaceVertex>& vecVertices = isp.getVertices();
|
||||
const vector<PolyVox::uint32_t>& vecIndices = isp.getIndices();
|
||||
const vector<SurfaceVertex>& vecVertices = mesh.getVertices();
|
||||
const vector<PolyVox::uint32_t>& vecIndices = mesh.getIndices();
|
||||
|
||||
int beginIndex = isp.m_vecLodRecords[uLodLevel].beginIndex;
|
||||
int endIndex = isp.m_vecLodRecords[uLodLevel].endIndex;
|
||||
int beginIndex = mesh.m_vecLodRecords[uLodLevel].beginIndex;
|
||||
int endIndex = mesh.m_vecLodRecords[uLodLevel].endIndex;
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
//for(vector<PolyVox::uint32_t>::const_iterator iterIndex = vecIndices.begin(); iterIndex != vecIndices.end(); ++iterIndex)
|
||||
@ -44,7 +44,7 @@ void renderRegionImmediateMode(PolyVox::IndexedSurfacePatch& isp, unsigned int u
|
||||
const SurfaceVertex& vertex = vecVertices[vecIndices[index]];
|
||||
const Vector3DFloat& v3dVertexPos = vertex.getPosition();
|
||||
//const Vector3DFloat v3dRegionOffset(uRegionX * g_uRegionSideLength, uRegionY * g_uRegionSideLength, uRegionZ * g_uRegionSideLength);
|
||||
const Vector3DFloat v3dFinalVertexPos = v3dVertexPos + static_cast<Vector3DFloat>(isp.m_Region.getLowerCorner());
|
||||
const Vector3DFloat v3dFinalVertexPos = v3dVertexPos + static_cast<Vector3DFloat>(mesh.m_Region.getLowerCorner());
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user