From 4d80da836894ce650f0de016e36e0feceb9bda4a Mon Sep 17 00:00:00 2001 From: Ali Sharabiani Date: Fri, 14 Sep 2018 14:11:09 -0400 Subject: [PATCH] Update Hello_Triangle.c Cast `void *` pointer to correct type. --- Chapter_2/Hello_Triangle/Hello_Triangle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chapter_2/Hello_Triangle/Hello_Triangle.c b/Chapter_2/Hello_Triangle/Hello_Triangle.c index f67baf0..dfd031e 100644 --- a/Chapter_2/Hello_Triangle/Hello_Triangle.c +++ b/Chapter_2/Hello_Triangle/Hello_Triangle.c @@ -175,7 +175,7 @@ int Init ( ESContext *esContext ) // void Draw ( ESContext *esContext ) { - UserData *userData = esContext->userData; + UserData *userData = (UserData *) esContext->userData; GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f @@ -199,7 +199,7 @@ void Draw ( ESContext *esContext ) void Shutdown ( ESContext *esContext ) { - UserData *userData = esContext->userData; + UserData *userData = (UserData *) esContext->userData; glDeleteProgram ( userData->programObject ); }