/[projet1]/public/pc/shared_libraries/freeimage/v3.12.0/Examples/OpenGL/TextureManager/readme.txt
Defence Force logotype

Contents of /public/pc/shared_libraries/freeimage/v3.12.0/Examples/OpenGL/TextureManager/readme.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 126 - (show annotations)
Mon Jul 13 12:20:10 2009 UTC (10 years, 7 months ago) by dbug
File MIME type: text/plain
File size: 1124 byte(s)
Added some shared libraries (UnitTest++, and FreeImage) to avoid having every single project brings its own libraries.
Ideally people should add them in a way we can upgrade versions without breaking things:
-> public/pc/shared_libraries/library_name/library_version/actuall_content
1 Hello everyone, this is my 2D texture manager class for OpenGL using the FreeImage Library.
2
3 Requirements:
4 --------------------
5 OpenGL
6 STL map class
7 FreeImage (included)
8
9
10 Usage
11 --------------------
12 To load a texture, simply call the LoadTexture function:
13
14 TextureManager::Inst()->LoadTexture("img\\bg.jpg", BACKGROUND_IMAGE_ID);
15
16 This also binds the loaded texture as the current texture, so after calling it you may make any calls to glTexParameter you may need to specify the properties of the texture.
17
18 When you are rendering, just call the TextureManager's BindImage function instead of glBindImage:
19
20 TextureManager::Inst()->BindImage(BACKGROUND_IMAGE_ID);
21
22 and then do your rendering as normal.
23 --------------------
24
25
26 Feel free to distribute this as you like, but mind the FreeImage licence included in license-fi.txt, and please don't take credit for my code. If you modify it, be sure to mention me (Ben English) somewhere.
27
28 Please send any comments or suggestions to me at benjamin.english@oit.edu
29
30
31 Thanks to Herve Drolon for the FreeImage library, I've found it to be very useful!

  ViewVC Help
Powered by ViewVC 1.1.26