all: add -DGLES_SILENCE_DEPRECATION instead of #define

Defining GLES_SILENCE_DEPRECATION did not take any effects. Use -D
instead.

Change-Id: I9c0602b38d39020b9539fdb8030fef3a7b366929
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/374499
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/app/darwin_ios.go b/app/darwin_ios.go
index 67afe43..8fb30fe 100644
--- a/app/darwin_ios.go
+++ b/app/darwin_ios.go
@@ -8,7 +8,7 @@
 package app
 
 /*
-#cgo CFLAGS: -x objective-c -DGL_SILENCE_DEPRECATION
+#cgo CFLAGS: -x objective-c -DGL_SILENCE_DEPRECATION -DGLES_SILENCE_DEPRECATION
 #cgo LDFLAGS: -framework Foundation -framework UIKit -framework GLKit -framework OpenGLES -framework QuartzCore
 #include <sys/utsname.h>
 #include <stdint.h>
diff --git a/app/darwin_ios.m b/app/darwin_ios.m
index 6fd4f3c..08bb72f 100644
--- a/app/darwin_ios.m
+++ b/app/darwin_ios.m
@@ -10,8 +10,6 @@
 #include <stdio.h>
 #include <sys/utsname.h>
 
-#define GLES_SILENCE_DEPRECATION
-
 #import <UIKit/UIKit.h>
 #import <GLKit/GLKit.h>
 
diff --git a/gl/work.go b/gl/work.go
index 73b566d..65eaf9a 100644
--- a/gl/work.go
+++ b/gl/work.go
@@ -16,7 +16,7 @@
 #cgo android      CFLAGS: -Dos_android
 #cgo ios          CFLAGS: -Dos_ios
 #cgo darwin,!ios  CFLAGS: -Dos_macos
-#cgo darwin       CFLAGS: -DGL_SILENCE_DEPRECATION
+#cgo darwin       CFLAGS: -DGL_SILENCE_DEPRECATION -DGLES_SILENCE_DEPRECATION
 #cgo linux        CFLAGS: -Dos_linux
 #cgo openbsd      CFLAGS: -Dos_openbsd
 
diff --git a/gl/work.h b/gl/work.h
index e9f3f6d..5bc093b 100644
--- a/gl/work.h
+++ b/gl/work.h
@@ -15,7 +15,6 @@
 #endif
 
 #ifdef os_ios
-#define GLES_SILENCE_DEPRECATION
 #include <OpenGLES/ES2/glext.h>
 #endif