PDA

View Full Version : .x-files



Gordon Freeman
06-28-2006, 05:53 PM
How to load .x-files into OpenGL? DirectX can do it, but OpenGL doesn't load .x-files:( Maybe we could write something that allowed us to load x-meshes?

Brolingstanz
06-28-2006, 09:07 PM
OpenGL doesn't deal with file formats.

Anyway, you don't load a file with a graphics API. You load the file in your application, then you load the vertex data using the graphics API. Direct3D is no different, it just has the D3DX utility library for dealing with the file stuff (which by the way isn't very difficult to do yourself). Why would anyone want to use the x-format anyway? Never used it myself, don't intend to either.

P.S. Shouldn't you be starting the rotors?

derodo
06-29-2006, 04:08 AM
Hi there,

I've made a .x loader myself, if you want, send me an email and I'll be pleased to send you my code. It supports almost 99% of the .x features, (multiple meshes, reference matrix, bone system, etc.).

I'ts designed to work with my onw engine, but if you're familiar with 3D coding, you should have no problem to adapt it to your own needs (I guess)

Gordon Freeman
06-30-2006, 03:47 AM
2derodo
Cool! Could you send your code me, plz
coolcoder@narod.ru

Gordon Freeman
06-30-2006, 03:53 AM
Originally posted by Leghorn:
OpenGL doesn't deal with file formats.

Anyway, you don't load a file with a graphics API. You load the file in your application, then you load the vertex data using the graphics API. Direct3D is no different, it just has the D3DX utility library for dealing with the file stuff (which by the way isn't very difficult to do yourself). Why would anyone want to use the x-format anyway? Never used it myself, don't intend to either.

P.S. Shouldn't you be starting the rotors? And what did you use instead of .x-files? Is there something like .x-files in OpenGL?

Trahern
06-30-2006, 08:21 AM
He already told you that OpenGL does not deal with any file formats. So there is no .x file in OpenGL.

Everyone can use whatever he wants. It's quite common that people write their own file format which suits their needs.

Gordon Freeman
07-02-2006, 10:46 AM
Thanks to everybody, derodo sent me his losder, I'm now going to use it.