-> 1.8.1 migration info collection
by Konrad Kiss · in Torque Game Engine Advanced · 02/13/2009 (9:11 am) · 17 replies
About the author
http://about.me/konrad.kiss
#2
File open modes were changed, ie. to write:
readPNG, writePNG, and the rest of the read/write bitmap functions have changed...
02/14/2009 (8:23 am)
TGEA 1.7.1 -> TGEA 1.8.1File open modes were changed, ie. to write:
FileStream::Write -> Torque::FS::File::Write
readPNG, writePNG, and the rest of the read/write bitmap functions have changed...
bmp.writePNG(fStream);
->
bmp.writeBitmap("png", fStream, U32_MAX);
#3
Referencing ResourceManager has changed, for example:
02/14/2009 (10:17 am)
TGEA 1.7.1 -> TGEA 1.8.1Referencing ResourceManager has changed, for example:
ResourceManager->openFileForWrite() -> gResourceManager->openFileForWrite()
#4
I found these while porting the digital speedometer hud over.
Edit: added engine type
02/14/2009 (4:03 pm)
Bitmap controls and vehicles tge 1.5.1 --> Tgea 1.7.1 works in 1.8.1 as well.gui/guiControl.h is now gui/controls/guiBitmapCtrl.h and you'll need gfx/primBuilder.h depending on what you are making. game/gameConnection.h is in T3D/gameConnection.h game/vehicles/vehicle.h is in T3D/vehicles/vehicle.h
TextureHandle mTextureHandle; is now GFXTexHandle mTextureObject;
mTextureHandle is now mTextureObject
GameConnection::getServerConnection(); is now GameConnection::getConnectionToServer();
dglSetClipRect(updateRect); is now GFX->setClipRect(updateRect);
dglClearBitmapModulation(); is now GFX->getDrawUtil()->clearBitmapModulation();
dglDrawBitmapStretchSR(mTextureHandle, destRect, stretchRect); is now
GFX->getDrawUtil()->drawBitmapStretchSR(mTextureObject, destRect, stretchRect);I found these while porting the digital speedometer hud over.
Edit: added engine type
#5
Also think you have a typo with:
02/15/2009 (1:32 am)
@Mike - I think Konrad intended this to be migration info for porting from TGEA 1.7.1 to TGEA 1.8.1 not for details from a TGE port, although a seperate thread for them would probably be useful.Also think you have a typo with:
gui/guiControl.h is now gui/controls/guiBitmapCtrl.h
#6
No typo. the controls folder is actually named controls.
02/15/2009 (7:28 am)
oops. If he'd like, I can delete my post and move it elsewhere.No typo. the controls folder is actually named controls.
#7
02/15/2009 (8:26 am)
I's ok with me, it's in a good place.. I've renamed the thread instead.
#8
02/15/2009 (8:53 am)
In that case, the right thing to do would be to indicate the origin engine version that you are talking about on each post.
#9
Novack, I added the engine types to my first post.
02/15/2009 (9:23 am)
Thanks Konrad. This thread is a great resource. Novack, I added the engine types to my first post.
#10
02/15/2009 (10:25 am)
@Novack: Right, I edited my posts.
#11
ShapeBaseData has member variable name changes
Box3F bounding coordinate name changes
nameDictionary is now private in simSet.h
mGroup is now private in simGroup.h, use getGroup()
02/16/2009 (1:43 am)
TGEA 1.7.1 -> TGEA 1.8.1ShapeBaseData has member variable name changes
shape -> mShapeNote: ShapeBaseImageData still has its shape member variable name unchanged.
Box3F bounding coordinate name changes
mObjBox.min -> mObjBox.minExtents mObjBox.max -> mObjBox.maxExtents
nameDictionary is now private in simSet.h
mGroup is now private in simGroup.h, use getGroup()
#13
does anyone know what the TGEA of "glNormal3fv" is??
03/29/2009 (5:04 am)
tge -> tgea 1.7.xglDisable(GL_LIGHTING); = GFX->setLightingEnable(false); glDisable(GL_DEPTH_TEST); = GFX->setZWriteEnable(false); glPushMatrix(); = GFX->pushWorldMatrix(); dglMultMatrix(&getRenderTransform()); = GFX->multWorld(getRenderTransform()); glColor3f(1, 0, 0); = PrimBuild::color3f(1, 0, 0); glLineWidth(2.f); = PrimBuild::begin(GFXLineList, 2); glBegin(GL_POINTS); = GFX->setVertexBuffer( mDots );/PrimBuild::begin( GFXPointList, mDots->mNumVerts); glVertex3fv = PrimBuild::vertex3fv glEnable(GL_LIGHTING); = GFX->setLightingEnable(true); glEnable(GL_DEPTH_TEST); = GFX->setZWriteEnable(true); glMatrixMode(GL_PROJECTION); = MatrixF projection = GFX->getProjectionMatrix(); dglGetViewport(&viewport); = MatrixF view = GFX->getViewMatrix(); dglMultMatrix(&getTransform()); = GFX->multWorld(getTransform()); glTexCoord2f = PrimBuild::texCoord2f
does anyone know what the TGEA of "glNormal3fv" is??
#14
PrimBuilder doesn't use a vertex type with normals, hence no current support for dynamic normals. If you want to add it change PrimBuilder to use GFXVertexPCNT instead of GFXVertexPCT and add a normal3f that pokes in your normal into the vertex structure.
03/29/2009 (7:42 am)
@deepscratch: PrimBuilder doesn't use a vertex type with normals, hence no current support for dynamic normals. If you want to add it change PrimBuilder to use GFXVertexPCNT instead of GFXVertexPCT and add a normal3f that pokes in your normal into the vertex structure.
#15
Having some trouble with the gl calls.
It's really small and super useful for model designers.
04/03/2009 (12:43 pm)
Hate to ask for TGEA 1.8.1 porting help but anyone want to give a go at: http://www.garagegames.com/community/blogs/view/16655 ?Having some trouble with the gl calls.
It's really small and super useful for model designers.
#16
just using the list I posted here, I came up with this, not tested(I'm not near my compiling pc right now, but might work, dunno. BTW, this'll be for 1.7.1, so check what 1.8.1 wants....
04/03/2009 (2:06 pm)
@BrokeAss Games,just using the list I posted here, I came up with this, not tested(I'm not near my compiling pc right now, but might work, dunno. BTW, this'll be for 1.7.1, so check what 1.8.1 wants....
if (smRenderBones) {
GFX->setLightingEnable(false);
GFX->setZWriteEnable(false);
PrimBuild::begin(GFXLineList, 2);
PrimBuild::begin( GFXPointList, 6.f);
for (U32 i=0;i<mShape->nodes.size();i++)
renderBone(i);
PrimBuild::begin( GFXPointList, .1f);
PrimBuild::begin(GFXLineList, 1);
GFX->setZWriteEnable(true);
GFX->setLightingEnable(true);
}
void TSShapeInstance::renderBone(U32 idx)
{
Point3F pos;
pos = mNodeTransforms[idx].getPosition();
// Draw point
GFX->setVertexBuffer( mDots );
PrimBuild::begin( GFXPointList, mDots->mNumVerts);
PrimBuild::color3f(1, 0, 0); // red for the dots
PrimBuild::vertex3f(pos.x, pos.y, pos.z)
PrimBuild::End();
// And now the line to the parent
if (mShape->nodes[idx].parentIndex != -1) {
PrimBuild::begin(GFXLineList);
PrimBuild::color3f(0.0,1.0,0.0); // green for the lines
PrimBuild::vertex3f(pos.x, pos.y, pos.z);
pos = mNodeTransforms[mShape->nodes[idx].parentIndex].getPosition();
PrimBuild::vertex3f(pos.x, pos.y, pos.z);
PrimBuild::End();
}
}
Associate Konrad Kiss
Bitgap Games
Some files and/or contents were moved:
In MaterialList, mMaterialNames is now protected
ResourceManager has changed. To load a resource:
GFXTexHandle creator has a new desc parameter for debugging, so for materials:
GFXTexHandle tex(texPath, &GFXDefaultStaticDiffuseProfile); -> GFXTexHandle tex = GFXTexHandle(texPath, &GFXDefaultStaticDiffuseProfile, avar("%s() - NA (line %d)", __FUNCTION__, __LINE__));Creating a new material instance is now a bit different:
Hope this helps someone. If you find something useful, please post it here, so we all can port resources faster. Thanks.