implemented basic shader expressions

This commit is contained in:
Dynamitos
2023-02-24 22:09:07 +01:00
parent 48fa098546
commit f46262b66e
67 changed files with 1390 additions and 852 deletions
@@ -44,11 +44,35 @@ void ArchiveBuffer::readFromStream(std::istream& stream)
stream.read((char*)memory.data(), bufferLength);
}
void ArchiveBuffer::seek(int64 s, SeekOp op)
{
int64 newPos = position;
switch (op)
{
case SeekOp::BEGIN:
newPos = s;
break;
case SeekOp::END:
newPos = memory.size() + s;
break;
case SeekOp::CURRENT:
newPos = position + s;
break;
}
assert(newPos >= 0 && newPos < memory.size());
newPos = position;
}
bool ArchiveBuffer::eof() const
{
return position == memory.size();
}
size_t Seele::ArchiveBuffer::size() const
{
return memory.size();
}
void ArchiveBuffer::rewind()
{
position = 0;