android gl2ext.h,android - GLES 3.0 including gl2ext.h - Stack Overflow

这篇博客讨论了在使用Android NDK编译时,由于gl2ext.h中glShaderSource原型与GLES3.0核心版本不一致引发的编译错误。作者质疑是NDK版本问题还是自己操作不当,并提供了相关代码和错误信息作为背景。
摘要由CSDN通过智能技术生成

According to the Khronos OpenGL ES Registry, the extension header for GLES 3.0 is actually . gl3ext.h should be empty and provided only for legacy compatibility. Thus, if you want to include GLES 3.0 headers, you should do:

#include

#include

However, compiling with the Android NDK, it appears that that version of the gl2ext.h internally does #include , giving the following error *(I am compiling with API-19):

C:\android-ndk-r10e\platforms\android-19\arch-arm\usr\include\GLES2\gl2ext.h(6): includes this header:

C:\android-ndk-r10e\platforms\android-19\arch-arm\usr\include\GLES2\gl2.h(572,37): error : conflicting types for 'glShaderSource'

GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);

^

C:\android-ndk-r10e\platforms\android-19\arch-arm\usr\include\GLES3\gl3.h(905,39): note: previous declaration is here

GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);

This is because the prototype of glShaderSource changed from GLES 2.0 to GLES 3.0 core. Is this an error in the Android NDK version of the glext headers, or am I not doing something properly?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值