Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RazerLink.cs
Go to the documentation of this file.
1
using
Microsoft.Xna.Framework
;
2
3
namespace
ReLogic.Peripherals.RGB.Razer
;
4
5
internal
class
RazerLink
:
RgbDevice
6
{
7
private
NativeMethods.CustomChromaLinkEffect
_effect
=
NativeMethods
.
CustomChromaLinkEffect
.
Create
();
8
9
private
readonly
EffectHandle
_handle
=
new
EffectHandle
();
10
11
public
RazerLink
(
DeviceColorProfile
colorProfile)
12
: base(
RgbDeviceVendor
.Razer,
RgbDeviceType
.Generic,
Fragment
.FromGrid(new
Rectangle
(0, -1, 5, 1)), colorProfile)
13
{
14
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
15
base.PreferredLevelOfDetail =
EffectDetailLevel
.Low;
16
}
17
18
public
override
void
Present
()
19
{
20
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
21
for
(
int
i = 0; i <
_effect
.Color.Length; i++)
22
{
23
_effect
.Color[i] =
RazerHelper
.
Vector4ToDeviceColor
(
GetProcessedLedColor
(i));
24
}
25
_handle
.
SetAsChromaLinkEffect
(ref
_effect
);
26
_handle
.
Apply
();
27
}
28
}
ReLogic.Peripherals.RGB.DeviceColorProfile
Definition
DeviceColorProfile.cs:7
ReLogic.Peripherals.RGB.Fragment
Definition
Fragment.cs:7
ReLogic.Peripherals.RGB.Razer.EffectHandle.Apply
void Apply()
Definition
EffectHandle.cs:54
ReLogic.Peripherals.RGB.Razer.EffectHandle.SetAsChromaLinkEffect
void SetAsChromaLinkEffect(ref NativeMethods.CustomChromaLinkEffect effect)
Definition
EffectHandle.cs:39
ReLogic.Peripherals.RGB.Razer.EffectHandle
Definition
EffectHandle.cs:6
ReLogic.Peripherals.RGB.Razer.NativeMethods
Definition
NativeMethods.cs:7
ReLogic.Peripherals.RGB.Razer.RazerHelper.Vector4ToDeviceColor
static uint Vector4ToDeviceColor(Vector4 color)
Definition
RazerHelper.cs:7
ReLogic.Peripherals.RGB.Razer.RazerHelper
Definition
RazerHelper.cs:6
ReLogic.Peripherals.RGB.Razer.RazerLink._effect
NativeMethods.CustomChromaLinkEffect _effect
Definition
RazerLink.cs:7
ReLogic.Peripherals.RGB.Razer.RazerLink.Present
override void Present()
Definition
RazerLink.cs:18
ReLogic.Peripherals.RGB.Razer.RazerLink._handle
readonly EffectHandle _handle
Definition
RazerLink.cs:9
ReLogic.Peripherals.RGB.Razer.RazerLink.RazerLink
RazerLink(DeviceColorProfile colorProfile)
Definition
RazerLink.cs:11
ReLogic.Peripherals.RGB.Razer.RazerLink
Definition
RazerLink.cs:6
ReLogic.Peripherals.RGB.RgbDevice.GetProcessedLedColor
Vector4 GetProcessedLedColor(int index)
Definition
RgbDevice.cs:37
ReLogic.Peripherals.RGB.RgbDevice
Definition
RgbDevice.cs:7
Microsoft.Xna.Framework
Definition
AlphaTestEffect.cs:1
ReLogic.Peripherals.RGB.Razer
Definition
EffectHandle.cs:3
ReLogic.Peripherals.RGB.RgbDeviceVendor
RgbDeviceVendor
Definition
RgbDeviceVendor.cs:4
ReLogic.Peripherals.RGB.EffectDetailLevel
EffectDetailLevel
Definition
EffectDetailLevel.cs:4
ReLogic.Peripherals.RGB.RgbDeviceType
RgbDeviceType
Definition
RgbDeviceType.cs:4
Microsoft.Xna.Framework.Rectangle
Definition
Rectangle.cs:12
ReLogic.Peripherals.RGB.Razer.NativeMethods.CustomChromaLinkEffect.Create
static CustomChromaLinkEffect Create()
Definition
NativeMethods.cs:190
ReLogic.Peripherals.RGB.Razer.NativeMethods.CustomChromaLinkEffect
Definition
NativeMethods.cs:184
source
ReLogic
ReLogic.Peripherals.RGB.Razer
RazerLink.cs
Generated by
1.10.0