On Wednesday, 19 June 2019 at 17:28:38 UTC, XavierAP wrote:
Also, the return type of SDL_LoadBMP is a pointer, SDL_Surface*
not just SDL_Surface.
Or just use auto of course if you prefer:
void load (string path)
{
import std.string : toStringz;
auto ab = SDL_LoadBMP (path.toStringz);
On Wednesday, 19 June 2019 at 14:58:44 UTC, drug wrote:
19.06.2019 17:52, Den_d_y пишет:
void load (const (char *) path)
{
SDL_Surface ab = SDL_LoadBMP (path);
a = SDL_CreateTextureFromSurface (ab);
SDL_FreeSurface (ab);
}
try the following:
```
void load (string path)
{
imp
19.06.2019 17:52, Den_d_y пишет:
void load (const (char *) path)
{
SDL_Surface ab = SDL_LoadBMP (path);
a = SDL_CreateTextureFromSurface (ab);
SDL_FreeSurface (ab);
}
try the following:
```
void load (string path)
{
import std.string : toStringz;
SDL_Surface ab = SDL_Load