From f4110f271eeeefddf5839c1fda964ca9718596ff Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 7 Mar 2018 10:03:11 +0800 Subject: [PATCH] TODO: GL_UNPACK_FLIP_Y_WEBGL, GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL --- .../js-bindings/manual/jsb_opengl_functions.cpp | 12 ++++++++++++ .../js-bindings/manual/jsb_opengl_functions.hpp | 1 + 2 files changed, 13 insertions(+) diff --git a/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.cpp b/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.cpp index b6f9ffefb1..641cddb739 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.cpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.cpp @@ -1303,6 +1303,18 @@ bool JSB_glPixelStorei(se::State& s) { ok &= seval_to_int32(args[1], &arg1 ); SE_PRECONDITION2(ok, false, "Error processing arguments"); + if (arg0 == GL_UNPACK_FLIP_Y_WEBGL) + { + SE_LOGE("cjh FIXME: support GL_UNPACK_FLIP_Y_WEBGL\n"); + return true; + } + + if (arg0 == GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL) + { + SE_LOGE("cjh FIXME: support GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL\n"); + return true; + } + JSB_GL_CHECK(glPixelStorei((GLenum)arg0 , (GLint)arg1 )); s.rval().setUndefined(); return true; diff --git a/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.hpp b/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.hpp index 4e9e559c9a..2a1c8742dd 100644 --- a/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.hpp +++ b/native/cocos/scripting/js-bindings/manual/jsb_opengl_functions.hpp @@ -154,3 +154,4 @@ SE_DECLARE_FUNC(JSB_glVertexAttrib4fv); SE_DECLARE_FUNC(JSB_glVertexAttribPointer); SE_DECLARE_FUNC(JSB_glViewport); SE_DECLARE_FUNC(JSB_glGetParameter); +SE_DECLARE_FUNC(JSB_glGetShaderPrecisionFormat);