summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h')
-rw-r--r--Runtime/GfxDevice/opengles30/TextureIdMapGLES30.h17
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;
+}