summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/opengles20/CombinerGLES20.cpp
blob: eaff5fbaabaf467edf7490848faef9912fa282c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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