WPF pixel array
Hi,
currently I have a project wrote in c# and WPF. I have to send the pixel byte array of canvas content to video card.
I'm using rendertargetbitmap to get a snapshot oh this canvas and after that I use CopyPixel to copies the bitmap pixel data into a byte array.
I do that because I need alpha channel.
Could I do that with NoesisGUI?
Thank you
currently I have a project wrote in c# and WPF. I have to send the pixel byte array of canvas content to video card.
I'm using rendertargetbitmap to get a snapshot oh this canvas and after that I use CopyPixel to copies the bitmap pixel data into a byte array.
I do that because I need alpha channel.
Could I do that with NoesisGUI?
Thank you
Re: WPF pixel array
Anything involving CopyPixel is extremely slow. Being NoesisGUI an API optimized for videogames and realtime we provide a faster way. You can render to your own GPU render target and just have the result directly in the GPU card without having to copy using the CPU.
Re: WPF pixel array
Thank you for the answer, I'm working with blackmagic decklink. Decklink function provides me an IntPtr where I write the byte array.
How I can do that?
Thank you
How I can do that?
Thank you
Re: WPF pixel array
As said, Noesis renders to the active render target (a render texture, a framebuffer, etc). How to get a byte array from that GPU buffer is something not related to Noesis and it depends on the graphics API you are using: d3d, opengl, metal or the engine: unity, unreal, c++ sdk...
Are you using Unity?
Are you using Unity?
Re: WPF pixel array
Thank you for the answer,
I'm not using with Unity, I'm using with WPF, XAML and c#.
Let me explain my project
In my project I have a canvas with some controls (rectangles, text...)
WPF don't give me the frame buffer, so I need to use rendertargetbitmap to get it.
I use rendertargetbitmap because I need alpha channel. if I use BitBlt or something like that I can't have alpha channel. I have same problem if I try to extract the output data from video card.
With noesisgui can I render directly in a framebuffer?
Thank you
I'm not using with Unity, I'm using with WPF, XAML and c#.
Let me explain my project
In my project I have a canvas with some controls (rectangles, text...)
WPF don't give me the frame buffer, so I need to use rendertargetbitmap to get it.
I use rendertargetbitmap because I need alpha channel. if I use BitBlt or something like that I can't have alpha channel. I have same problem if I try to extract the output data from video card.
With noesisgui can I render directly in a framebuffer?
Thank you
Re: WPF pixel array
Yes, with noesisgui you render to the current active framebuffer.With noesisgui can I render directly in a framebuffer?
Re: WPF pixel array
Please could you give me an example how can I get this frame buffer.
What is the pixel format of this frame buffer? 8bit ARGB?
Thank you
What is the pixel format of this frame buffer? 8bit ARGB?
Thank you
Re: WPF pixel array
Noesis does not create the framebuffer. That's client responsibility. For example, in our OpenGL C# sample we are using glut for the initialization:
But you can change this and even don't use glut and use a different OpenGL helper.
Code: Select all
glutInit(&myargc, myargv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
glutInitWindowSize(windowWidth, windowHeight);
glutInitWindowPosition(0, 0);
Re: WPF pixel array
Ok. Please tell me where can I find the pixels frame buffer in your OpenGL C# sample
Thank you
Thank you
Re: WPF pixel array
I recommend glReadPixels. But, as said, this is a pure OpenGL problem.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 7 guests