mirror of https://github.com/buggins/dlangui.git
fix missing scene3d files
This commit is contained in:
parent
92a348974f
commit
06d009d928
|
@ -0,0 +1,15 @@
|
||||||
|
module dlangui.graphics.scene.drawableobject;
|
||||||
|
|
||||||
|
public import dlangui.core.types;
|
||||||
|
public import dlangui.graphics.scene.node;
|
||||||
|
|
||||||
|
/// Reference counted DrawableObject
|
||||||
|
alias DrawableObjectRef = Ref!DrawableObject;
|
||||||
|
|
||||||
|
class DrawableObject : RefCountedObject {
|
||||||
|
this() {
|
||||||
|
}
|
||||||
|
void draw(Node3d node, bool wireframe) {
|
||||||
|
/// override it
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
module dlangui.graphics.scene.model;
|
||||||
|
|
||||||
|
import dlangui.graphics.scene.drawableobject;
|
||||||
|
import dlangui.graphics.scene.mesh;
|
||||||
|
import dlangui.graphics.scene.material;
|
||||||
|
|
||||||
|
class Model : DrawableObject {
|
||||||
|
protected MaterialRef _material;
|
||||||
|
protected MeshRef _mesh;
|
||||||
|
|
||||||
|
this() {
|
||||||
|
}
|
||||||
|
|
||||||
|
this(Material material, Mesh mesh) {
|
||||||
|
_material = material;
|
||||||
|
_mesh = mesh;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property ref MaterialRef material() { return _material; }
|
||||||
|
@property ref MeshRef mesh() { return _mesh; }
|
||||||
|
|
||||||
|
override void draw(Node3d node, bool wireframe) {
|
||||||
|
/// override it
|
||||||
|
_material.bind(node);
|
||||||
|
_material.drawMesh(_mesh);
|
||||||
|
_material.unbind();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue