Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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))));
 }
Ejemplo n.º 3
0
 public FramebufferInfo(
     FramebufferHandle handle,
     Optional <RenderbufferHandle> depthbuffer,
     Optional <RenderbufferHandle> stencilbuffer,
     Optional <TextureHandle> colorbuffer)
 {
     Colorbuffer   = colorbuffer;
     Depthbuffer   = depthbuffer;
     Stencilbuffer = stencilbuffer;
     Handle        = handle;
 }
Ejemplo n.º 4
0
 public static void Write(BinaryWriter w, FramebufferHandle h)
 {
     w.Write(h._handle);
 }