上未实现的Nexus的OpenGL ES 3.0着色器功能5 / 4.4奇巧 [英] Opengl ES 3.0 shader functions unimplemented on Nexus 5/KitKat 4.4
问题描述
我在使用任何的OpenGL 3.0着色器功能上我的Nexus 5W /奇巧4.4,我得到叫未实现的OpenGL ES API的功能,没有运气,如
I'm having no luck using any of the OpenGL 3.0 shader functions on my Nexus 5 w/ KitKat 4.4, I get "called unimplemented opengl es api" for functions such as
glCreateProgram()
glShaderSource()
glCompileShader()
e.t.c。我执行所有的呼叫,而OpenGL上下文激活。我无法想象,这些功能将无法实施,所以相信我一定做错了什么!我已经包括以下
e.t.c. I am performing all calls whilst the OpenGL context is active. I can't imagine that these functions would not be implemented, so believe I must be doing something wrong! I have included the following
<GLES3/gl3.h>
<GLES2/gl2ext.h>
<GLES3/gl3platform.h>
和现在用
-lGLESv3
在我的LOCAL_LDLIBS。我注意到,在EGL / egl.h没有EGL_OPENGL_ES3_BIT,所以上下文创建过程中,如果我不定义EGL_RENDERABLE_TYPE,或者如果我使用EGL_OPENGL_ES2_BIT,结果都是一样的。
in my LOCAL_LDLIBS. I noticed that in EGL/egl.h there is no EGL_OPENGL_ES3_BIT, so during context creation if I don't define EGL_RENDERABLE_TYPE, or if I use EGL_OPENGL_ES2_BIT, the results are the same.
这是我在哪里的情况下,它可以帮助多一点信息:我移植的OpenGL我的游戏引擎从Windows使用OpenGL ES 3.0和NDK为Android。我把一切都ok了编译没有错误,并且已经测试和验证窗口,GL上下文管理,生命周期Android的整合和发动机的基本运行工作正常。我有一个简单的激活的背景下基本的场景,进行glClearColour然后交换缓冲区,从黑到脉动红每一秒,并且它在Windows上它的工作原理是一样的。
A bit more info on where I am in case it helps: I'm porting my OpenGL game engine from Windows to Android using OpenGL ES 3.0 and the NDK. I have everything compiling ok with no errors, and have tested and verified that windowing, GL context management, Android lifecycle integration and the basic running of the engine works ok. I have a basic scene which simply activates the context, performs a glClearColour then swaps buffers, pulsating from black to red every second, and it works the same as it does on Windows.
任何帮助将是AP preciated!
Any help would be appreciated!
推荐答案
原来我也不得不使用EGL_CONTEXT_CLIENT_VERSION使用eglCreateContext时:
Turns out I also had to use EGL_CONTEXT_CLIENT_VERSION when using eglCreateContext:
const EGLint attribs2[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE};
context = eglCreateContext(displayHandle, config, NULL, attribs2);
这篇关于上未实现的Nexus的OpenGL ES 3.0着色器功能5 / 4.4奇巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!