Game Development Community

AudioEmitter.cc editor texture bug

by Todd "zaz" Koeckeritz · in Torque Game Engine · 07/01/2004 (12:23 pm) · 4 replies

Not a show stopper as it only affects you during the editing of missions, but the constant console messages are a pain when you're editing/debugging stuff in the mission editor if you're near an audioEmitter.

The code from engine/game/audioEmitter.cc in HEAD:
void AudioEmitter::renderObject(SceneState*, SceneRenderImage*)
{
   TextureHandle texture("special/BlueImpact", BitmapTexture, false);
   if(bool(texture))
   {
      glEnable(GL_TEXTURE_2D);
      glBindTexture(GL_TEXTURE_2D, texture.getGLName());
   }

Since no texture "special/BlueImpact" exists and since this method seems to be called often (every frame?), you have a constant stream of "can't load special/BlueImpact" messages in the console. The resource manager is used to load this texture so it appears to me that it would be necessary to have a "special" mod available to resolve the missing texture.

The trivial fix I've applied locally was to change "special/BlueImpact" to "common/editor/textures/audioEmitter" and put an audioEmitter.png file in common/editor/textures. I'm not convinced this is a complete fix for this as I'd think it doesn't make sense to get the texture every frame, if that is indeed when this method is called, even if it is coming from the resource manager. Also, I know there was some work someone started on the audioEmitters that hasn't made it into HEAD yet.

So, if someone who knows the internal workings of the engine better than I do, has a better fix, it'd be nice to see a patch worked up and get a permanent fix for this.

EDIT: Forgot to put full path in for "common/editor/textures/audioEmitter"

#1
07/01/2004 (9:33 pm)
Hmmm... This is an annoying bit of a bug.

I will check my inbox for pending audio emitter tasks.

May also have an intern look at some of the various "annoyances" in Torque like the connection stuff and the missing "utility" art and so forth.

Thanks for the nice writeup about it!
#2
07/02/2004 (3:18 am)
The pending work I was referring to I saw in this post.

Np, glad to help.
#3
08/04/2004 (3:19 pm)
Great fix .... I have tried just to make a
engine\special\BlueImpact\audioEmitter.png

(a really cheap fix ... but it don't seem to work ) - have an idea ? I still get the good one by frame


Could not locate texture: special/BlueImpact
#4
08/06/2004 (1:29 pm)
This problem was fixed in HEAD not too long after Ben's post. Not only was the missing texture problem solved, but a lot of new visualization was added to the audio emitters. So, pull a recent HEAD version from CVS and use that.

The reason I put the texture where I did in my work around was because of the naming of the texture and the way the textures are loaded.

If you want to try to put a texture in place that satisfies the original reference, you'll have to create a mod called special in the root directory for the game and put the texture in that. For example, working from the engine/example directory, add the BlueImpact.png file. Then when you run your game and want to use the editor, run it with "torqueDemo -mod special" in the engine/example directory.

Since I didn't always want to run with the "special" mod whenever I edited, I moved and renamed the texture audioEmitter was looking for in my temporary fix.