NEWBIE: load quake3 level texture problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
sparkes

NEWBIE: load quake3 level texture problem

Post by sparkes »

Hi I am running linux and using irrlicht 0.7. The code for the 02 example complies and runs using the example makefile but when I attempt to use this as the basis for my own first program I get errors about the textures not loading.

Code: Select all

Irrlicht Engine version 0.7
Linux
Creating X window...
OpenGL Renderer.
OpenGL driver version is 1.2 or better.
Extentions disabled.
Loaded texture: #DefaultFont
Could not find texture in Q3 .bsp: textures/common/caulk
JPEG parameter struct mismatch: library thinks size is 464, caller expects 428
am I missing something silly?

when running the example the same texture is not loaded but this is not an error just a warning.

Code: Select all

Irrlicht Engine version 0.7
Linux
Creating X window...
OpenGL Renderer.
OpenGL driver version is 1.2 or better.
Extentions disabled.
Loaded texture: #DefaultFont
Could not find texture in Q3 .bsp: textures/common/caulk
apologies for the long post but here is the code I am using ;-)

Code: Select all


#include <irrlicht.h>
using namespace irr;
using namespace video;
using namespace core;
using namespace scene;
using namespace gui;
using namespace io;


int main()
{
	IrrlichtDevice *device =
		createDevice(EDT_OPENGL, dimension2d<s32>(640, 480),true);

	IVideoDriver* driver = device->getVideoDriver();
	ISceneManager* smgr = device->getSceneManager();

	device->getFileSystem()->addZipFileArchive("/home/sparkes/irrlicht/irrlicht-0.7/media/map-20kdm2.pk3");

	IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
	ISceneNode* node = 0;
	
	if (mesh)
		node = smgr->addOctTreeSceneNode(mesh->getMesh(0));

	if (node)
		node->setPosition(vector3df(-1300,-144,-1249));

	smgr->addCameraSceneNodeFPS();

	device->getCursorControl()->setVisible(false);

	while(device->run())
	{
		driver->beginScene(true, true, video::SColor(0,200,200,200));
		smgr->drawAll();
		driver->endScene();

	}

	device->drop();
	
	return 0;
}
Thanks in advance
WalterWzK

Post by WalterWzK »

Well I guess the porting of the 'jpeg part of the irrlicht engine' went wrong, because your code is seems right to me.

Keep in mind that its also possible that you've extracted the *.bsp by using the getMesh() command, but the textures are not loaded into the memory so that the map is wondering where his textures went..

I would extract the stuff within the *.pk3, wich is simple with winzip... just rename it to *.pk3.zip, open it, extract it, and rename it back. Than put all the files into the project folder... but dont restructure the folders because the map couldn't find the textures aswel than. And just load the *.bsp to see what happens.

It is strange because within Win32 the *.bsp file can access other files within the compressed *.pk3

Good luck and always post the answer if you found one :o)
sparkes
Posts: 3
Joined: Tue Jan 11, 2005 2:04 pm
Location: Wolverhampton UK
Contact:

Post by sparkes »

SOLVED ;-)

Not only do you have to include the path to the libs (obviously I was doing this) but you also have to link them in the correct order (not sure why this is)

At first I was linking against the local libjpeg

http://irrlicht.sourceforge.net/phpBB2/ ... 9339#29339
Munku
Posts: 66
Joined: Tue Nov 30, 2004 4:04 pm

That would make sense

Post by Munku »

Having the libraries in a correct makes a little sense, however, in a sense it does not. I've never seen that problem with Irrlicht on Windows, but then again...

Glad you got it :)
Umm, don't look at me that way. I'M not the dead one here.

--The One True Marshmellow
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Almost a sidenote: don't worry about the caulk texture not loading -- it's normal. Caulk is a special texture used in map making. It should never actually be seen.
Post Reply