diff options
Diffstat (limited to 'Runtime/GfxDevice/opengles20/CombinerGLES20.cpp')
-rw-r--r-- | Runtime/GfxDevice/opengles20/CombinerGLES20.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/opengles20/CombinerGLES20.cpp b/Runtime/GfxDevice/opengles20/CombinerGLES20.cpp new file mode 100644 index 0000000..eaff5fb --- /dev/null +++ b/Runtime/GfxDevice/opengles20/CombinerGLES20.cpp @@ -0,0 +1,21 @@ +#include "UnityPrefix.h" +#include "CombinerGLES20.h" +#include "Runtime/Shaders/GraphicsCaps.h" +#include "VBOGLES20.h" + +#if GFX_SUPPORTS_OPENGLES20 + +TextureCombinersGLES2* TextureCombinersGLES2::Create (int count, const ShaderLab::TextureBinding* texEnvs) +{ + // check if we have enough vertex attributes to emulate this combiner + if (count + GL_TEXTURE_ARRAY0 >= gGraphicsCaps.gles20.maxAttributes) + return NULL; + + // create struct that holds texture combiner info object + TextureCombinersGLES2* combiners = new TextureCombinersGLES2(); + combiners->count = count; + combiners->texEnvs = texEnvs; + return combiners; +} + +#endif // GFX_SUPPORTS_OPENGLES20 |