Game Development Reference
In-Depth Information
Since we have two filenames we need to create a single key for our map. The easiest solu-
tion is to concatenate them with a separator in between ( ; in this case) and use that as our
key. In this case we will avoid most conflicts that can happen using different combinations
of shader filenames. If we want a more robust solution we can create a custom struct ,
which holds the two filenames as strings and use it as the key. The rest of the code is the
same as for the other resources, with the exception that we use and return pointers to the
shaders rather than references.
Search WWH ::

Custom Search