Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace WoWSharp.WoW.Impl
- {
- public class GxDevice
- {
- public static GxDevice Instance
- {
- get
- {
- IntPtr l_Instance = Memory.MemoryContext.Read<IntPtr>(Patchables.Offsets.GxDevice.g_theGxDevicePtr, true);
- return l_Instance != IntPtr.Zero ? new GxDevice(l_Instance) : null;
- }
- }
- public enum RendererType : int
- {
- OpenGL,
- Direct3D9,
- Direct3D11,
- GLL,
- MTL
- }
- public IntPtr Pointer { get; }
- public GxDevice(IntPtr p_Pointer)
- {
- Pointer = p_Pointer;
- }
- public RendererType Type => Memory.MemoryContext.Read<RendererType>(Pointer + Patchables.Offsets.GxDevice.m_DeviceType);
- }
- public class GxDeviceDirect3D9 : GxDevice
- {
- public GxDeviceDirect3D9(IntPtr p_Pointer)
- : base(p_Pointer)
- {
- }
- public IntPtr DevicePointer => Memory.MemoryContext.Read<IntPtr>(Pointer + Patchables.Offsets.GxDeviceDirect3D9.m_pDevice);
- }
- public class GxDeviceDirect3D11 : GxDevice
- {
- public GxDeviceDirect3D11(IntPtr p_Pointer)
- : base(p_Pointer)
- {
- }
- public IntPtr SwapChainPointer => Memory.MemoryContext.Read<IntPtr>(Pointer + Patchables.Offsets.GxDeviceDirect3D11.m_pSwapChain);
- public IntPtr DevicePointer => Memory.MemoryContext.Read<IntPtr>(Pointer + Patchables.Offsets.GxDeviceDirect3D11.m_pDevice);
- public IntPtr DeviceContextPointer => Memory.MemoryContext.Read<IntPtr>(Pointer + Patchables.Offsets.GxDeviceDirect3D11.m_pDeviceContext);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement