Hello everyone, this is my 2D texture manager class for OpenGL using the FreeImage Library.
Requirements:
--------------------
OpenGL
STL map class
FreeImage (included)
Usage
--------------------
To load a texture, simply call the LoadTexture function:
TextureManager::Inst()->LoadTexture("img\\bg.jpg", BACKGROUND_IMAGE_ID);
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.
When you are rendering, just call the TextureManager's BindImage function instead of glBindImage:
TextureManager::Inst()->BindImage(BACKGROUND_IMAGE_ID);
and then do your rendering as normal.
--------------------
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.
Please send any comments or suggestions to me at benjamin.english@oit.edu
Thanks to Herve Drolon for the FreeImage library, I've found it to be very useful!
没有合适的资源?快使用搜索试试~ 我知道了~
FreeImage图像库及其中文说明文档
共228个文件
html:38个
cs:31个
cpp:26个
5星 · 超过95%的资源 需积分: 10 28 下载量 161 浏览量
2010-12-29
11:04:48
上传
评论 1
收藏 5.8MB RAR 举报
温馨提示
C语言的体系,大量使用指针运算速度可以保证,内含先进的多种插值算法。另外独有的支持meta exif信息的读取。该库最大的特点就是比较简练,只把重点放在对各种格式图像的读取写入支持上,没有显示部分,实际编程的时候还是需要调用API函数进行显示
资源推荐
资源详情
资源评论
收起资源包目录
FreeImage图像库及其中文说明文档 (228个子文件)
MFreeImage.bas 549KB
clean.bat 301B
_clean.bat 180B
linux-gtk.c 2KB
linux-svgalib.c 2KB
FreeImage.NET.chm 2.72MB
fipImage.cpp 23KB
fipWinImage.cpp 14KB
ShowMetadata.cpp 10KB
PluginCradle.cpp 9KB
fipTestMPageMemory.cpp 8KB
BatchLoad.cpp 6KB
fipTestMPageStream.cpp 6KB
CreateAlpha.cpp 6KB
FIFImportExport.cpp 5KB
fipTestMemIO.cpp 5KB
LoadFromHandle.cpp 4KB
fipMultiPage.cpp 4KB
TextureManager.cpp 4KB
FIIO_Mem.cpp 4KB
fipTag.cpp 4KB
CloneMultiPage.cpp 3KB
LoadFromMemory-classified.cpp 3KB
fipMemoryIO.cpp 3KB
LoadFromMemory.cpp 3KB
FreeImageIO.Net.cpp 2KB
fipTestMPage.cpp 2KB
AssemblyInfo.cpp 2KB
fipTest.cpp 2KB
fipMetadataFind.cpp 2KB
FreeImagePlus.cpp 2KB
Stdafx.cpp 211B
MainForm.Designer.cs 15KB
MainForm.cs 11KB
MainForm.Designer.cs 7KB
SerializationPlugin.cs 6KB
Program.cs 6KB
Program.cs 6KB
SampleForm.cs 5KB
MainForm.Designer.cs 4KB
SampleForm.Designer.cs 4KB
MainForm.cs 4KB
SampleForm.Designer.cs 4KB
Program.cs 4KB
SampleForm.cs 3KB
MainForm.cs 3KB
MainForm.cs 3KB
MainForm.Designer.cs 3KB
Program.cs 2KB
Program.cs 2KB
MetaDataFrame.Designer.cs 2KB
MetaDataFrame.cs 1KB
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
AssemblyInfo.cs 559B
Sample 11 - Using the FreeImageBitmap class.csproj 5KB
Sample 08 - Creating a plugin.csproj 4KB
Sample 06 - Converting.csproj 4KB
Sample 01 - Loading and saving.csproj 4KB
Sample 09 - Working with streams.csproj 4KB
Sample 04 - Getting bitmap informations.csproj 4KB
Sample 10 - Metadata.csproj 4KB
Sample 05 - Working with pixels.csproj 4KB
Sample 02 - Multipaged bitmaps.csproj 4KB
Sample 07 - ICC Profiles.csproj 4KB
Sample 03 - Allocating.csproj 4KB
doxygen.css 8KB
tabs.css 2KB
MainForm.dfm 33KB
MainFrm.dfm 4KB
mbMainForm.dfm 2KB
FreeImage.dll 2.36MB
FreeImageNET.dll 185KB
FreeImagePlus.dll 87KB
MainDemo.dpr 212B
MultiBitmap.dpr 210B
ImagePreview.dpr 205B
SimpleTest.frm 1KB
tab_r.gif 3KB
tab_l.gif 706B
tab_b.gif 35B
FreeImagePlus.h 53KB
FreeImagePlus.h 53KB
FreeImage.h 53KB
fipTest.h 3KB
FreeImageIO.Net.h 3KB
FIIO_Mem.h 3KB
PluginCradle.h 2KB
TextureManager.h 1KB
Stdafx.h 178B
resource.h 91B
index.hhc 5KB
共 228 条
- 1
- 2
- 3
资源评论
- xilecsdn2015-05-04学习图形新手有用
- quszq2012-08-22解决vb图像的弱点,正是需要的。。
aliu1986
- 粉丝: 1
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功