Hi Guys! I am trying to implement Angle in a project so I can emulate OpenGL as DirectX.--I am getting no errors while initializing the environment, eglGetErrors() returns me 12288 which means EGL_SUCCESS.So I am printing at the following order those informations: "Graphics!" eglGetError(), eglQueryString(m_eglDisplay, EGL_VENDOR), eglQueryString(m_eglDisplay, EGL_VERSION), eglQueryString(m_eglDisplay, EGL_CLIENT_APIS)))And the default OpenGL environment prints,"Graphics!" glGetError(), glGetString(GL_VENDOR), glGetString(GL_RENDERER), glGetString(GL_VERSION))):I tried including d3dcompiler_47 that I compiled and the one in Windows10 system32 folder, also everything seems to be linked properly.Other thing I've noticed is that the .exe don't requires to have d3dcompilre_47 in its folder, it can execute without it.The code is written in C++, this is where the environment gets initialized.void WIN32Window::internalCreateGLContext()
{
m_eglDisplay = eglGetDisplay(m_deviceContext);
if(m_eglDisplay == EGL_NO_DISPLAY)
g_logger.fatal("EGL not supported");
if(!eglInitialize(m_eglDisplay, &m_eglMajor, &m_eglMinor)) //NULL, NULL
g_logger.fatal("Unable to initialize EGL");
static int configList[] = {
#if OPENGL_ES==2
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
#else
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT,
#endif
EGL_RED_SIZE, 4,
EGL_GREEN_SIZE, 4,
EGL_BLUE_SIZE, 4,
EGL_ALPHA_SIZE, 4,
EGL_NONE
};
EGLint numConfig;
if(!eglGetConfigs(m_eglDisplay, NULL, 0, &numConfig))
g_logger.fatal("No valid GL configurations");
if(!eglChooseConfig(m_eglDisplay, configList, &m_eglConfig, 1, &numConfig))
g_logger.fatal("Failed to choose EGL config");
if(numConfig != 1)
g_logger.warning("Didn't got the exact EGL config");
if (!eglBindAPI(EGL_OPENGL_ES_API))
g_logger.fatal("Failed to bind API!");
EGLint contextAtrrList[] = {
#if OPENGL_ES==2
EGL_CONTEXT_CLIENT_VERSION, 2,
#else
EGL_CONTEXT_CLIENT_VERSION, 1,
#endif
EGL_NONE
};
m_eglContext = eglCreateContext(m_eglDisplay, m_eglConfig, EGL_NO_CONTEXT, contextAtrrList);
if (m_eglContext == EGL_NO_CONTEXT)
g_logger.fatal(stdext::format("Unable to create EGL context: %s", eglGetError()));
m_eglSurface = eglCreateWindowSurface(m_eglDisplay, m_eglConfig, m_window, NULL);
if(m_eglSurface == EGL_NO_SURFACE)
g_logger.fatal(stdext::format("Unable to create EGL surface: %s", eglGetError()));
if(!eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext))
g_logger.fatal("Unable to make current EGL context");
}
So, would anyone know why is this implementation not recognizing the GPU board and failing to execute its fuctions?
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hey Jamie, thanks for answering.
Hey Jamie, thanks for answering.glGenTextures is failing and crashing the program.
--
Yes, glGenTextures is the first one called, because its called to load textures into the program.
Here is the call stack, its failing when creating the textures and there is the call to the function that calls the glGenTextures:
void Texture::createTexture()
{
glGenTextures(1, &m_id); //m_id = 0
assert(m_id != 0);
}
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject+unsubscribe@googlegroups.com.
void Texture::createTexture()
{
if (&glGenTextures == nullptr || glGenTextures == nullptr) {
std::cout << "POINTER NULL" << std::endl;
return;
}
glGenTextures(1, &m_id); //m_id = 0
assert(m_id != 0); //BREAKING HERE
}
GLenum err = glewInit();
if (err != GLEW_OK)
g_logger.fatal(stdext::format("Unable to init GLEW: %s", glewGetErrorString(err)));
// overwrite framebuffer API if needed
if (GLEW_EXT_framebuffer_object && !GLEW_ARB_framebuffer_object) {
glGenFramebuffers = glGenFramebuffersEXT;
glDeleteFramebuffers = glDeleteFramebuffersEXT;
glBindFramebuffer = glBindFramebufferEXT;
glFramebufferTexture2D = glFramebufferTexture2DEXT;
glCheckFramebufferStatus = glCheckFramebufferStatusEXT;
glGenerateMipmap = glGenerateMipmapEXT;
}
So how can identify that? Because both libraries are linked so the program can switch between OpenGL and OpenGL ES