Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GLES2 demo #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix GLES2 demo #590

wants to merge 1 commit into from

Conversation

mode777
Copy link

@mode777 mode777 commented Oct 24, 2020

No description provided.

@memononen
Copy link
Owner

Please explain your changes.

Copy link
Author

@mode777 mode777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for this pull request - it was kind of an accident trying the automatic pull request feature of vs code. Still some useful stuff in here regarding gles2 (See comments).
Setting vsync on might not be so helpful - I could remove the change in another commit

@@ -25,7 +25,7 @@
#include "nanovg_gl.h"
#include "nanovg_gl_utils.h"
#include "demo.h"
#include "perf.h"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gles2 does not support API functionality used in perf.h - commented out for now

@@ -2568,7 +2568,7 @@ int nvgTextGlyphPositions(NVGcontext* ctx, float x, float y, const char* string,
if (end == NULL)
end = string + strlen(string);

if (string == end)
if (string >= end)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cover the case that start is before end


glfwSetErrorCallback(errorcb);

glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed by GLFW to use EGL on Windows (e.g. for Angle)

@mode777 mode777 changed the title fix demo Fix GLES2 demo Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants