Made the command buffer have 20 elements in it to protect against wrapping
around.
This commit is contained in:
parent
c3f6e9f7cd
commit
314874cf81
@ -34,7 +34,7 @@
|
||||
#include <OpenThreads/Thread>
|
||||
#include <OpenThreads/Mutex>
|
||||
|
||||
#define NUM_CMD_INDEX 4
|
||||
#define NUM_CMD_INDEX 20
|
||||
|
||||
namespace osg {
|
||||
|
||||
@ -70,7 +70,11 @@ namespace osg {
|
||||
}
|
||||
|
||||
/// Rewind stream to beginning.
|
||||
virtual void rewind() { setCmd(THREAD_REWIND); }
|
||||
virtual void rewind()
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Rewind video"<<this<<std::endl;
|
||||
setCmd(THREAD_REWIND);
|
||||
}
|
||||
|
||||
virtual void quit(bool wiatForThreadToExit);
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include <osg/Math>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
/* defines */
|
||||
#define T(x) model->triangles[(x)]
|
||||
@ -210,6 +211,8 @@ _glmAddGroup(GLMmodel* model, char* name)
|
||||
group->next = model->groups;
|
||||
model->groups = group;
|
||||
model->numgroups++;
|
||||
|
||||
std::cout<<"_glmAddGroup="<<name<<std::endl;
|
||||
}
|
||||
|
||||
return group;
|
||||
@ -607,6 +610,8 @@ _glmFirstPass(GLMmodel* model, FILE* file)
|
||||
unsigned int numcolors = 0;
|
||||
|
||||
while(fscanf(file, "%s", buf) != EOF) {
|
||||
|
||||
|
||||
switch(buf[0]) {
|
||||
case '#': /* comment */
|
||||
/* eat up rest of line */
|
||||
@ -720,6 +725,9 @@ _glmFirstPass(GLMmodel* model, FILE* file)
|
||||
fgets(buf, sizeof(buf), file);
|
||||
break;
|
||||
}
|
||||
|
||||
std::cout<<"line="<<buf<<std::endl;
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -850,8 +858,8 @@ _glmSecondPass(GLMmodel* model, FILE* file)
|
||||
fgets(buf, sizeof(buf), file);
|
||||
char compositeName[128];
|
||||
createCompositeName(buf,compositeName);
|
||||
|
||||
group = _glmFindGroup(model, compositeName);
|
||||
std::cout<<"compositeName="<<compositeName<<" group="<<group<<std::endl;
|
||||
group->material = material;
|
||||
firstGroup = false;
|
||||
break;
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <OpenThreads/Thread>
|
||||
#include <OpenThreads/Mutex>
|
||||
|
||||
#define NUM_CMD_INDEX 4
|
||||
#define NUM_CMD_INDEX 20
|
||||
|
||||
namespace osg {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user