mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 03:47:07 -05:00
Android: Fixed GLES3+ build.
This commit is contained in:
parent
1bfd71c419
commit
857a2b18f1
3 changed files with 75 additions and 2 deletions
|
@ -91,7 +91,15 @@ namespace entry
|
|||
if (m_window == NULL)
|
||||
{
|
||||
m_window = m_app->window;
|
||||
bgfx::androidSetWindow(m_app->window);
|
||||
bgfx::androidSetWindow(m_window);
|
||||
|
||||
int32_t width = ANativeWindow_getWidth(m_window);
|
||||
int32_t height = ANativeWindow_getHeight(m_window);
|
||||
|
||||
DBG("ANativeWindow width %d, height %d", width, height);
|
||||
WindowHandle defaultWindow = { 0 };
|
||||
m_eventQueue.postSizeEvent(defaultWindow, width, height);
|
||||
|
||||
m_thread.init(MainThreadEntry::threadFunc, &m_mte);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -276,8 +276,14 @@ EGL_IMPORT
|
|||
# endif // BX_PLATFORM_RPI
|
||||
}
|
||||
|
||||
void GlContext::resize(uint32_t /*_width*/, uint32_t /*_height*/, bool _vsync)
|
||||
void GlContext::resize(uint32_t _width, uint32_t _height, bool _vsync)
|
||||
{
|
||||
# if BX_PLATFORM_ANDROID
|
||||
EGLint format;
|
||||
eglGetConfigAttrib(m_display, m_config, EGL_NATIVE_VISUAL_ID, &format);
|
||||
ANativeWindow_setBuffersGeometry(g_bgfxAndroidWindow, _width, _height, format);
|
||||
# endif // BX_PLATFORM_ANDROID
|
||||
|
||||
eglSwapInterval(m_display, _vsync ? 1 : 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -474,6 +474,65 @@ GL_IMPORT_NV___(true, PFNGLDELETEQUERIESPROC, glDeleteQueri
|
|||
GL_IMPORT_NV___(true, PFNGLBEGINQUERYPROC, glBeginQuery);
|
||||
GL_IMPORT_NV___(true, PFNGLENDQUERYPROC, glEndQuery);
|
||||
GL_IMPORT_NV___(true, PFNGLGETQUERYOBJECTUI64VPROC, glGetQueryObjectui64v);
|
||||
#else
|
||||
GL_IMPORT______(true, PFNGLTEXIMAGE3DPROC, glTexImage3D);
|
||||
GL_IMPORT______(true, PFNGLTEXSUBIMAGE3DPROC, glTexSubImage3D);
|
||||
GL_IMPORT______(true, PFNGLCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3D);
|
||||
GL_IMPORT______(true, PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3D);
|
||||
|
||||
GL_IMPORT______(true, PFNGLTEXSTORAGE2DPROC, glTexStorage2D);
|
||||
GL_IMPORT______(true, PFNGLTEXSTORAGE3DPROC, glTexStorage3D);
|
||||
|
||||
GL_IMPORT______(true, PFNGLINSERTEVENTMARKEREXTPROC, glInsertEventMarker);
|
||||
GL_IMPORT______(true, PFNGLPUSHGROUPMARKEREXTPROC, glPushGroupMarker);
|
||||
GL_IMPORT______(true, PFNGLPOPGROUPMARKEREXTPROC, glPopGroupMarker);
|
||||
GL_IMPORT______(true, PFNGLOBJECTLABELPROC, glObjectLabel);
|
||||
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary);
|
||||
GL_IMPORT______(true, PFNGLPROGRAMBINARYPROC, glProgramBinary);
|
||||
|
||||
GL_IMPORT______(true, PFNGLVERTEXATTRIBDIVISORPROC, glVertexAttribDivisor);
|
||||
GL_IMPORT______(true, PFNGLDRAWARRAYSINSTANCEDPROC, glDrawArraysInstanced);
|
||||
GL_IMPORT______(true, PFNGLDRAWELEMENTSINSTANCEDPROC, glDrawElementsInstanced);
|
||||
|
||||
GL_IMPORT______(true, PFNGLBINDVERTEXARRAYPROC, glBindVertexArray);
|
||||
GL_IMPORT______(true, PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays);
|
||||
GL_IMPORT______(true, PFNGLGENVERTEXARRAYSPROC, glGenVertexArrays);
|
||||
|
||||
GL_IMPORT______(true, PFNGLENABLEIPROC, glEnablei);
|
||||
GL_IMPORT______(true, PFNGLDISABLEIPROC, glDisablei);
|
||||
GL_IMPORT______(true, PFNGLBLENDEQUATIONIPROC, glBlendEquationi);
|
||||
GL_IMPORT______(true, PFNGLBLENDEQUATIONSEPARATEIPROC, glBlendEquationSeparatei);
|
||||
GL_IMPORT______(true, PFNGLBLENDFUNCIPROC, glBlendFunci);
|
||||
GL_IMPORT______(true, PFNGLBLENDFUNCSEPARATEIPROC, glBlendFuncSeparatei);
|
||||
|
||||
GL_IMPORT______(true, PFNGLDRAWBUFFERPROC, glDrawBuffer);
|
||||
GL_IMPORT______(true, PFNGLREADBUFFERPROC, glReadBuffer);
|
||||
GL_IMPORT______(true, PFNGLGENSAMPLERSPROC, glGenSamplers);
|
||||
GL_IMPORT______(true, PFNGLDELETESAMPLERSPROC, glDeleteSamplers);
|
||||
GL_IMPORT______(true, PFNGLBINDSAMPLERPROC, glBindSampler);
|
||||
GL_IMPORT______(true, PFNGLSAMPLERPARAMETERFPROC, glSamplerParameterf);
|
||||
GL_IMPORT______(true, PFNGLSAMPLERPARAMETERIPROC, glSamplerParameteri);
|
||||
|
||||
GL_IMPORT______(true, PFNGLBINDBUFFERBASEPROC, glBindBufferBase);
|
||||
GL_IMPORT______(true, PFNGLBINDBUFFERRANGEPROC, glBindBufferRange);
|
||||
GL_IMPORT______(true, PFNGLBINDIMAGETEXTUREPROC, glBindImageTexture);
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMINTERFACEIVPROC, glGetProgramInterfaceiv);
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCEINDEXPROC, glGetProgramResourceIndex);
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCEIVPROC, glGetProgramResourceiv);
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCENAMEPROC, glGetProgramResourceName);
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCELOCATIONPROC, glGetProgramResourceLocation);
|
||||
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC, glGetProgramResourceLocationIndex);
|
||||
GL_IMPORT______(true, PFNGLMEMORYBARRIERPROC, glMemoryBarrier);
|
||||
GL_IMPORT______(true, PFNGLDISPATCHCOMPUTEPROC, glDispatchCompute);
|
||||
GL_IMPORT______(true, PFNGLDISPATCHCOMPUTEINDIRECTPROC, glDispatchComputeIndirect);
|
||||
|
||||
GL_IMPORT______(true, PFNGLDRAWBUFFERSPROC, glDrawBuffers);
|
||||
GL_IMPORT______(true, PFNGLGENQUERIESPROC, glGenQueries);
|
||||
GL_IMPORT______(true, PFNGLDELETEQUERIESPROC, glDeleteQueries);
|
||||
GL_IMPORT______(true, PFNGLBEGINQUERYPROC, glBeginQuery);
|
||||
GL_IMPORT______(true, PFNGLENDQUERYPROC, glEndQuery);
|
||||
GL_IMPORT______(true, PFNGLGETQUERYOBJECTUI64VPROC, glGetQueryObjectui64v);
|
||||
|
||||
# endif // BGFX_CONFIG_RENDERER_OPENGLES < 30
|
||||
#endif // !BGFX_CONFIG_RENDERER_OPENGL
|
||||
|
|
Loading…
Reference in a new issue