My code is quite large. About 40 files. It''s probably something I''ll have to do on my own.
"Don''t be afraid to dream, for out of such fragile things come miracles."
DevIL & Dev-C++
Just to let you all know, you can e-mail me directly at denton@imagelib.org. Unfortunately, I don''t frequent this message forum, so it''s rare to get a response from me here. Looking over the responses, it appears that most of the problems got solved, though some remain.
I haven''t supported Dev-C++ much yet because of its stubbornness in trying to steal file assocations away from MSVC++. However, I am planning on downloading it soon to try to get it to use DevIL properly.
By the way, most of the NeHe tutorials that use DevIL (OpenIL) are out of date, and I should be submitting newer versions to Jeff soon. The biggest problems with the old tutorials is that most do not call ilInit (absolutely required now), and they use the defunct .oil file format.
Denton Woods, aka DooMWiz
Developer''s Image Library (DevIL) @ http://www.imagelib.org .
I haven''t supported Dev-C++ much yet because of its stubbornness in trying to steal file assocations away from MSVC++. However, I am planning on downloading it soon to try to get it to use DevIL properly.
By the way, most of the NeHe tutorials that use DevIL (OpenIL) are out of date, and I should be submitting newer versions to Jeff soon. The biggest problems with the old tutorials is that most do not call ilInit (absolutely required now), and they use the defunct .oil file format.
Denton Woods, aka DooMWiz
Developer''s Image Library (DevIL) @ http://www.imagelib.org .
Denton Woods, aka DooMWizDeveloper's Image Library (DevIL) @ http://www.imagelib.org .
June 24, 2002 10:43 PM
Wow, it''s great to get a response from you, Denton. Dev-C++ does have a few quirks compared to MSVC++, but it is an unbelievable IDE, made even better by the fact that it is absolutely free. So far, DevIL is working quite well with it. The only downside I can see right now is that libraries are linked dynamically, so I will have to include the 3 DevIL .dll''s with my program. Since it is such a wonderful library, I will not have a hard time overlooking this minor inconvienence.
If you wouldn''t mind, could you take a look at this texture loading code. There really isn''t a comprehensive listing of code on the site, so I hope that this is the best way to do it:
Not much to explain there, except for ShiningKnight''s log file class, which simply writes to a text file.
I first started by using ilutGLLoadImage, but I was wondering about that function: does it allow to change the texture parameters at all? If I call glTexParameteri before ilutGLLoadImage, will the parameters I set be carried over? If so, what is the purpose of loading a texture the long way?
Thanks,
Dan C.
If you wouldn''t mind, could you take a look at this texture loading code. There really isn''t a comprehensive listing of code on the site, so I hope that this is the best way to do it:
// Load font bitmap (DevIL) ilGenImages(1, &Texs[0]); ilBindImage(Texs[0]); ilLoadImage("Data/font1.bmp"); // Create OpenGL texture glGenTextures(1, &texture[0]); glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); if(!ilutGLTexImage(0)) { EruLog.Output(" ERROR: Image not loaded as texture"); return FALSE; } ILenum Error; while ((Error = ilGetError()) != IL_NO_ERROR) { EruLog.Output(" %d: %s/n", Error, iluErrorString(Error)); } if(ilGetData() != NULL) { ilDeleteImages(1, &Texs[0]); EruLog.Output(" DevIL image deleted successfully"); }
Not much to explain there, except for ShiningKnight''s log file class, which simply writes to a text file.
I first started by using ilutGLLoadImage, but I was wondering about that function: does it allow to change the texture parameters at all? If I call glTexParameteri before ilutGLLoadImage, will the parameters I set be carried over? If so, what is the purpose of loading a texture the long way?
Thanks,
Dan C.
Well now that the examns are over (and im finaly sober again
) I think ill just dump how to make some nice Dev-C++ .a lib from the dll's here:
pexports name.dll >name.def
dlltool -dname.def -Dname.dll -llibname.a -k
[edit]
offcourse you should substitute 'name' in the above with the actual name - and once you have the .a file just follow my previous instructions...
[/edit]
pexports is not included with the mingW compiler but a search of the net should give a few hits ( I used version 0.43) or else you can grab the files from my site.
I've also included a make file that you can just drop amongst the dll's and then do a 'make' to have it automate the above process. (I claims to also be able to convert directly from .lib to .a - but I am missing a tool called 'reimp', so I've never checked)
@AP: DevIL is released under Lesser GNU - so if link staticly (in odrer to avoid the dll's) you have to make the scource publicly avalible... or at least that is how I read the license agreement..
/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''t use it...
[edited by - guppy on June 25, 2002 4:19:08 AM]

pexports name.dll >name.def
dlltool -dname.def -Dname.dll -llibname.a -k
[edit]
offcourse you should substitute 'name' in the above with the actual name - and once you have the .a file just follow my previous instructions...
[/edit]
pexports is not included with the mingW compiler but a search of the net should give a few hits ( I used version 0.43) or else you can grab the files from my site.
I've also included a make file that you can just drop amongst the dll's and then do a 'make' to have it automate the above process. (I claims to also be able to convert directly from .lib to .a - but I am missing a tool called 'reimp', so I've never checked)
@AP: DevIL is released under Lesser GNU - so if link staticly (in odrer to avoid the dll's) you have to make the scource publicly avalible... or at least that is how I read the license agreement..
/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''t use it...
[edited by - guppy on June 25, 2002 4:19:08 AM]
/Please excuse my bad spelling - My native language is binary not english|Visit meTake my advice - I don''t use it...
That AP post was my post. I''ve been having some trouble the past few days with posting, so I tried to do it anonymously and it worked.
Guppy: Thanks for uploading the convertor. So, as I understand it, we can make .a library files if we have the .dll? That is pretty cool, and will probably be extremely useful down the road.
Is there anyway to combine the three .dll''s into one? I know about the license, but I''d hate to have to include three .dll''s for one library. And how can I tell my program where to find the dll''s? Right now they are in the same directory as the program, but I''d like to put them in a subfolder.
Guppy: Thanks for uploading the convertor. So, as I understand it, we can make .a library files if we have the .dll? That is pretty cool, and will probably be extremely useful down the road.
Is there anyway to combine the three .dll''s into one? I know about the license, but I''d hate to have to include three .dll''s for one library. And how can I tell my program where to find the dll''s? Right now they are in the same directory as the program, but I''d like to put them in a subfolder.
Well, I solved my problem, and my app works perfectly. Apparently, including windows.h and using std::list do NOT work together in Dev-C++...
Why this is so is beyond me.
"Don''t be afraid to dream, for out of such fragile things come miracles."
Why this is so is beyond me.
"Don''t be afraid to dream, for out of such fragile things come miracles."
Dan C., your code looks great. Just make sure to call ilDeleteImages sometime. =] Yes, pretty much everything besides plain ilutGLTexImage calls things like glTexParameteri and glPixelStorei. This seems to fit well with many applications, though for some specialized ones, I would guess that it would be more of a hindrance.
Denton Woods, aka DooMWiz
Developer''s Image Library (DevIL) @ http://www.imagelib.org .
Denton Woods, aka DooMWiz
Developer''s Image Library (DevIL) @ http://www.imagelib.org .
Denton Woods, aka DooMWizDeveloper's Image Library (DevIL) @ http://www.imagelib.org .
Thanks for looking at my code, Denton. I''m not sure if you scrolled down or not, but I do call ilDeleteImages(). Here is the everything after the ilutGLTexImage call:
ILenum Error; while ((Error = ilGetError()) != IL_NO_ERROR) { EruLog.Output(" %d: %s/n", Error, iluErrorString(Error)); } if(ilGetData() != NULL) { ilDeleteImages(1, &Texs[0]); EruLog.Output(" DevIL image deleted successfully"); }
Hi!
I used your instructions and created libMatrix.a from Matrix.dll (comes with Animation Master 95 SDK) to use with gcc in windows.
I got DevIl working well with your instructions, but this doesnt
This is gcc output:
Weird for me is that I can't see any imp_xxxxx there (should there be for imported libs?).
Weird thing is also that for example devil.def looks this:
LIBRARY DevIL.dll
EXPORTS
_ialloc@4 DATA
_ifree@4 DATA
iBindImageTemp DATA
iConvertImage DATA
iConvertPal DATA
iCopyPal DATA
...
BUT Matrix.def looks like this:
LIBRARY Matrix.dll
EXPORTS
??0Matrix33@@QAE@ABV0@@Z
??0Matrix33@@QAE@ABVQuaternion@@@Z
??0Matrix33@@QAE@ABVVector@@00@Z
??0Matrix33@@QAE@M@Z
??0Matrix33@@QAE@XZ
??0Matrix34@@QAE@ABV0@@Z
??0Matrix34@@QAE@ABVQuaternion@@@Z
??0Matrix34@@QAE@ABVRotateEuler@@@Z
Looks weird to me.
What the problem might be here?
Thanks.
[edited by - stefu on July 6, 2002 11:40:46 AM]
I used your instructions and created libMatrix.a from Matrix.dll (comes with Animation Master 95 SDK) to use with gcc in windows.
I got DevIl working well with your instructions, but this doesnt

This is gcc output:
model.o(.text+0x2b3a):model.cpp: undefined reference to `Matrix34::operator*(Matrix34 const &) const'model.o(.text+0x3389):model.cpp: undefined reference to `Rotate2V(Vector const &, Vector const &)'model.o(.text+0x342c):model.cpp: undefined reference to `Matrix34::operator*(Matrix34 const &) const'model.o(.text+0x34f7):model.cpp: undefined reference to `Matrix33::operator*(Matrix33 const &) const'model.o(.text+0x3541):model.cpp: undefined reference to `Matrix34::Matrix34(Quaternion const &)'model.o(.text+0x3557):model.cpp: undefined reference to `MatrixTimesScale(Matrix34 &, Vector const &)'model.o(.text+0x3581):model.cpp: undefined reference to `Matrix34::operator*(Matrix34 const &) const'model.o(.text+0x3595):model.cpp: undefined reference to `Matrix34::operator*(Matrix34 const &) const'model.o(.text+0x3605):model.cpp: undefined reference to `Matrix33::operator*(Matrix33 const &) const'model.o(.text$__aml__8Matrix34RC8Matrix34+0x19):model.cpp: undefined reference to `Matrix34::operator*(Matrix34 const &) const'
Weird for me is that I can't see any imp_xxxxx there (should there be for imported libs?).
Weird thing is also that for example devil.def looks this:
LIBRARY DevIL.dll
EXPORTS
_ialloc@4 DATA
_ifree@4 DATA
iBindImageTemp DATA
iConvertImage DATA
iConvertPal DATA
iCopyPal DATA
...
BUT Matrix.def looks like this:
LIBRARY Matrix.dll
EXPORTS
??0Matrix33@@QAE@ABV0@@Z
??0Matrix33@@QAE@ABVQuaternion@@@Z
??0Matrix33@@QAE@ABVVector@@00@Z
??0Matrix33@@QAE@M@Z
??0Matrix33@@QAE@XZ
??0Matrix34@@QAE@ABV0@@Z
??0Matrix34@@QAE@ABVQuaternion@@@Z
??0Matrix34@@QAE@ABVRotateEuler@@@Z
Looks weird to me.
What the problem might be here?
Thanks.
[edited by - stefu on July 6, 2002 11:40:46 AM]
hrmm... did you remember to link to the dll? ie: -lMatrix ?
thats the only thing I can think of...
/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''''t use it...
thats the only thing I can think of...
/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''''t use it...
/Please excuse my bad spelling - My native language is binary not english|Visit meTake my advice - I don''t use it...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement