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

Corner resizing doesn't scale the draw buffer correctly in WebGL #49

Closed
olilarkin opened this issue Nov 14, 2018 · 15 comments
Closed

Corner resizing doesn't scale the draw buffer correctly in WebGL #49

olilarkin opened this issue Nov 14, 2018 · 15 comments
Labels
IGraphicsWeb Issue relates to IGraphics in the browser nanovg Issue relates to nanovg

Comments

@olilarkin
Copy link
Member

resize

@olilarkin olilarkin added nanovg Issue relates to nanovg IGraphicsWeb Issue relates to IGraphics in the browser labels Nov 14, 2018
@AlexHarker
Copy link
Collaborator

This might be the same as the other resizing problem. We can test once I've got the fix in.

@AlexHarker
Copy link
Collaborator

I can't recreate this with iPlugEffect (I think I've got the build settings right). Is it bitmap related?

@olilarkin
Copy link
Member Author

did you change it to use IGRAPHICS_NANOVG in IPlugEffect-web.mk ?

diff --git a/Examples/IPlugEffect/config/IPlugEffect-web.mk b/Examples/IPlugEffect/config/IPlugEffect-web.mk
index 44912e1111..828d0ae75b 100644
--- a/Examples/IPlugEffect/config/IPlugEffect-web.mk
+++ b/Examples/IPlugEffect/config/IPlugEffect-web.mk
@@ -6,13 +6,13 @@ WAM_SRC += $(IPLUG_EXTRAS_PATH)/MidiSynth.cpp

 # WAM_CFLAGS +=

-WEB_CFLAGS += -DIGRAPHICS_CANVAS
-#WEB_CFLAGS += -DIGRAPHICS_NANOVG -DIGRAPHICS_GL -DIGRAPHICS_GLES2
+#WEB_CFLAGS += -DIGRAPHICS_CANVAS
+WEB_CFLAGS += -DIGRAPHICS_NANOVG -DIGRAPHICS_GL -DIGRAPHICS_GLES2

 WAM_LDFLAGS += -s EXPORT_NAME="'AudioWorkletGlobalScope.WAM.IPlugEffect'" -O2 -s ASSERTIONS=0

-WEB_LDFLAGS += -O2 -s ASSERTIONS=0
+WEB_LDFLAGS += -O2 -s ASSERTIONS=0

 #if you want to use NANOVG/WebGL, you must link with -s USE_GLFW=3 -s USE_WEBGL2=0 -s FULL_ES3=1

-#WEB_LDFLAGS += -s USE_GLFW=3 -s USE_WEBGL2=0 -s FULL_ES3=1
\ No newline at end of file
+WEB_LDFLAGS += -s USE_GLFW=3 -s USE_WEBGL2=0 -s FULL_ES3=1

@AlexHarker
Copy link
Collaborator

Yes.

@olilarkin
Copy link
Member Author

this is what i get, which is wrong...

resize

@AlexHarker
Copy link
Collaborator

weird - I don't see any text on my builds. I will try to double check I am building correctly. Any quick way to check for nanovg?

@olilarkin
Copy link
Member Author

check javascript console for "IGraphics NanoVG @ 60 FPS"

@AlexHarker
Copy link
Collaborator

screen shot 2018-12-01 at 22 48 04

I get this, but it works correctly - definitely using NanoVG. I'm on the master with no edits, other than the config file.

@olilarkin
Copy link
Member Author

on retina screen?

@AlexHarker
Copy link
Collaborator

Yep.

@olilarkin
Copy link
Member Author

hmmm. those errors are normal

@AlexHarker
Copy link
Collaborator

OK. This might be chrome version or OS specific then perhaps?

@AlexHarker
Copy link
Collaborator

OK - I realised I was testing the wrong mode. I have now pushed the scaling fix to master which includes some other adjustments for safety of transforms etc. Be good for you to test it at your end, but I'm confident that this should now be correct.

@AlexHarker
Copy link
Collaborator

fixed in 899fb26

@AlexHarker AlexHarker reopened this Dec 2, 2018
@olilarkin
Copy link
Member Author

confirmed working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IGraphicsWeb Issue relates to IGraphics in the browser nanovg Issue relates to nanovg
Projects
None yet
Development

No branches or pull requests

2 participants