瀏覽代碼

added hasFeature & copy

ncannasse 7 年之前
父節點
當前提交
dc19716f28
共有 1 個文件被更改,包括 8 次插入0 次删除
  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);