I'm trying to Create a surface and I need help.
First off, all the examples have images as a resource, which is fine and I can get the images to display just fine when I do it that way, but I would like to load files from a directory of my choosing, so I tried using
Which, according to the documentation, should load the file from the directory in which the executable resides in, but that does not work. I tried giving the absolute path of
G:\GapiDraw300Eval\samples\win32\Minimal\common\res\splash.png
but that did not work either.
Am I just not understanding this and am doing it wrong? Can someone help me so I can load my images from a specific directory? i.e. given that my executable is in \mygame and my data files are in \mygame\data how can I load the files from the data directory then? I can't seem to make this work.
First off, all the examples have images as a resource, which is fine and I can get the images to display just fine when I do it that way, but I would like to load files from a directory of my choosing, so I tried using
- Code:
m_splash.CreateSurface(GDSURFACE_SYSTEMMEMORY, TEXT("splash.png"));
Which, according to the documentation, should load the file from the directory in which the executable resides in, but that does not work. I tried giving the absolute path of
G:\GapiDraw300Eval\samples\win32\Minimal\common\res\splash.png
but that did not work either.
Am I just not understanding this and am doing it wrong? Can someone help me so I can load my images from a specific directory? i.e. given that my executable is in \mygame and my data files are in \mygame\data how can I load the files from the data directory then? I can't seem to make this work.