From 2a9e6f2cb446d7547f1adb836efff58b0abd47b7 Mon Sep 17 00:00:00 2001 From: Timur Gagiev Date: Sat, 12 Aug 2017 05:04:54 +0300 Subject: [PATCH] #15 fix OSX and iOS build --- src/core.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core.h b/src/core.h index 1440367..8c042ba 100644 --- a/src/core.h +++ b/src/core.h @@ -92,8 +92,8 @@ #define glDeleteVertexArrays glDeleteVertexArraysOES #define glBindVertexArray glBindVertexArrayOES - #define GL_CLAMP_TO_BORDER GL_CLAMP_TO_BORDER_EXT - #define GL_TEXTURE_BORDER_COLOR GL_TEXTURE_BORDER_COLOR_EXT + #define GL_CLAMP_TO_BORDER 0x812D + #define GL_TEXTURE_BORDER_COLOR 0x1004 #define GL_TEXTURE_COMPARE_MODE GL_TEXTURE_COMPARE_MODE_EXT #define GL_TEXTURE_COMPARE_FUNC GL_TEXTURE_COMPARE_FUNC_EXT @@ -106,6 +106,10 @@ #include #include + #define GL_RGBA16F 0x881A + #define GL_RGBA32F 0x8814 + #define GL_HALF_FLOAT 0x140B + #define GL_RGB565 GL_RGBA #define GL_TEXTURE_COMPARE_MODE 0x884C #define GL_TEXTURE_COMPARE_FUNC 0x884D @@ -816,7 +820,7 @@ namespace Core { void copyTarget(Texture *dst, int xOffset, int yOffset, int x, int y, int width, int height) { validateRenderState(); dst->bind(sDiffuse); - glCopyTexSubImage2D(GL_TEXTURE_2D, 0, xOffset, yOffset, x, y, width, height); + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, xOffset, yOffset, x, y, width, height); // TODO: too bad for iOS devices! } vec4 copyPixel(int x, int y) { // GPU sync!