OpenGL ES 3.0 on Desktop |
devqq
|
No one done this before? I am kinda stuck here without making any progress
|
|||||||||||
|
MZIskandar
|
Hello.
Why do you want to use OpenGL ES for desktop? OpenGL ES (embedded system) are made for mobile. GLEW is GL Extension Wrangler. It helps you to setup the "Extensions", which I don't use. To use OpenGL include: #include <SDL2/SDL_opengl.h> To use extension add (tedious without GLEW but you will really know wjat to use : eg: static PFNGLGENBUFFERSPROC glGenBuffers;, and so on.. later in main, eg: glGenBuffers = SDL_GL_GetProcAddress("glGenBuffers"); Creating OpenGL window: SDL_Window* myWindow = NULL; myWindow = SDL_CreateWindow("Window Title", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_OPENGL); Lots of other example in SDL2-2.0.5\test directory (which I overlook when I started learning SDL) http://libsdl.org/release/SDL2-2.0.5.zip |
|||||||||||
|
devqq
|
Thanks for the reply, the reason I want to use it is because I already have some code that ran on iOS before that uses GLES 3.0.
So I prefer to try and make an ES context as opposed to using desktop version and having some #ifdefs or something. |
|||||||||||
|
MZIskandar
|
I haven't done any IOS/Andoid using SDL.
You can try compiling "testgles2.c" for IOS from the example. |
|||||||||||
|
rtrussell
|
Do you know for sure that the GL calls you make are ES-specific? In my app (which runs on both desktop with OpenGL and on Android with GLES 1.0) I am only making calls that I know are compatible with both: specifically simple things like glEnable, glLogicOp and glDisable. I guess I'm lucky that the few calls I need are available in both contexts, but perhaps you will be too. Richard. |
|||||||||||||
|
devqq
|
Yes I am sure because I helped write the code, it is fully core ES 3.0 At this point I am considering if I should use the Angle drivers? |
|||||||||||||||
|
devqq
|
Maybe Sam Lantinga knows what to do but I can't pm him for some reason
|
|||||||||||
|