/// <summary> /// Add a channel to the frame buffer in addition to the fixed Red, Green, Blue and Alpha channels. /// </summary> /// <param name="channel">Channel to add</param> /// <returns>If the channel existed then true is returned otherwise; returns true if the channel was added or false if not.</returns> public bool AddChannel(StandardChannels channel) { uint pixelSize = 0; Guid uuidChannel = Guid.Empty; switch (channel) { case StandardChannels.DistanceFromCamera: case StandardChannels.Alpha: case StandardChannels.NormalX: case StandardChannels.NormalY: case StandardChannels.NormalZ: case StandardChannels.LuminanceRed: case StandardChannels.LuminanceGreen: case StandardChannels.LuminanceBlue: pixelSize = sizeof(float); uuidChannel = ChannelId(channel); break; } if (pixelSize < 1 || uuidChannel == Guid.Empty) { return(false); } return(UnsafeNativeMethods.Rdk_RenderWindow_AddChannel(ConstPointer(), ref uuidChannel, pixelSize)); }
public Channel OpenChannel(StandardChannels id) { IntPtr pChannel = UnsafeNativeMethods.Rdk_RenderWindow_OpenChannel(ConstPointer(), (int)id); if (pChannel != IntPtr.Zero) { return new Channel(pChannel); } return null; }
public Channel OpenChannel(StandardChannels id) { IntPtr pChannel = UnsafeNativeMethods.Rdk_RenderWindow_OpenChannel(ConstPointer(), (int)id); if (pChannel != IntPtr.Zero) { return(new Channel(pChannel)); } return(null); }
public static Guid ChannelId(StandardChannels ch) { return UnsafeNativeMethods.Rdk_RenderWindow_StandardChannelId((int)ch); }
/// <summary> /// Add a channel to the frame buffer in addition to the fixed Red, Green, Blue and Alpha channels. /// </summary> /// <param name="channel">Channel to add</param> /// <returns>If the channel existed then true is returned otherwise; returns true if the channel was added or false if not.</returns> public bool AddChannel(StandardChannels channel) { uint pixelSize = 0; Guid uuidChannel = Guid.Empty; switch (channel) { case StandardChannels.DistanceFromCamera: case StandardChannels.Alpha: case StandardChannels.NormalX: case StandardChannels.NormalY: case StandardChannels.NormalZ: case StandardChannels.LuminanceRed: case StandardChannels.LuminanceGreen: case StandardChannels.LuminanceBlue: pixelSize = sizeof(float); uuidChannel = ChannelId(channel); break; } if (pixelSize < 1 || uuidChannel == Guid.Empty) return false; return UnsafeNativeMethods.Rdk_RenderWindow_AddChannel(ConstPointer(), ref uuidChannel, pixelSize); }
public static Guid ChannelId(StandardChannels ch) { return(UnsafeNativeMethods.Rdk_RenderWindow_StandardChannelId((int)ch)); }