OpenIL and d3d8.h problem?

Started by
7 comments, last by Lurking 21 years, 9 months ago
i am working a a opengl problem and have desided to use OpenIL/DevIL for my texture class. Well my code keeps generating an error dealing w/ the d3d8.h file. I have even added that file to my project w/ no luck. If you could help me out that would be great. I have just started working w/ IL so i dont know much about it. thank you
- Lurking
Advertisement
the error details would be usefull if anyone is gonna help ya
Why would u be using D3D and OGL?
quote:Original post by HunterTKilla
Why would u be using D3D and OGL?


OIL != OGL

although, he does say " i am working a a opengl problem and have desided to use OpenIL/DevIL for my texture class."

I think he is a little confused.. but then again so are you.

Anyway. Can''t tell if you don''t give us the error, but is it perhaps the header files defining the same thing?


Do not meddle in the affairs of moderators, for they are subtle and quick to anger.ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Refrence | OGL v D3D | File Formats | Go FAQ yourself ]

Error message in compiler?

--------------------Configuration: Ren - Win32 Debug--------------------
Compiling...
CTexture.cpp
c:\projects\ren\ilut.h(221) : fatal error C1083: Cannot open include file: ''d3d8.h'': No such file or directory
CWindow.cpp
c:\projects\ren\ilut.h(221) : fatal error C1083: Cannot open include file: ''d3d8.h'': No such file or directory
Error executing cl.exe.

Ren.exe - 2 error(s), 0 warning(s)
- Lurking
I think i had the same problem as you, near the bottom of ilut.h there''s a block of includes and stuff in an

#ifdef ILUT_USE_DIRECTX8
#endif

thing, which includes some directx headers... although i wasn''t using directx at all, and never defining ILUT_USE_DIRECTX8, it was still including the directx stuff... i just commented out the whole block, and now it works fine...
Is your DX8 setup correct in that you''ve properly added the path to the SDK to your directories list - and moved it above the default DX5 path (adding header files to projects is generally useless; they''ll be found as dependencies)?

OpenIL/DevIL themselves may require certain setup (some libraries do) to correctly compile and located required resources; check their documents and see if there''s anything you need to do.
Thanks alot for your help and i figured it out. Another problem has found its way to me. So everything compiles and links but my program crashes when i run it. I noticed i didn''t make any calls to glTexImage2d(). well with using the OpenIL i cant figure out how to get the width and height values? Or is there a func in the library which i am leaving out? Thanks for all your help so far.

- Lurking
- Lurking
nevermind i am stupid. i fixed it!
- Lurking

This topic is closed to new replies.

Advertisement