Game Development Community

TGE -> TGEA 1.8.1: Merge Questions

by Michael K. · in Torque Game Engine Advanced · 03/15/2009 (7:54 am) · 4 replies

I am currently merging a tge project to tgea 1.8.1, but now i have some questions.
How would the following be called/referenced in TGEA 1.8.1?
.....................................................
TextureHandle blahTexture;
TextureHandle(WHATEVER, BitmapTexture);

dglSetBitmapModulation(.....);
dglClearBitmapModulation();
dglDrawText(.....);
dglDrawBitmap(.....);
dglDrawBitmapStretch(.....);
dglDrawRectFill(.....);

glEnable(GL_SCISSOR_TEST);
glDisable(GL_SCISSOR_TEST);
glScissor(sx, sy, mScissorExtent.x, mScissorExtent.y);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(....);
glBindTexture(GL_TEXTURE_2D, mTextureHandle.getGLName() );
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2i(offset.x, offset.y);
glTranslated(....);
glScalef(.....);
glPushMatrix();
glPopMatrix();
glPushMatrix();
glRotatef(....);
glEnd();
.....................................................

Where has "gui/core/guiTSControl.h" gone to?

I know "Player::renderImage" has been split up, but where has this part gone to: "if (mShapeInstance && renderPlayer && DetailManager::selectCurrentDetail(mShapeInstance)) {
.....}" ?

Thank you for any help!

#1
03/15/2009 (8:07 am)
Michael, some of that information can be found here: www.garagegames.com/community/forums/viewthread/85059
What torque is doing now is transforming from gl (openGl) to a GFX device which makes writing code for both gl and dx easier. I don't pretend to understand the code, just some of what they are doing.

#2
03/16/2009 (12:24 am)
Thanks Mike!
#3
03/16/2009 (12:56 am)
So far i could find references for the following:

TextureHandle => GFXTexHandle
dglSetBitmapModulation(.....); => GFX->getDrawUtil()->setBitmapModulation(..);
dglClearBitmapModulation(); => GFX->getDrawUtil()->clearBitmapModulation();
dglDrawText(.....); => GFX->getDrawUtil()->DrawText(..);
dglDrawBitmap(.....); => GFX->getDrawUtil()->DrawBitmap(..);
dglDrawBitmapStretch(.....); => GFX->getDrawUtil()->DrawBitmapStretch(..); ****
dglDrawRectFill(.....); => GFX->getDrawUtil()->DrawRectFill(..); ****

glEnable(GL_BLEND); => GFX->setZEnable(true);

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); =>
GFX->setAlphaBlendEnable(true);
GFX->setSrcBlend(GFXBlendSrcAlpha);
GFX->setDestBlend(GFXBlendInvSrcAlpha);

glPopMatrix(); => GFX->popWorldMatrix();
glPushMatrix(); => GFX->pushWorldMatrix(); ****

**** = I'm guessing here.

Can anyone help with the rest?

Thanks!
#4
03/16/2009 (1:43 am)
See if this helps you:

TGEA 1.8.1 Gotchas

Make sure you check out the section about render delegates and stateblocks.

Maybe this thread will also be of some use:
-> 1.8.1 migration info collection

Try comparing render functions in 1.7.1 and 1.8.1, and it will be very easy to port rendering stuff once you get the hang of it.