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

Render Bitmaps #1

Open
brunotrevisan opened this issue Jan 19, 2020 · 1 comment
Open

Render Bitmaps #1

brunotrevisan opened this issue Jan 19, 2020 · 1 comment

Comments

@brunotrevisan
Copy link

Hello, how are you? I need to render images, I receive the following parameters from an external dll

ReadOnlySpan data, int width, int height, int pitch

with this information i need to create an image and render it on the screen at 60fps, i'm currently using win2d and canvasAnimateControl but there is no hardware acceleration which has been causing a lot of crashes, is there a possibility to do this with your project? if so how could i create the image with this information i get?

@brunotrevisan
Copy link
Author

My Code

TextureTarget target = new TextureTarget();
GL.TexImage2D(target, 1, PixelInternalFormat.Rgba, (int)width, (int)height, 0, PixelFormat.Rgba, PixelType.UnsignedByte, data.ToArray());
var i = GL.GenTexture();
GL.BindTexture(target, i);
GL.TexParameter(target, TextureParameterName.TextureMinFilter, 0x30B1);
GL.TexParameter(target, TextureParameterName.TextureMagFilter, 0x308A);

is not work help my

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

No branches or pull requests

1 participant