work in progress.

This commit is contained in:
castano
2011-09-29 00:58:47 +00:00
parent 9de43e7757
commit 676a0b2908
7 changed files with 386 additions and 258 deletions

View File

@ -44,13 +44,13 @@ namespace nvtt
{
nvDebugCheck( refCount() == 0 );
size = 0;
edgeLength = 0;
}
Private(const Private & p) : RefCounted() // Copy ctor. inits refcount to 0.
{
nvDebugCheck( refCount() == 0 );
size = p.size;
edgeLength = p.edgeLength;
for (uint i = 0; i < 6; i++) {
face[i] = p.face[6];
}
@ -59,17 +59,17 @@ namespace nvtt
{
}
void allocate(int size)
void allocate(uint edgeLength)
{
this->size = size;
this->edgeLength = edgeLength;
for (uint i = 0; i < 6; i++) {
face[i].detach();
face[i].m->image = new nv::FloatImage;
face[i].m->image->allocate(size, size, 1);
face[i].m->image->allocate(edgeLength, edgeLength, 1);
}
}
int size;
uint edgeLength;
Surface face[6];
};