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/TextureIdMapGLES30.h |
Diffstat (limited to 'Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h')
-rw-r--r-- | Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h b/Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h new file mode 100644 index 0000000..b0bcd2e --- /dev/null +++ b/Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h @@ -0,0 +1,17 @@ +#pragma once + +#include "Configuration/UnityConfigure.h" +#include "Runtime/GfxDevice/TextureIdMap.h" +#include "IncludesGLES30.h" + +inline GLuint TextureIdMapGLES30_QueryOrCreate(TextureID texid) +{ + GLuint ret = (GLuint)TextureIdMap::QueryNativeTexture(texid); + if(ret == 0) + { + GLES_CHK(glGenTextures(1, &ret)); + TextureIdMap::UpdateTexture(texid, ret); + } + + return ret; +} |