public RenderModel(VertexBufferBinding vertexBufferBinding, Buffer indexBuffer, int indexCount, IOpaqueMaterial material) { this.vertexBufferBinding = vertexBufferBinding; this.indexBuffer = indexBuffer; this.indexCount = indexCount; this.material = material; }
public OcclusionSurrogateDebugRenderer(Device device, ShaderCache shaderCache, int occlusionInfoOffset) { surrogateFacesView = BufferUtilities.ToStructuredBufferView(device, OcclusionSurrogateCommon.Mesh.Faces.ToArray()); meshBuffers = new MeshBuffers(device, DrawMesh); var vertexShaderAndBytecode = shaderCache.GetVertexShader <OcclusionSurrogateDebugRenderer>("figure/occlusion/debug/DebugVertex"); vertexShader = vertexShaderAndBytecode; inputLayout = new InputLayout(device, vertexShaderAndBytecode.Bytecode, MeshBuffers.InputElements); using (var texture = MonochromaticTextures.Make(device, Color.LightGray)) { var textureView = new ShaderResourceView(device, texture); material = new BasicSpecularMaterial(device, shaderCache, textureView); } }
public MeshRenderer(Device device, ShaderCache shaderCache, Matrix transform, TriMesh mesh) { this.meshBuffers = new MeshBuffers(device, mesh); this.modelToWorldTransform = new CoordinateNormalMatrixPairConstantBufferManager(device); var vertexShaderAndBytecode = shaderCache.GetVertexShader <MeshRenderer>("game/MeshVertex"); this.vertexShader = vertexShaderAndBytecode; this.inputLayout = new InputLayout(device, vertexShaderAndBytecode.Bytecode, MeshBuffers.InputElements); using (var texture = MonochromaticTextures.Make(device, Color.LightGray)) { var textureView = new ShaderResourceView(device, texture); this.material = new BasicSpecularMaterial(device, shaderCache, textureView); } this.transform = transform; }