The circumstances to why I am forced to do things this way are a bit weird, without going into them, I have the following situation:
I have a pointer that points to image data arranged in the form ARGB, that is overlayed over a scene (2d) to give the ambient lighting and colour. What I need to do is blend in image data generated from lights so that the colours combine and each light makes the overlay more transparent based upon its intensity. Doing this pixel by pixel each frame is slow and bogs everything down, but it works just fine for static lights if done at load time (since they don't change, it doesn't need to be redone).
My final solution requires that the final combined overlay for the lighting be contained in the original pointer; so any method that requires using a different setup, or pulling the data from the pointer, then dumping it back in, might be problematic. I do not, unfortunately, have anyway to modify the source and am stuck passing everything thorough a call to a dll, so I have no other means of introducing lights that doesn't use this structure.
I'm working on Windows and using C++. I, also, want to point out that I am not a games programmer, though I am a programmer, so a lot of what I tried looking up is a bit foreign to me.
Thank you for any help:-)
*Currently, everything happens on the CPU, is there a way to shove everything over to the GPU, do the work (ideally using the blending function I wrote), then bring the result back and put it in the pointer? I looked into using Cuda or OpenCL, but they seem a bit dense to just dive into - but, more importantly, I'm not very familiar with them and am not sure how portable everything will be (and, sadly, given the setup I'm working with, I can't do a lot of extensive testing beyond, see if it crashes when the DLL is called, due to the nature of the problem at hand).