-
I've tried triangle tutorial of opengl-es, but it only renders within left-bottom block of the screen on Android, which works alright on Windows. I don't know what's wrong. You can see screen-shots below:
The sample project: AvaloniaOpenGlLeran |
Beta Was this translation helpful? Give feedback.
Answered by
Supheria
Jan 13, 2025
Replies: 1 comment
-
It could be solved by using render scaling in protected override void OnOpenGlRender(GlInterface gl, int fb)
{
...
var toplevel = TopLevel.GetTopLevel(this);
var scaling = toplevel?.RenderScaling ?? 1;
gl.Viewport(0, 0, (int)(Bounds.Width * scaling), (int)(Bounds.Height * scaling));
...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Supheria
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It could be solved by using render scaling in
gl.ViewPort
: #17958