Add return values.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1097 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2007-12-05 17:15:18 +00:00
parent 2ca8282e00
commit 37e2685cc6
2 changed files with 8 additions and 4 deletions

View File

@ -316,7 +316,7 @@ namespace video
virtual SHWBufferLink *getBufferLink(const scene::IMeshBuffer* mb); virtual SHWBufferLink *getBufferLink(const scene::IMeshBuffer* mb);
//! updates hardware buffer if needed (only some drivers can) //! updates hardware buffer if needed (only some drivers can)
virtual bool updateHardwareBuffer(SHWBufferLink *HWBuffer) {} virtual bool updateHardwareBuffer(SHWBufferLink *HWBuffer) {return true;}
//! Create hardware buffer from mesh (only some drivers can) //! Create hardware buffer from mesh (only some drivers can)
virtual SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb) {return 0;} virtual SHWBufferLink *createHardwareBuffer(const scene::IMeshBuffer* mb) {return 0;}

View File

@ -639,7 +639,8 @@ bool COpenGLDriver::updateIndexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
//! updates hardware buffer if needed //! updates hardware buffer if needed
bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer) bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer)
{ {
if (!HWBuffer) return false; if (!HWBuffer)
return false;
if (HWBuffer->ChangedID != HWBuffer->MeshBuffer->getChangedID() if (HWBuffer->ChangedID != HWBuffer->MeshBuffer->getChangedID()
|| !((SHWBufferLink_opengl*)HWBuffer)->vbo_indicesID || !((SHWBufferLink_opengl*)HWBuffer)->vbo_indicesID
@ -647,9 +648,12 @@ bool COpenGLDriver::updateHardwareBuffer(SHWBufferLink *HWBuffer)
{ {
HWBuffer->ChangedID = HWBuffer->MeshBuffer->getChangedID(); HWBuffer->ChangedID = HWBuffer->MeshBuffer->getChangedID();
if (!updateVertexHardwareBuffer((SHWBufferLink_opengl*)HWBuffer)) return false; if (!updateVertexHardwareBuffer((SHWBufferLink_opengl*)HWBuffer))
if (!updateIndexHardwareBuffer((SHWBufferLink_opengl*)HWBuffer)) return false; return false;
if (!updateIndexHardwareBuffer((SHWBufferLink_opengl*)HWBuffer))
return false;
} }
return true;
} }
//! Create hardware buffer from mesh //! Create hardware buffer from mesh