This commit is contained in:
Federico Ponchio 2005-02-19 12:06:55 +00:00
parent 9ce3dba5f7
commit c532f14569
4 changed files with 34 additions and 20 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.31 2005/02/19 10:45:04 ponchio
Patch generalized and small fixes.
Revision 1.30 2005/02/17 15:39:44 ponchio
Reorderes statistics a bit.
@ -232,8 +235,8 @@ void NexusMt::Draw(unsigned int cell, DrawContest &contest) {
fstart = NULL;
vstart = NULL;
cstart = (char *)(64 * patch.vstartc);
nstart = (char *)(64 * patch.vstartn);
cstart = (char *)(64 * (int)patch.vstartc);
nstart = (char *)(64 * (int)patch.vstartn);
} else {
fstart = (char *)patch.FaceBegin();
vstart = (char *)patch.Vert3fBegin();
@ -376,7 +379,7 @@ void NexusMt::LoadVbo(Entry &entry) {
vbo_used += size;
//TODO fix this when we allow data :p
size = 64 * patch.vstartd;
size = 64 * (int)patch.vstartd;
glGenBuffersARB(1, &entry.vbo_array);
assert(entry.vbo_array);

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.40 2005/02/17 15:39:44 ponchio
Reorderes statistics a bit.
Revision 1.39 2005/02/17 14:02:03 ponchio
Full screen options...
@ -371,7 +374,7 @@ int main(int argc, char *argv[]) {
SDL_WaitEvent(&event);
anything = true;
}
if(anything) {
while(anything) {
switch( event.type ) {
case SDL_QUIT: quit = 1; break;
case SDL_KEYDOWN:
@ -462,6 +465,8 @@ int main(int argc, char *argv[]) {
case SDL_VIDEOEXPOSE:
default: break;
}
anything = SDL_PeepEvents(&event, 1, SDL_GETEVENT,
SDL_ALLEVENTS);
}

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.10 2005/02/19 10:45:05 ponchio
Patch generalized and small fixes.
Revision 1.9 2005/02/08 12:43:03 ponchio
Added copyright
@ -161,13 +164,13 @@ void Patch::Init(Signature &signature,
}
pad64(offset);
fstartc = (unsigned short)offset/64;
fstartc = (unsigned short)(offset/64);
offset += encodings[signature.fcolor].size(nf);
fstartn = (unsigned short)offset/64;
fstartn = (unsigned short)(offset/64);
offset += encodings[signature.fnorm].size(nf);
fstartt = (unsigned short)offset/64;
fstartt = (unsigned short)(offset/64);
offset += encodings[signature.ftext].size(nf);
fstartd = (unsigned short)offset/64;
fstartd = (unsigned short)(offset/64);
offset += encodings[signature.fdata].size(nf);
vstart = fstart + offset;
@ -180,13 +183,13 @@ void Patch::Init(Signature &signature,
assert(0);
pad64(offset);
vstartc = (unsigned short)offset/64;
vstartc = (unsigned short)(offset/64);
offset += encodings[signature.vcolor].size(nv);
vstartn = (unsigned short)offset/64;
vstartn = (unsigned short)(offset/64);
offset += encodings[signature.vnorm].size(nv);
vstartt = (unsigned short)offset/64;
vstartt = (unsigned short)(offset/64);
offset += encodings[signature.vtext].size(nv);
vstartd = (unsigned short)offset/64;
vstartd = (unsigned short)(offset/64);
offset += encodings[signature.vdata].size(nv);

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.12 2005/02/19 10:45:05 ponchio
Patch generalized and small fixes.
Revision 1.11 2005/02/08 12:43:03 ponchio
Added copyright
@ -118,15 +121,15 @@ class Patch {
//vcg::Point3f &Vert(unsigned short v) { return VertBegin()[v]; }
// unsigned short *Face(unsigned short f) { return FaceBegin() + f * 3; }
char *VColorBegin() { return vstart + 64*vstartc; }
char *VNormBegin() { return vstart + 64*vstartn; }
char *VTextBegin() { return vstart + 64*vstartt; }
char *VDataBegin() { return vstart + 64*vstartd; }
char *VColorBegin() { return vstart + 64*(int)vstartc; }
char *VNormBegin() { return vstart + 64*(int)vstartn; }
char *VTextBegin() { return vstart + 64*(int)vstartt; }
char *VDataBegin() { return vstart + 64*(int)vstartd; }
char *FColorBegin() { return fstart + 64*fstartc; }
char *FNormBegin() { return fstart + 64*fstartn; }
char *FTextBegin() { return fstart + 64*fstartt; }
char *FDataBegin() { return fstart + 64*fstartd; }
char *FColorBegin() { return fstart + 64*(int)fstartc; }
char *FNormBegin() { return fstart + 64*(int)fstartn; }
char *FTextBegin() { return fstart + 64*(int)fstartt; }
char *FDataBegin() { return fstart + 64*(int)fstartd; }
static unsigned int ChunkSize(Signature &signature,
unsigned short nvert,