public static void Write(BinaryWriter writer, FramebufferInfo info) { FramebufferHandle.Write(writer, info.Handle); Optional.Write(writer, info.Depthbuffer, buf => RenderbufferHandle.Write(writer, buf)); Optional.Write(writer, info.Stencilbuffer, buf => RenderbufferHandle.Write(writer, buf)); Optional.Write(writer, info.Colorbuffer, buf => TextureHandle.Write(writer, buf)); }
public static FramebufferInfo Read(BinaryReader reader) { return(new FramebufferInfo( FramebufferHandle.Read(reader), Optional.Read(reader, () => RenderbufferHandle.Read(reader)), Optional.Read(reader, () => RenderbufferHandle.Read(reader)), Optional.Read(reader, () => TextureHandle.Read(reader)))); }
public static void Write(BinaryWriter w, RenderbufferHandle h) { w.Write(h._handle); }