I'm at a point with my GUI framework that there's really no need for me to have a panel background texture in a file anymore (it's literally just a background color, which I'd rather declare dynamically and save some disk space while doing it).
However, I'm hitting a snag. While so far I had no problems with surfaces created on the fly with oapiCreateSurfaceEx, I do seem to run into a problem when I want that particular surface to be my panel background.
Earlier, the texture was simply loaded from file:
Which worked fine, and still does.
However, when I replace that line with this:
Not only does my panel turn out pure white all of a sudden, it also doesn't render anything copied to it anymore.
I must conclude that oapiLoadTexture creates the surface in some other maner... I have tried different combinations of surface attribute flags, but nothing seems to do the trick. Has anybody ever tried this sucessfuly?
However, I'm hitting a snag. While so far I had no problems with surfaces created on the fly with oapiCreateSurfaceEx, I do seem to run into a problem when I want that particular surface to be my panel background.
Earlier, the texture was simply loaded from file:
Code:
engPanelBG = oapiLoadTexture("mydir\\panel.dds");
Which worked fine, and still does.
However, when I replace that line with this:
Code:
engPanelBG = oapiCreateSurfaceEx(1680, 1050, OAPISURFACE_TEXTURE);
oapiColourFill(engPanelBG, oapiGetColour(8, 8, 24), 0, 0, 1680, 1050);
Not only does my panel turn out pure white all of a sudden, it also doesn't render anything copied to it anymore.
I must conclude that oapiLoadTexture creates the surface in some other maner... I have tried different combinations of surface attribute flags, but nothing seems to do the trick. Has anybody ever tried this sucessfuly?
Last edited: