cancel
Showing results for 
Search instead for 
Did you mean: 

SDK Discussions

cosmo909
Adept I

c# ContextCreateFrameBuffer

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# 

0 Likes
1 Solution
cosmo909
Adept I

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 Likes
1 Reply
cosmo909
Adept I

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

0 Likes