Is there a possibility to get the addition of a FreeSurface() function to the CGapiRGBASurface class?
While I haven't done any programming with GapiDraw yet, I am browsing through the documentation to see what it offers. I'm curious as to why CGapiRGBASurface isn't 1) Derived from CGapiSurface, and 2) Doesn't offer some of the flexibility that CGapiSurface does (ie; FreeSurface() function).
Please correct me if I'm wrong, but as a quick and dirty "resource manager," I was thinking something along of the lines of this: when a map is loaded, the appropriate graphics will be created, calling CGapiRGBASurface.CreateSurface(). When the map unloads and a new map is loading, graphics that are no longer needed will have FreeSurface() called, and graphics that will be needed will have CreateSurface() called. While the manager would obviously be more complex than this, it should give a basic idea of what I had in mind.
Is there no valid solution to this aside from going with CGapiSurface and forgetting about alpha channels? I did notice that there was a protected member which frees up resources used by CGapiRGBASurface, so I suppose I could just inherit from it and provide the functionality myself.
While I haven't done any programming with GapiDraw yet, I am browsing through the documentation to see what it offers. I'm curious as to why CGapiRGBASurface isn't 1) Derived from CGapiSurface, and 2) Doesn't offer some of the flexibility that CGapiSurface does (ie; FreeSurface() function).
Please correct me if I'm wrong, but as a quick and dirty "resource manager," I was thinking something along of the lines of this: when a map is loaded, the appropriate graphics will be created, calling CGapiRGBASurface.CreateSurface(). When the map unloads and a new map is loading, graphics that are no longer needed will have FreeSurface() called, and graphics that will be needed will have CreateSurface() called. While the manager would obviously be more complex than this, it should give a basic idea of what I had in mind.
Is there no valid solution to this aside from going with CGapiSurface and forgetting about alpha channels? I did notice that there was a protected member which frees up resources used by CGapiRGBASurface, so I suppose I could just inherit from it and provide the functionality myself.