Skip to content

Render of OpenGlControlBase on Android seems strange #17930

Answered by Supheria
Supheria asked this question in Q&A
Discussion options

You must be logged in to vote

It could be solved by using render scaling in gl.ViewPort: #17958

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));

    ...
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Supheria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant