2014-12-16 22:47:17 -05:00
|
|
|
|
using System;
|
|
|
|
|
using ClassicalSharp.GraphicsAPI;
|
|
|
|
|
|
|
|
|
|
namespace ClassicalSharp {
|
|
|
|
|
|
|
|
|
|
public class ModelPart {
|
|
|
|
|
|
2015-05-31 16:29:09 -04:00
|
|
|
|
public int Offset = 0;
|
2014-12-16 22:47:17 -05:00
|
|
|
|
public int Count;
|
2015-06-19 06:12:29 -04:00
|
|
|
|
public OpenGLApi Graphics;
|
2015-06-19 20:52:32 -04:00
|
|
|
|
public Shader Shader;
|
2014-12-16 22:47:17 -05:00
|
|
|
|
|
2015-06-19 23:05:52 -04:00
|
|
|
|
public ModelPart( int offset, int count, OpenGLApi graphics, Shader shader ) {
|
2015-05-31 16:29:09 -04:00
|
|
|
|
Offset = offset;
|
2015-01-03 19:09:04 -05:00
|
|
|
|
Count = count;
|
2014-12-16 22:47:17 -05:00
|
|
|
|
Graphics = graphics;
|
2015-06-19 20:52:32 -04:00
|
|
|
|
Shader = shader;
|
2014-12-16 22:47:17 -05:00
|
|
|
|
}
|
|
|
|
|
|
2015-06-19 23:05:52 -04:00
|
|
|
|
public void Render( int vb ) {
|
2015-06-20 02:22:58 -04:00
|
|
|
|
Shader.Draw( DrawMode.Triangles, VertexPos3fTex2f.Size, vb, Offset, Count );
|
2014-12-16 22:47:17 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum SkinType {
|
|
|
|
|
Type64x32,
|
|
|
|
|
Type64x64,
|
|
|
|
|
Type64x64Slim,
|
|
|
|
|
}
|
|
|
|
|
}
|