Porting glBindTexture parameters from TGE to TGEA
by Ingo Seidel · in Torque Game Engine Advanced · 03/27/2009 (3:11 am) · 2 replies
Hi,
I am currently trying to port the billboard and text resource from TGE to TGEA. The original code uses a "TextureHandle" which I have ported to a "GFXTexHandle". I am now stuck at the code line
where nameTexture originally was a "TextureHandle" and I have ported it to a "GFXTexHandle". However, the "GFXTexHandle" does not have a "getGLName" function anymore (and I also did not find any other similar function). How can the appropriate parameter for the "glBindTexture" function be retrieved from a "GFXTexHandle"?
thanks & best regards
I am currently trying to port the billboard and text resource from TGE to TGEA. The original code uses a "TextureHandle" which I have ported to a "GFXTexHandle". I am now stuck at the code line
glBindTexture( GL_TEXTURE_2D, nameTexture.getGLName() );
where nameTexture originally was a "TextureHandle" and I have ported it to a "GFXTexHandle". However, the "GFXTexHandle" does not have a "getGLName" function anymore (and I also did not find any other similar function). How can the appropriate parameter for the "glBindTexture" function be retrieved from a "GFXTexHandle"?
thanks & best regards
#2
03/27/2009 (9:19 am)
Ah, ok, I didn't know of this documentation, surely will read through it now ...
Torque Owner Gerald Fishel
Development Ninja
But you're going about things wrong for TGEA. You don't want to call gl* functions directly, you want to use the GFX rendering system. To bind a texture with GFX you'll use a call like GFX->setTexture( 0, texHandle );
If you need more help please post in the private forum, and I'll be happy to help. Though I'd recommend first reading the "Render Management" section under GFX in the official TGEA docs to get an idea of what is going on.
Cheers