egl plugin working

This commit is contained in:
Max Argus
2018-07-04 15:37:28 +02:00
parent f80f0c76a4
commit 05f82e8867
6 changed files with 181 additions and 284 deletions

View File

@@ -38,9 +38,8 @@
#include "OpenGLInclude.h"
#include "EGL/egl.h"
#include "EGL/eglext.h"
#include "GL/gl.h"
#include "glad/egl.h"
#include "glad/gl.h"
#include "EGLOpenGLWindow.h"
@@ -165,8 +164,8 @@ void EGLOpenGLWindow::createWindow(const b3gWindowConstructionInfo& ci) {
fprintf(stderr, "Unable to reload EGL.\n");
exit(EXIT_FAILURE);
}
printf("Loaded EGL %d.%d after reload.\n", egl_version / 10,
egl_version % 10);
printf("Loaded EGL %d.%d after reload.\n", GLAD_VERSION_MAJOR(egl_version),
GLAD_VERSION_MINOR(egl_version));
m_data->success = eglBindAPI(EGL_OPENGL_API);

View File

@@ -1542,8 +1542,9 @@ void GLInstancingRenderer::updateCamera(int upAxis)
//#define STB_IMAGE_WRITE_IMPLEMENTATION
#ifdef STB_AGAIN // first defn in examples/OpenGLWindow/opengl_fontstashcallbacks.cpp
#define STB_IMAGE_WRITE_IMPLEMENTATION
#endif //STB_AGAIN
#include "stb_image/stb_image_write.h"
void writeTextureToPng(int textureWidth, int textureHeight, const char* fileName, int numComponents)
{