Original Post
For testing purposes I am trying to load a simple byte array into an SDL_Surface so I may display it on the screen. Libraries like opengl and direct3d provide concise calls for this purpose, but the only things I have seen in SDL are for loading surfaces from a file. I have tried allocating my own SDL_Surface and modifying its data, but I get a runtime error even when I change something as minor as the integral width of my data (and this is simply assigning the value, not rendering the surface). In short I have two pieces of data... int numBytes; unsigned char* buffer; and I want to be able to load that into an SDL_Surface.. any advice would be greatly appreciated.