DrawSetTextureFile: Difference between revisions
Jump to navigation
Jump to search
void ISurface::DrawSetTextureFile(int id, const char *filename,
m (moved code) |
Thunder4ik (talk | contribs) m (→See also: Unicodifying, replaced: See Also → See also) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{navbar-last|CreateNewTextureID|ISurface}} | {{navbar-last|CreateNewTextureID|ISurface}} | ||
=void '''DrawSetTextureFile'''(int id, const char *filename, int hardwareFilter, bool forceReload)= | =void [[ISurface]]::'''DrawSetTextureFile'''(int id, const char *filename,<br>int hardwareFilter, bool forceReload)= | ||
Use after [[CreateNewTextureID]] to set the material referenced by a specified ID. | Use after [[CreateNewTextureID]] to set the material referenced by a specified ID. | ||
Line 12: | Line 12: | ||
surface()->'''DrawSetTextureFile'''( currentId, texturename, false, true ); | surface()->'''DrawSetTextureFile'''( currentId, texturename, false, true ); | ||
} | } | ||
==See | ==See also== | ||
* [[DrawSetTextureRGBA]] | * [[DrawSetTextureRGBA]] | ||
[[Category:ISurface]] | [[Category:ISurface]] |
Latest revision as of 09:15, 8 January 2024
← CreateNewTextureID | Return to ISurface |
void ISurface::DrawSetTextureFile(int id, const char *filename,
int hardwareFilter, bool forceReload)
Use after CreateNewTextureID to set the material referenced by a specified ID.
- int hardwareFilter
- This integer has no effect on the ID produced.
- bool forceReload
- This boolean tells ISurface to reload the material if it's already contained in the specified ID. If the material isn't in the specified ID, it will load the material no matter what forceReload is set to.
Sample
currentId = surface()->DrawGetTextureId( texturename ); if ( currentId == -1 ) { currentId = surface()->CreateNewTextureID(); surface()->DrawSetTextureFile( currentId, texturename, false, true ); }