diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/opengles30/CombinerGLES30.cpp |
Diffstat (limited to 'Runtime/GfxDevice/opengles30/CombinerGLES30.cpp')
-rw-r--r-- | Runtime/GfxDevice/opengles30/CombinerGLES30.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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 |