From edbf237ea405dec34261b6a0f2e15b76ebc02062 Mon Sep 17 00:00:00 2001 From: coulsonwang Date: Thu, 10 Sep 2020 10:02:08 +0800 Subject: [PATCH] add setTarget adapter (#7342) --- port/native/engine/jsb-gfx.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/port/native/engine/jsb-gfx.js b/port/native/engine/jsb-gfx.js index ccc2f622db..75cb9cfef0 100644 --- a/port/native/engine/jsb-gfx.js +++ b/port/native/engine/jsb-gfx.js @@ -532,3 +532,9 @@ textureProto.initialize = function(info) { oldTextureInitializeFunc.call(this, _converters.TextureInfo(info), false); } } + +let blendStateProto = gfx.BlendState.prototype; +let oldSetTargetFunc = blendStateProto.setTarget; +blendStateProto.setTarget = function(index, target) { + oldSetTargetFunc.call(this, index, _converters.BlendTarget(target)); +}