Sign in to follow this  
coderchris

DX11 GPUList<T>: A C# list class with a DX11 Buffer backend

Recommended Posts

Hey everyone,

So earlier today, I was playing with some compute shader stuff, and I found myself getting very frustrated dealing with buffers, copying the data back and forth, ect...
I thought, it would be really nice if there was some kind of pretty C# interface to a list of data stored on the GPU...

Well, I never found one, so I wrote my own! I would like to share it in hopes that it will cure at least one more headache.

Its essentially an implementation of IList<T> which is backed using a SlimDX Buffer.
Any operation you do directly affects this underlying buffer.
Therefor, its very easy to make a list of data to give / receive to / from your shaders.

Its not perfect, but it gets the job done. Its pretty, easy to use, and (somewhat) tested.

Source code for the List and a small test program are below.
Please let me know if you have comments, suggestions, fixes, or find any bugs.

~Chris

[ps I tried attaching the .cs files directly but it doesn't like them?]

[code]

using System;
using System.Collections.Generic;
using System.Linq;

using SlimDX;
using SlimDX.Direct3D11;
using SlimDX.DXGI;
using SlimDX.D3DCompiler;

using Device = SlimDX.Direct3D11.Device;
using Buffer = SlimDX.Direct3D11.Buffer;

namespace GPUTools
{
class Program
{
/// <summary>
/// Simple structure representing some kind of particle
/// </summary>
struct Particle
{
public Vector3 Position;
public Vector3 Velocity;

public override string ToString()
{
return "Position: " + Position.ToString() + ", Velocity: " + Velocity.ToString();
}
}

static void Main(string[] args)
{
// Source code for the simple integration compute shader
const string integrateSource = @"

struct Particle
{
float3 position;
float3 velocity;
};

RWStructuredBuffer<Particle> particles;

[numthreads(1, 1, 1)]
void Integrate(uint3 threadID : SV_DispatchThreadID)
{
particles[threadID.x].position += particles[threadID.x].velocity;
}
";

// Make device
Device device = new Device(DriverType.Hardware, DeviceCreationFlags.None, FeatureLevel.Level_10_0);

// Compile compute shader
ShaderBytecode integrateBytecode = ShaderBytecode.Compile(integrateSource, "Integrate", "cs_4_0", ShaderFlags.None, EffectFlags.None);
ComputeShader integrate = new ComputeShader(device, integrateBytecode);

// Create GPUList of particles using the immediate context
GPUList<Particle> particles = new GPUList<Particle>(device.ImmediateContext);
// Add some particles
for (int i = 0; i < 10; i++)
particles.Add(new Particle() { Position = new Vector3(i, 0, 0), Velocity = new Vector3(0, i, -i) });

// Print the particles
Console.WriteLine("Before Integration:");
foreach (Particle p in particles)
Console.WriteLine(p.ToString());

// Run the compute shader
device.ImmediateContext.ComputeShader.Set(integrate);
device.ImmediateContext.ComputeShader.SetUnorderedAccessView(particles.UnorderedAccess, 0);
device.ImmediateContext.Dispatch(particles.Count, 1, 1);

// Print the particles again
Console.WriteLine("\n\nAfter Integration:");
foreach (Particle p in particles)
Console.WriteLine(p.ToString());

Console.Read();
}
}
}
[/code]


[code]

/* Who: Chris Giles
* What: A GPU-based implementation of List<T>
* When: 5/16/2011 @ ~4 AM
* Where: My house
* Why: I was tired of dealing with low level graphics resources
* This is almost completely interchangable with built in C# List<T>
* Only, the backend is a DirectX11 Buffer
* You can use the underlying buffer in any kind of shader
* But with a pretty C# interface for messing with its data
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;

using SlimDX;
using SlimDX.Direct3D11;

using Device = SlimDX.Direct3D11.Device;
using Buffer = SlimDX.Direct3D11.Buffer;

namespace GPUTools
{
public class GPUList<T> : IList<T>, IDisposable where T : struct
{
#region GPUList Members

private DeviceContext context;
private Buffer buffer;
private ShaderResourceView shaderResourceView;
private UnorderedAccessView unorderedAccessView;

private int count;
private int capacity;

/// <summary>
/// Makes a new list given initial data
/// </summary>
/// <param name="context">Device context on which to perform all operations</param>
public GPUList(DeviceContext context)
{
this.context = context;
}

/// <summary>
/// Makes a new empty list with an initial capacity
/// </summary>
/// <param name="context">Device context on which to perform all operations</param>
/// <param name="initialCapacity">The initial capacity</param>
public GPUList(DeviceContext context, int initialCapacity)
{
this.context = context;
this.setCapacity(initialCapacity);
}

/// <summary>
/// Makes a new list given initial data
/// </summary>
/// <param name="context">Device context on which to perform all operations</param>
/// <param name="data">The initial data</param>
public GPUList(DeviceContext context, IEnumerable<T> data)
{
this.context = context;
this.AddRange(data);
}

/// <summary>
/// Gets the DeviceContext on which to perform all operations
/// </summary>
public DeviceContext Context { get { return context; } }

/// <summary>
/// Gets the underlying Buffer stored on the GPU
/// </summary>
public Buffer GPUBuffer { get { return buffer; } }

/// <summary>
/// Gets a ShaderResourceView for use in a shader
/// </summary>
public ShaderResourceView ShaderResource { get { return shaderResourceView; } }

/// <summary>
/// Gets a UnorderedAccessView for use in a shader
/// </summary>
public UnorderedAccessView UnorderedAccess { get { return unorderedAccessView; } }

/// <summary>
/// Gets or Sets the internal GPU buffer capacity in number of elements
/// </summary>
public int Capacity { get { return capacity; } set { setCapacity(value); } }

/// <summary>
/// Adds a range of items to the end of the list
/// </summary>
/// <param name="range"></param>
public void AddRange(IEnumerable<T> range)
{
if (range == null)
throw new ArgumentNullException();

int dataSize = Marshal.SizeOf(typeof(T));

if (range is GPUList<T> && range != this)
{
GPUList<T> list = range as GPUList<T>;

if (list.Count == 0)
return;
if (Count + list.Count > Capacity)
setCapacity(2 * Count + list.Count);

count += list.Count;

list.CopyRangeTo(0, list.Count, this, Count - list.Count);
}
else
{
T[] data = null;
if (range is T[])
data = (T[])range;
else if (range is List<T>)
data = (range as List<T>).ToArray();
else
{
List<T> dataList = new List<T>(range);
data = dataList.ToArray();
}

if (data.Length == 0)
return;
if (Count + data.Length > Capacity)
setCapacity(2 * Count + data.Length);

count += data.Length;

SetRange(Count - data.Length, data, 0, data.Length);
}
}

/// <summary>
/// Inserts a range of items into the list
/// </summary>
/// <param name="index">Position in the list to insert items</param>
/// <param name="range">The range of items to insert</param>
public void InsertRange(int index, IEnumerable<T> range)
{
if (range == null)
throw new ArgumentNullException();
if (index < 0 || index > Count)
throw new IndexOutOfRangeException();

if (index == Count)
{
AddRange(range);
}
else
{
GPUList<T> newList = null;

if (range is GPUList<T>)
{
GPUList<T> list = range as GPUList<T>;

if (list.Count == 0)
return;

newList = new GPUList<T>(Context, list.Count + Count);
newList.count = list.Count + Count;
this.CopyRangeTo(0, index, newList, 0);
list.CopyTo(newList, index);
this.CopyRangeTo(index, Count - index, newList, index + list.Count);
}
else
{
T[] data = null;
if (range is T[])
data = (T[])range;
else if (range is List<T>)
data = (range as List<T>).ToArray();
else
{
List<T> dataList = new List<T>(range);
data = dataList.ToArray();
}

if (data.Length == 0)
return;

newList = new GPUList<T>(Context, data.Length + Count);
newList.count = data.Length + Count;
this.CopyRangeTo(0, index, newList, 0);
newList.SetRange(index, data, 0, data.Length);
this.CopyRangeTo(index, Count - index, newList, index + data.Length);
}

setCapacity(0);
count = newList.count;
capacity = newList.capacity;
buffer = newList.buffer;
shaderResourceView = newList.shaderResourceView;
unorderedAccessView = newList.unorderedAccessView;
}
}

/// <summary>
/// Removes a range of items from the list
/// </summary>
/// <param name="index">Index to start removing</param>
/// <param name="count">Number of items to remove</param>
public void RemoveRange(int index, int count)
{
if (count == 0)
return;

if (count < 0)
throw new IndexOutOfRangeException();
if (index < 0 || index >= Count)
throw new IndexOutOfRangeException();
if (index + count < 0 || index + count > Count)
throw new IndexOutOfRangeException();

if (index + count == Count)
{
this.count -= count;
return;
}

GPUList<T> newList = new GPUList<T>(Context, Capacity);
newList.count = this.count - count;
this.CopyRangeTo(0, index, newList, 0);
this.CopyRangeTo(index + count, this.count - (index + count), newList, index);

setCapacity(0);
this.count = newList.count;
this.capacity = newList.capacity;
this.buffer = newList.buffer;
this.shaderResourceView = newList.shaderResourceView;
this.unorderedAccessView = newList.unorderedAccessView;
}

/// <summary>
/// Sets a range of data in the list based on an array
/// </summary>
/// <param name="index">Index in the GPUList to start setting data</param>
/// <param name="array">The array of data to use</param>
/// <param name="arrayIndex">The start index in the array</param>
/// <param name="count">The number of elements to set</param>
public void SetRange(int index, T[] array, int arrayIndex, int count)
{
if (count == 0)
return;

if (count < 0)
throw new IndexOutOfRangeException();
if (index < 0 || index >= Count)
throw new IndexOutOfRangeException();
if (index + count < 0 || index + count > Count)
throw new IndexOutOfRangeException();

if (array == null)
throw new ArgumentNullException();
if (arrayIndex < 0 || arrayIndex >= array.Length)
throw new IndexOutOfRangeException();
if (arrayIndex + array.Length < 0 || arrayIndex + count > array.Length)
throw new IndexOutOfRangeException();

int dataSize = Marshal.SizeOf(typeof(T));
DataStream stream = new DataStream(array, true, false);
stream.Seek(arrayIndex, System.IO.SeekOrigin.Begin);
context.UpdateSubresource(new DataBox(0, 0, stream), buffer, 0,
new ResourceRegion(dataSize * index, 0, 0, dataSize * (index + count), 1, 1));
}

/// <summary>
/// Copies a range of data to an array
/// </summary>
/// <param name="index">Index from which to start copying</param>
/// <param name="count">Number of elements to copy</param>
/// <param name="array">Destination array to copy to</param>
/// <param name="arrayIndex">Destination array index to copy to</param>
public void CopyRangeTo(int index, int count, T[] array, int arrayIndex)
{
if (count == 0)
return;

if (count < 0)
throw new IndexOutOfRangeException();
if (index < 0 || index >= Count)
throw new IndexOutOfRangeException();
if (index + count < 0 || index + count > Count)
throw new IndexOutOfRangeException();

if (array == null)
throw new ArgumentNullException();
if (arrayIndex < 0 || arrayIndex >= array.Length)
throw new IndexOutOfRangeException();
if (arrayIndex + array.Length < 0 || arrayIndex + count > array.Length)
throw new IndexOutOfRangeException();

int dataSize = Marshal.SizeOf(typeof(T));
Buffer stagingBuffer = new Buffer(context.Device, dataSize * count, ResourceUsage.Staging,
BindFlags.None, CpuAccessFlags.Read, ResourceOptionFlags.None, 0);

context.CopySubresourceRegion(buffer, 0,
new ResourceRegion(dataSize * index, 0, 0, dataSize * (index + count), 1, 1),
stagingBuffer, 0, 0, 0, 0);

DataBox box = context.MapSubresource(stagingBuffer, 0, dataSize * count,
MapMode.Read, SlimDX.Direct3D11.MapFlags.None);
box.Data.ReadRange<T>(array, arrayIndex, count);
context.UnmapSubresource(stagingBuffer, 0);

stagingBuffer.Dispose();
}

/// <summary>
/// Copies a range of data to another GPUList
/// </summary>
/// <param name="index">Index from which to start copying</param>
/// <param name="count">Number of elements to copy</param>
/// <param name="list">Destination list to copy to</param>
/// <param name="listIndex">Destination list index to copy to</param>
public void CopyRangeTo(int index, int count, GPUList<T> list, int listIndex)
{
if (count == 0)
return;

if (list == this)
throw new Exception("Cannot copy range into self...yet");

if (count < 0)
throw new IndexOutOfRangeException();
if (index < 0 || index >= Count)
throw new IndexOutOfRangeException();
if (index + count < 0 || index + count > Count)
throw new IndexOutOfRangeException();

if (list == null)
throw new ArgumentNullException();
if (listIndex < 0 || listIndex >= list.Count)
throw new IndexOutOfRangeException();
if (listIndex + list.Count < 0 || listIndex + count > list.Count)
throw new IndexOutOfRangeException();

int dataSize = Marshal.SizeOf(typeof(T));
context.CopySubresourceRegion(buffer, 0,
new ResourceRegion(dataSize * index, 0, 0, dataSize * (index + count), 1, 1),
list.buffer, 0, dataSize * listIndex, 0, 0);
}

/// <summary>
/// Copys the list to another GPUList
/// </summary>
/// <param name="array">The list to copy data to</param>
/// <param name="arrayIndex">The starting index in the array</param>
public void CopyTo(GPUList<T> list, int listIndex)
{
CopyRangeTo(0, count, list, listIndex);
}

/// <summary>
/// Trims excess capacity on the internal GPU buffer to match the count
/// </summary>
public void TrimExcess()
{
setCapacity(Count);
}

/// <summary>
/// Returns a copy of the list into an array
/// </summary>
/// <returns></returns>
public T[] ToArray()
{
T[] data = new T[Count];
CopyTo(data, 0);
return data;
}

/// <summary>
/// Sets the internal capacity of the list
/// </summary>
/// <param name="newCapacity"></param>
private void setCapacity(int newCapacity)
{
if (newCapacity < 0)
throw new ArgumentOutOfRangeException();

if (newCapacity == capacity)
return;

if (newCapacity == 0)
{
if (unorderedAccessView != null)
unorderedAccessView.Dispose();
if (shaderResourceView != null)
shaderResourceView.Dispose();
if (buffer != null)
buffer.Dispose();

unorderedAccessView = null;
shaderResourceView = null;
buffer = null;

capacity = count = 0;
return;
}

int dataSize = Marshal.SizeOf(typeof(T));
Buffer newBuffer = new Buffer(context.Device, dataSize * newCapacity, ResourceUsage.Default,
BindFlags.ShaderResource | BindFlags.UnorderedAccess,
CpuAccessFlags.None, ResourceOptionFlags.StructuredBuffer, dataSize);

int sizeToCopy = Math.Min(newCapacity, Count);
if (sizeToCopy > 0)
context.CopySubresourceRegion(buffer, 0, new ResourceRegion(0, 0, 0, dataSize * sizeToCopy, 1, 1), newBuffer, 0, 0, 0, 0);

count = sizeToCopy;
capacity = newCapacity;

if (unorderedAccessView != null)
unorderedAccessView.Dispose();
if (shaderResourceView != null)
shaderResourceView.Dispose();
if (buffer != null)
buffer.Dispose();

buffer = newBuffer;
unorderedAccessView = new UnorderedAccessView(context.Device, buffer);
shaderResourceView = new ShaderResourceView(context.Device, buffer);
}

#endregion

#region IDisposable Members

/// <summary>
/// Disposes the list by destroying all GPU resources used
/// </summary>
public void Dispose()
{
setCapacity(0);
}

#endregion

#region IList<T> Members

/// <summary>
/// Adds one item to the end of the list
/// </summary>
/// <param name="item">The item to add</param>
public void Add(T item)
{
T[] array = new T[] { item };
AddRange(array);
}

/// <summary>
/// Gets the index in the list of the first item found
/// </summary>
/// <param name="item">The item whose index is searched for</param>
/// <returns>Index of the item found, or -1 if not found</returns>
public int IndexOf(T item)
{
T[] data = new T[count];
CopyTo(data, 0);

for (int i = 0; i < data.Length; i++)
if (data[i].Equals(item))
return i;
return -1;
}

/// <summary>
/// Inserts an item at a specific index
/// </summary>
/// <param name="index">The index in the list to insert the item</param>
/// <param name="item">The item to insert</param>
public void Insert(int index, T item)
{
T[] array = new T[] { item };
InsertRange(index, array);
}

/// <summary>
/// Removes an item at a specific index
/// </summary>
/// <param name="index"></param>
public void RemoveAt(int index)
{
RemoveRange(index, 1);
}

/// <summary>
/// Gets or Sets an element at some index in the list
/// </summary>
/// <param name="index">Index in the list to get or set</param>
/// <returns></returns>
public T this[int index]
{
get
{
if (index < 0 || index >= count)
throw new IndexOutOfRangeException();

T[] array = new T[1];
CopyRangeTo(index, 1, array, 0);
return array[0];
}
set
{
if (index < 0 || index >= count)
throw new IndexOutOfRangeException();

T[] array = new T[] { value };
SetRange(index, array, 0, 1);
}
}

#endregion

#region ICollection<T> Members

/// <summary>
/// Clears the list of all elements
/// </summary>
public void Clear()
{
count = 0;
}

/// <summary>
/// Returns true if the item is contained in the list, or false if not
/// </summary>
/// <param name="item">The item to check containment for</param>
/// <returns></returns>
public bool Contains(T item)
{
foreach (T i in this)
if (i.Equals(item))
return true;
return false;
}

/// <summary>
/// Copys the list to an array
/// </summary>
/// <param name="array">The array to copy data to</param>
/// <param name="arrayIndex">The starting index in the array</param>
public void CopyTo(T[] array, int arrayIndex)
{
CopyRangeTo(0, count, array, arrayIndex);
}

/// <summary>
/// Gets the number of items in the list
/// </summary>
public int Count { get { return count; } }

/// <summary>
/// Returns whether or not the list is read only
/// </summary>
public bool IsReadOnly { get { return false; } }

/// <summary>
/// Removes an item from the list. Only the first item found is removed
/// </summary>
/// <param name="item">The item to remove</param>
/// <returns>True if the item is removed, false otherwise</returns>
public bool Remove(T item)
{
int index = IndexOf(item);
if (index >= 0)
RemoveAt(index);
return index >= 0;
}

#endregion

#region IEnumerable<T> Members

/// <summary>
/// Gets the enumerator for this list. Any changes made while enumerating will not be reflected
/// </summary>
/// <returns></returns>
public IEnumerator<T> GetEnumerator()
{
T[] array = new T[count];
CopyTo(array, 0);
return array.AsEnumerable<T>().GetEnumerator();
}

#endregion

#region IEnumerable Members

/// <summary>
/// Gets the enumerator for this list. Any changes made while enumerating will not be reflected
/// </summary>
/// <returns></returns>
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}

#endregion
}
}
[/code]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Announcements

  • Forum Statistics

    • Total Topics
      628375
    • Total Posts
      2982319
  • Similar Content

    • By joeblack
      Hi,
      im reading about specular aliasing because of mip maps, as far as i understood it, you need to compute fetched normal lenght and detect now its changed from unit length. I’m currently using BC5 normal maps, so i reconstruct z in shader and therefore my normals are normalized. Can i still somehow use antialiasing or its not needed? Thanks.
    • By 51mon
      I want to change the sampling behaviour to SampleLevel(coord, ddx(coord.y).xx, ddy(coord.y).xx). I was just wondering if it's possible without explicit shader code, e.g. with some flags or so?
    • By GalacticCrew
      Hello,
      I want to improve the performance of my game (engine) and some of your helped me to make a GPU Profiler. After creating the GPU Profiler, I started to measure the time my GPU needs per frame. I refined my GPU time measurements to find my bottleneck.
      Searching the bottleneck
      Rendering a small scene in an Idle state takes around 15.38 ms per frame. 13.54 ms (88.04%) are spent while rendering the scene, 1.57 ms (10.22%) are spent during the SwapChain.Present call (no VSync!) and the rest is spent on other tasks like rendering the UI. I further investigated the scene rendering, since it takes über 88% of my GPU frame rendering time.
      When rendering my scene, most of the time (80.97%) is spent rendering my models. The rest is spent to render the background/skybox, updating animation data, updating pixel shader constant buffer, etc. It wasn't really suprising that most of the time is spent for my models, so I further refined my measurements to find the actual bottleneck.
      In my example scene, I have five animated NPCs. When rendering these NPCs, most actions are almost for free. Setting the proper shaders in the input layout (0.11%), updating vertex shader constant buffers (0.32%), setting textures (0.24%) and setting vertex and index buffers (0.28%). However, the rest of the GPU time (99.05% !!) is spent in two function calls: DrawIndexed and DrawIndexedInstance.
      I searched this forum and the web for other articles and threads about these functions, but I haven't found a lot of useful information. I use SharpDX and .NET Framework 4.5 to develop my game (engine). The developer of SharpDX said, that "The method DrawIndexed in SharpDX is a direct call to DirectX" (Source). DirectX 11 is widely used and SharpDX is "only" a wrapper for DirectX functions, I assume the problem is in my code.
      How I render my scene
      When rendering my scene, I render one model after another. Each model has one or more parts and one or more positions. For example, a human model has parts like head, hands, legs, torso, etc. and may be placed in different locations (on the couch, on a street, ...). For static elements like furniture, houses, etc. I use instancing, because the positions never change at run-time. Dynamic models like humans and monster don't use instancing, because positions change over time.
      When rendering a model, I use this work-flow:
      Set vertex and pixel shaders, if they need to be updated (e.g. PBR shaders, simple shader, depth info shaders, ...) Set animation data as constant buffer in the vertex shader, if the model is animated Set generic vertex shader constant buffer (world matrix, etc.) Render all parts of the model. For each part: Set diffuse, normal, specular and emissive texture shader views Set vertex buffer Set index buffer Call DrawIndexedInstanced for instanced models and DrawIndexed models What's the problem
      After my GPU profiling, I know that over 99% of the rendering time for a single model is spent in the DrawIndexedInstanced and DrawIndexed function calls. But why do they take so long? Do I have to try to optimize my vertex or pixel shaders? I do not use other types of shaders at the moment. "Le Comte du Merde-fou" suggested in this post to merge regions of vertices to larger vertex buffers to reduce the number of Draw calls. While this makes sense to me, it does not explain why rendering my five (!) animated models takes that much GPU time. To make sure I don't analyse something I wrong, I made sure to not use the D3D11_CREATE_DEVICE_DEBUG flag and to run as Release version in Visual Studio as suggested by Hodgman in this forum thread.
      My engine does its job. Multi-texturing, animation, soft shadowing, instancing, etc. are all implemented, but I need to reduce the GPU load for performance reasons. Each frame takes less than 3ms CPU time by the way. So the problem is on the GPU side, I believe.
    • By noodleBowl
      I was wondering if someone could explain this to me
      I'm working on using the windows WIC apis to load in textures for DirectX 11. I see that sometimes the WIC Pixel Formats do not directly match a DXGI Format that is used in DirectX. I see that in cases like this the original WIC Pixel Format is converted into a WIC Pixel Format that does directly match a DXGI Format. And doing this conversion is easy, but I do not understand the reason behind 2 of the WIC Pixel Formats that are converted based on Microsoft's guide
      I was wondering if someone could tell me why Microsoft's guide on this topic says that GUID_WICPixelFormat40bppCMYKAlpha should be converted into GUID_WICPixelFormat64bppRGBA and why GUID_WICPixelFormat80bppCMYKAlpha should be converted into GUID_WICPixelFormat64bppRGBA
      In one case I would think that: 
      GUID_WICPixelFormat40bppCMYKAlpha would convert to GUID_WICPixelFormat32bppRGBA and that GUID_WICPixelFormat80bppCMYKAlpha would convert to GUID_WICPixelFormat64bppRGBA, because the black channel (k) values would get readded / "swallowed" into into the CMY channels
      In the second case I would think that:
      GUID_WICPixelFormat40bppCMYKAlpha would convert to GUID_WICPixelFormat64bppRGBA and that GUID_WICPixelFormat80bppCMYKAlpha would convert to GUID_WICPixelFormat128bppRGBA, because the black channel (k) bits would get redistributed amongst the remaining 4 channels (CYMA) and those "new bits" added to those channels would fit in the GUID_WICPixelFormat64bppRGBA and GUID_WICPixelFormat128bppRGBA formats. But also seeing as there is no GUID_WICPixelFormat128bppRGBA format this case is kind of null and void
      I basically do not understand why Microsoft says GUID_WICPixelFormat40bppCMYKAlpha and GUID_WICPixelFormat80bppCMYKAlpha should convert to GUID_WICPixelFormat64bppRGBA in the end
       
    • By DejayHextrix
      Hi, New here. 
      I need some help. My fiance and I like to play this mobile game online that goes by real time. Her and I are always working but when we have free time we like to play this game. We don't always got time throughout the day to Queue Buildings, troops, Upgrades....etc.... 
      I was told to look into DLL Injection and OpenGL/DirectX Hooking. Is this true? Is this what I need to learn? 
      How do I read the Android files, or modify the files, or get the in-game tags/variables for the game I want? 
      Any assistance on this would be most appreciated. I been everywhere and seems no one knows or is to lazy to help me out. It would be nice to have assistance for once. I don't know what I need to learn. 
      So links of topics I need to learn within the comment section would be SOOOOO.....Helpful. Anything to just get me started. 
      Thanks, 
      Dejay Hextrix 
  • Popular Now