Backed out changeset: f665fcc42968 (except dru.cpp)

This commit is contained in:
kaetemi 2014-06-19 20:22:12 +02:00
parent 00528e1cd6
commit 8967f57fdf
11 changed files with 0 additions and 15 deletions

View file

@ -103,7 +103,6 @@ void CDeform2d::doDeform(const TPoint2DVect &surf, IDriver *drv, IPerturbUV *uvp
static CVertexBuffer vb; static CVertexBuffer vb;
vb.setName("CDeform2d"); vb.setName("CDeform2d");
vb.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag); vb.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);

View file

@ -59,7 +59,6 @@ void CMotionBlur::performMotionBlur(IDriver *driver, float motionBlurAmount)
static CVertexBuffer vb ; static CVertexBuffer vb ;
vb.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag ) ; vb.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::TexCoord0Flag ) ;
vb.setNumVertices(4) ; vb.setNumVertices(4) ;
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
uint32 width, height ; uint32 width, height ;
driver->getWindowSize(width, height) ; driver->getWindowSize(width, height) ;

View file

@ -519,7 +519,6 @@ void CPSFanLight::getVBnIB(CVertexBuffer *&retVb, CIndexBuffer *&retIb)
vb.setName("CPSFanLight"); vb.setName("CPSFanLight");
ib.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); ib.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
ib.setNumIndexes(size * _NbFans * 3); ib.setNumIndexes(size * _NbFans * 3);
ib.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
// pointer on the current index to fill // pointer on the current index to fill
CIndexBufferReadWrite iba; CIndexBufferReadWrite iba;
ib.lock (iba); ib.lock (iba);

View file

@ -421,7 +421,6 @@ void CPSGravity::show()
vb.setVertexFormat(CVertexBuffer::PositionFlag); vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(6); vb.setNumVertices(6);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock (vba); vb.lock (vba);
@ -434,7 +433,6 @@ void CPSGravity::show()
} }
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2*4); pb.setNumIndexes(2*4);
pb.setPreferredMemory(CIndexBuffer::RAMVolatile, false);
{ {
CIndexBufferReadWrite ibaWrite; CIndexBufferReadWrite ibaWrite;
pb.lock (ibaWrite); pb.lock (ibaWrite);

View file

@ -971,7 +971,6 @@ CPSRibbon::CVBnPB &CPSRibbon::getVBnPB()
); );
vb.setNumVertices((_UsedNbSegs + 1) * numRibbonInVB * numVerticesInSlice); // 1 seg = 1 line + terminal vertices vb.setNumVertices((_UsedNbSegs + 1) * numRibbonInVB * numVerticesInSlice); // 1 seg = 1 line + terminal vertices
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
// set the primitive block size // set the primitive block size
if (_BraceMode) if (_BraceMode)
{ {

View file

@ -582,7 +582,6 @@ CPSRibbonLookAt::CVBnPB &CPSRibbonLookAt::getVBnPB()
CIndexBuffer &pb = VBnPB.PB; CIndexBuffer &pb = VBnPB.PB;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes((_UsedNbSegs << 1) * numRibbonInVB * 3); pb.setNumIndexes((_UsedNbSegs << 1) * numRibbonInVB * 3);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
CIndexBufferReadWrite iba; CIndexBufferReadWrite iba;
pb.lock (iba); pb.lock (iba);
/// Setup the pb and vb parts. Not very fast but executed only once /// Setup the pb and vb parts. Not very fast but executed only once

View file

@ -530,7 +530,6 @@ void CPSShockWave::getVBnPB(CVertexBuffer *&retVb, CIndexBuffer *&retPb)
vb.lock (vba); vb.lock (vba);
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2 * 3 * size * _NbSeg); pb.setNumIndexes(2 * 3 * size * _NbSeg);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
CIndexBufferReadWrite ibaWrite; CIndexBufferReadWrite ibaWrite;
pb.lock (ibaWrite); pb.lock (ibaWrite);
uint finalIndex = 0; uint finalIndex = 0;

View file

@ -422,7 +422,6 @@ CPSTailDot::CVBnPB &CPSTailDot::getVBnPB()
CIndexBuffer &pb = VBnPB.PB; CIndexBuffer &pb = VBnPB.PB;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2 * _UsedNbSegs * numRibbonInVB); pb.setNumIndexes(2 * _UsedNbSegs * numRibbonInVB);
pb.setPreferredMemory(CIndexBuffer::AGPVolatile, false);
/// Setup the pb and vb parts. Not very fast but executed only once /// Setup the pb and vb parts. Not very fast but executed only once
uint vbIndex = 0; uint vbIndex = 0;
uint pbIndex = 0; uint pbIndex = 0;

View file

@ -117,7 +117,6 @@ void CPSUtil::displayBBox(NL3D::IDriver *driver, const NLMISC::CAABBox &box, NLM
CVertexBuffer vb; CVertexBuffer vb;
vb.setVertexFormat(CVertexBuffer::PositionFlag); vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(8); vb.setNumVertices(8);
vb.setPreferredMemory(CVertexBuffer::AGPVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
@ -146,7 +145,6 @@ void CPSUtil::displayBBox(NL3D::IDriver *driver, const NLMISC::CAABBox &box, NLM
CIndexBuffer pb; CIndexBuffer pb;
pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); pb.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
pb.setNumIndexes(2*12); pb.setNumIndexes(2*12);
pb.setPreferredMemory(CIndexBuffer::RAMVolatile, false);
{ {
CIndexBufferReadWrite ibaWrite; CIndexBufferReadWrite ibaWrite;
pb.lock (ibaWrite); pb.lock (ibaWrite);
@ -208,7 +206,6 @@ void CPSUtil::displayArrow(IDriver *driver, const CVector &start, const CVector
CVertexBuffer vb; CVertexBuffer vb;
vb.setVertexFormat(CVertexBuffer::PositionFlag); vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(5); vb.setNumVertices(5);
vb.setPreferredMemory(CVertexBuffer::AGPVolatile, false);
{ {

View file

@ -1307,7 +1307,6 @@ void CInstanceGroup::displayDebugClusters(IDriver *drv, class CTextContext *tx
const uint maxVertices= 10000; const uint maxVertices= 10000;
vb.setVertexFormat(CVertexBuffer::PositionFlag); vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(maxVertices); vb.setNumVertices(maxVertices);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
CIndexBuffer clusterTriangles; CIndexBuffer clusterTriangles;
CIndexBuffer clusterLines; CIndexBuffer clusterLines;
CIndexBuffer portalTriangles; CIndexBuffer portalTriangles;

View file

@ -396,7 +396,6 @@ void CLandscapePolyDrawer::buildShadowVolume(uint poly)
// because they are calculated in camera location. // because they are calculated in camera location.
vb.setVertexFormat(CVertexBuffer::PositionFlag); vb.setVertexFormat(CVertexBuffer::PositionFlag);
vb.setNumVertices(2*verticesNb + 2); vb.setNumVertices(2*verticesNb + 2);
vb.setPreferredMemory(CVertexBuffer::RAMVolatile, false);
{ {
CVertexBufferReadWrite vba; CVertexBufferReadWrite vba;
vb.lock(vba); vb.lock(vba);
@ -412,7 +411,6 @@ void CLandscapePolyDrawer::buildShadowVolume(uint poly)
int index = 0; int index = 0;
ib.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT); ib.setFormat(NL_DEFAULT_INDEX_BUFFER_FORMAT);
ib.setNumIndexes(12*verticesNb); ib.setNumIndexes(12*verticesNb);
ib.setPreferredMemory(CIndexBuffer::RAMVolatile, false);
{ {
CIndexBufferReadWrite iba; CIndexBufferReadWrite iba;
ib.lock (iba); ib.lock (iba);