Skip to main content
14 events
when toggle format what by license comment
Apr 14, 2016 at 17:52 comment added Dominic Hughes Let us continue this discussion in chat.
Apr 13, 2016 at 23:46 comment added Dominic Hughes I'm sticking to c as it is more compatible with opengl and clarifications galore yum . I've got your code in a comment on my c file so if I need it boom.
Apr 13, 2016 at 23:42 comment added Antoine Morrier Be careful if you use OpenGL and C++ together ^^. But OpenGL is not stupid, its role is just to "use" the video card and draw triangles to screen using it. It is even not his role to create the window, or the context ^^. Your choices to use SDL2 is really good. If you want to "steal" the code I sent before, or other code in the same repository, feel free for it ;)
Apr 13, 2016 at 23:39 comment added Dominic Hughes Oh I see so OpenGL is even more stupider then I thought : D that will be logged for enternity lol. I'll look at your function some more defiantly if I get in trouble again I've actually looked at it very well written for c++ .
Apr 13, 2016 at 23:37 comment added Antoine Morrier OpenGL does not have any function to read inside a file. The function getStringFromFile is for you to get the data from a file and put it inside one char const*. I wrote a function in my answer that could help yo
Apr 13, 2016 at 23:35 history edited Antoine Morrier CC BY-SA 3.0
added 595 characters in body
Apr 13, 2016 at 23:30 vote accept Dominic Hughes
Apr 13, 2016 at 23:25 comment added Dominic Hughes Antonie Morrier I must say I'm confused as why this code works , I'm glad that it is by the way just wanted too know why exactly I needed too make a const char *getstringfromfile function and use that in glshadersource instead of just giving it the buffer, is this because OpenGL can't read the buffer and needs you to do it for it?
Apr 13, 2016 at 23:15 comment added Dominic Hughes I'll check it and yes if i do not understand something I'll defiantly without a shadow of a doubt be right here again : ).
Apr 13, 2016 at 23:15 comment added Antoine Morrier It is a c++ code I made, but maybe it could help you github.com/qnope/GLTools/blob/master/System/GL/Pipeline/…
Apr 13, 2016 at 23:14 review First posts
Apr 14, 2016 at 3:45
Apr 13, 2016 at 23:13 comment added Antoine Morrier Good luck, if you did not understand something, please, let me know. Btw, by getStringFromFile, I mean a function which put all the file into one buffer and return it. (Don't forget to free it)
Apr 13, 2016 at 23:11 comment added Dominic Hughes omg someone answered : D , I'll study this so much and see if I can make it work. I should say that I did know an array might be needed however wasn't entirely shore how strict it was about that so good for clarifying.
Apr 13, 2016 at 23:09 history answered Antoine Morrier CC BY-SA 3.0