Advertisement

Adding Texture

Started by September 05, 2002 02:24 PM
5 comments, last by The_Wraith 22 years, 5 months ago
Hey, im just another stuck newbie ... im on tutorial 6 of the NeHe ones, and thats where it gets a bit dodgy... im using Dev-C++ ive got all the other openGL tutorials to work, ive added all the "#include <stdlib.h>" and the needed todownloaded the glaux.dll, it compiles but after i choose full screen or windowed, it says Error: Initialization Failed. in an alert box, just wondering if anyone knows what to do? Cheers, The_Wraith - Nothing More, Nothing Less
The_Wraith - Nothing More, Nothing Less
go through your source code and search the line:

MessageBox( NULL,"Initialization failed.", ........);

Then you look when your code arrives this line and you know where the error is :/

i think thats the reason why such messages are included in source codes
Advertisement
ah btw. i think your program just cant find your texture...
Its really odd... says it wont work, but if i go into the folder which the project is compiled to and THEN run the .exe file.... it works... :| something to do with dev
The_Wraith - Nothing More, Nothing Less
nope it isnt.. in your source code you say somthing like LoadTexture( PATH, blablabla ). if you compile it and try to run it, it may not work because your sourcecode doesnt find the image or in fact not the path. could it be that the path / the texture is in the same directory where your compiled exe will be saved? in vc++ its an directory called debug or release. but if you just execute your written sourcecode from vc++ itself the current directory you are in is the directory where all your sourcecodes are stored... understand? then you close your program and change to the path where your exe now is in. you again run your program but now your path is another as the one when you ran it with your dev c. hope you can understand :/ my english can be very bad :D
try to put the textures (or the folder with the textures) to the project-folder, not the debug/release dir, then it works
Advertisement
Something like this happened to me too, I think. All u have to do is move the exe from the dir where your complier put it to the dir where u have youre textures/data folder.

This topic is closed to new replies.

Advertisement