cancel
Showing results for 
Search instead for 
Did you mean: 

SDK Discussions

Highlighted
Adept I
Adept I

c# ContextCreateFrameBuffer

Jump to solution

Hello im using the c# into the SDK and ContextCreateFrameBuffer wants an InPtr for the FrameBufferDesc which is a struct how do i fix this thanks.#c# 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adept I
Adept I

Re: c# ContextCreateFrameBuffer

Jump to solution

ok i may have got around it like so but not sure its right

var desc = new FrameBufferDesc() { FbWidth=400,FbHeight =400};
IntPtr pObj = Marshal.AllocHGlobal(Marshal.SizeOf(desc));
Marshal.StructureToPtr(desc, pObj, false);

ContextCreateFrameBuffer(g_context, fmt,pObj , out g_frame_buffer));

View solution in original post

0 Kudos
1 Reply
Highlighted
Adept I
Adept I

Re: c# ContextCreateFrameBuffer

Jump to solution

ok i may have got around it like so but not sure its right

var desc = new FrameBufferDesc() { FbWidth=400,FbHeight =400};
IntPtr pObj = Marshal.AllocHGlobal(Marshal.SizeOf(desc));
Marshal.StructureToPtr(desc, pObj, false);

ContextCreateFrameBuffer(g_context, fmt,pObj , out g_frame_buffer));

View solution in original post

0 Kudos