Game Development Community

GFXD3DDevice::setActiveRenderSurface - Cannot have an active ren

by Thomas \"Man of Ice\" Lund · in Torque Game Engine Advanced · 09/08/2006 (3:18 pm) · 5 replies

I've been trying to import my first terrain into TSE MS4, and I keep hitting my head at this one.

Been trying to read up on various threads and in the process of making a little "howto for dummies" .

But it requires me to even being able to load the terrain in the first place....

I'm taking an almost default l3dt setting 1025x1025 RAW + 1024x1024 terrain texture (90 degree rotated and then mirrored) through the following scripts:

atlasOldGenerateChunkFileFromRaw16("game/data/terrains/terrain/heightmap16bit.raw", 1024, 10.0, 1.0/64.0, "game/data/terrains/geometry.chu", 2.0, 3);
importOldAtlasCHU("game/data/terrains/geometry.chu", "game/data/terrains/geometry.atlas");
atlasGenerateTextureTOCFromLargeJPEG("game/data/terrains/terrain/textureCWM.jpg", 3, "game/data/terrains/texture.atlas");
atlasGenerateUniqueTerrain("game/data/terrains/airace.atlas", "game/data/terrains/geometry.atlas", "game/data/terrains/texture.atlas");

(Kindly donated by Erik Madison and reworked to fit my settings)

No matter what I try as variables I get this in debug build:
Fatal: (\DevArea\repositories\airace\Tse-ms4\engine\gfx\D3d\gfxD3DDevice.cpp @ 842) GFXD3DDevice::setActiveRenderSurface - Cannot have an active render target bound to a texture sampler!

It works sometimes in release build and sometimes I get a crash.

Any clues?

#1
09/08/2006 (3:59 pm)
Hey Thomas. Maybe my bug is related.
#2
09/09/2006 (12:48 am)
Could be! I'll try the fix suggested. Thanks

Never having tried the Atlas terrain art pipeline before, I dont have any reference to how its supposed to be or work. I might have forgotten to put in some needed value or similar.

A little dummies guide is in place, and I'll do one once I have a working terrain in.
#3
09/09/2006 (11:19 pm)
Ben G has some pretty straightforward Atlas pipeline docs up on TDN--TSE general section, then Atlas2 Overview iirc.
#4
09/10/2006 (6:03 am)
With all respect to the documentation on TDN, it was exactly that referenced article that made me want to do a "dummy howto".

It might explain how things work for someone who knows whats going on, but its not an article for anyone who has no clue (like me) :-)
#5
09/10/2006 (6:24 am)
BTW Tom - your bugfix also fixed my release crashes! But debug still fails with the above message....

Time to test drive it a bit more before writing something