vC++ question
Lets take into consideration the following scenario:
1. I have a small program that inits PR and loads a PRO file of a cube with one texture, then rotates that cube (like the simple object example)
2. I add the texture file (TGA) and PRO file into my project as resources so that those files will be contained inside of the EXE when it is compiled.
How do I load the PRO file? I never learned how to load stuff from resources like that, so I was hoping someone could help me out.
Thanks a bunch!
-Rich
When you add your texture file in the VC++ project, you also define a "tag name" which is simply a define.
Look at your resource file and you should know the name of the define.
My 2 cents
Amadrias
Look at your resource file and you should know the name of the define.
My 2 cents
Amadrias
All you need to do is make some PR library functions that load from the resources instead of from the file.
Call PRLIB_RegisterLoadFunction and PRLIB_OpenLibrary with whatever filename . the extension you added the functions for.
To load the resources into memory you could use something like LoadResource.
Gary
Call PRLIB_RegisterLoadFunction and PRLIB_OpenLibrary with whatever filename . the extension you added the functions for.
To load the resources into memory you could use something like LoadResource.
Gary
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement