Discussion:
[SDL] OpenGL ES 3.0 on Desktop
rtrussell
2016-11-05 10:28:46 UTC
Permalink
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.
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
2016-11-02 18:17:06 UTC
Permalink
No one done this before? I am kinda stuck here without making any progress :(
MZIskandar
2016-11-04 19:57:31 UTC
Permalink
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

------------------------
http://digitalspine.blogspot.com
devqq
2016-11-04 21:42:40 UTC
Permalink
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.
devqq
2016-11-06 08:01:46 UTC
Permalink
Post by rtrussell
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.
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.
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
2016-11-06 08:02:53 UTC
Permalink
Maybe Sam Lantinga knows what to do but I can't pm him for some reason :(
Loading...