Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / FBX SDK with OpenGL
  RSS 2.0 ATOM  

FBX SDK with OpenGL
Rate this thread
 
57139
 
Permlink of this thread  
avatar
  • spooderw
  • Posted: 20 June 2011 09:19 AM
  • Total Posts: 3
  • Joined: 20 June 2011 04:06 PM

Hey, I’m an indie game designer, working on my engine.
I had a model loader/renderer based on .obj, but I decided to move to a more future proof format.
My problem is, that I can load the vertex data fine and render the model, but I cannot seem to figure out the weird texture configuration for the SDK.

So basically I need to know, how to get the texture?
Is it embedded and automatically loaded or I need to use my own image loader?
If it is embedded then how do I convert to a GLuint so I can render it.
If it is not, how can I get the filename?

Do not point me at those sample programs, there is so much code I do not need in there, I cannot find the stuff I do need.



Replies: 0
avatar

Howdy,

Well, I’m sorry but I’m going to point you to the “ViewScene” example project, in particular the file “InitScene.cxx” and the functions “LoadSupportedTextures()”, “LoadSupportedTexturesRecursive()” and “LoadTexture()”.

That’s where I got all the info needed to load materials and textures.

Adios,
Cactus Dan



Replies: 2
/img/forum/dark/default_avatar.png

thanks for the response. I have heard mention of that as well, but there is no initScene.cxx in my viewscene example.

Author: spooderw

Replied: 20 June 2011 10:15 AM  
/img/forum/dark/default_avatar.png

*Accidental double comment*

Author: spooderw

Replied: 20 June 2011 10:18 AM  
avatar

Howdy,

Oh, sorry. What FBX SDK are you using?

Edit:
OK, I see that the ViewScene example was the same up until FBX SDK 2012. In 2012 take a look at the MaterialCache class in the file SceneCache.cxx. Then in the DrawScene.cxx file, look at the DrawMesh() function.

Adios,
Cactus Dan



Replies: 0