From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/opengles30/CombinerGLES30.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Runtime/GfxDevice/opengles30/CombinerGLES30.cpp (limited to 'Runtime/GfxDevice/opengles30/CombinerGLES30.cpp') diff --git a/Runtime/GfxDevice/opengles30/CombinerGLES30.cpp b/Runtime/GfxDevice/opengles30/CombinerGLES30.cpp new file mode 100644 index 0000000..51f64c4 --- /dev/null +++ b/Runtime/GfxDevice/opengles30/CombinerGLES30.cpp @@ -0,0 +1,21 @@ +#include "UnityPrefix.h" +#include "CombinerGLES30.h" +#include "Runtime/Shaders/GraphicsCaps.h" +#include "VBOGLES30.h" + +#if GFX_SUPPORTS_OPENGLES30 + +TextureCombinersGLES3* TextureCombinersGLES3::Create (int count, const ShaderLab::TextureBinding* texEnvs) +{ + // check if we have enough vertex attributes to emulate this combiner + if (count + kGLES3AttribLocationTexCoord0 >= gGraphicsCaps.gles30.maxAttributes) + return NULL; + + // create struct that holds texture combiner info object + TextureCombinersGLES3* combiners = new TextureCombinersGLES3(); + combiners->count = count; + combiners->texEnvs = texEnvs; + return combiners; +} + +#endif // GFX_SUPPORTS_OPENGLES30 -- cgit v1.1-26-g67d0