Explorar o código

added hasFeature & copy

ncannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
dc19716f28
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      h3d/scene/Renderer.hx

+ 8 - 0
h3d/scene/Renderer.hx

@@ -48,6 +48,10 @@ class Renderer {
 		return p.compileShader(pass);
 	}
 
+	function hasFeature(f) {
+		return h3d.Engine.getCurrent().driver.hasFeature(f);
+	}
+
 	function createDefaultPass( name : String ) : h3d.pass.Base {
 		switch( name ) {
 		case "depth":
@@ -125,6 +129,10 @@ class Renderer {
 		ctx.engine.clear(color, depth, stencil);
 	}
 
+	function copy( from, to, ?blend ) {
+		h3d.pass.Copy.run(from, to, blend);
+	}
+
 	function setTarget( tex ) {
 		if( hasSetTarget ) ctx.engine.popTarget();
 		ctx.engine.pushTarget(tex);