Reimplement voxel rendering with a FBO.

This commit is contained in:
Paul Chote
2013-06-12 16:28:01 +12:00
parent 2215f74959
commit c5337cdcf3
10 changed files with 377 additions and 378 deletions

View File

@@ -19,7 +19,7 @@ namespace OpenRA.FileFormats
{
public readonly uint FrameCount;
public readonly uint LimbCount;
float[] Transforms;
public readonly float[] Transforms;
public HvaReader(Stream s)
{
@@ -48,19 +48,6 @@ namespace OpenRA.FileFormats
}
}
public float[] TransformationMatrix(uint limb, uint frame)
{
if (frame >= FrameCount)
throw new ArgumentOutOfRangeException("frame", "Only {0} frames exist.".F(FrameCount));
if (limb >= LimbCount)
throw new ArgumentOutOfRangeException("limb", "Only {1} limbs exist.".F(LimbCount));
var t = new float[16];
Array.Copy(Transforms, 16*(LimbCount*frame + limb), t, 0, 16);
return t;
}
public static HvaReader Load(string filename)
{
using (var s = File.OpenRead(filename))