From 5df9d1805f73a81a74312a1064003e067ca1d338 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Mon, 29 Dec 2014 16:54:17 +0200 Subject: [PATCH] Enable iOS and Android targets. --- src/opengl.nim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/opengl.nim b/src/opengl.nim index cb953e4..ed80a12 100644 --- a/src/opengl.nim +++ b/src/opengl.nim @@ -20,7 +20,7 @@ import macros, sequtils -when defined(linux): +when defined(linux) and not defined(android): import X, XLib, XUtil elif defined(windows): import winlean, os @@ -45,6 +45,13 @@ when defined(useGlew): {.pragma: oglx, header: "".} {.pragma: wgl, header: "".} {.pragma: glu, dynlib: gludll.} +elif defined(ios): + {.pragma: ogl.} + {.pragma: oglx.} + {.passC: "-framework OpenGLES", passL: "-framework OpenGLES".} +elif defined(android): + {.pragma: ogl.} + {.pragma: oglx.} else: # quite complex ... thanks to extension support for various platforms: import dynlib