Brandon![]() Member Posts: 594 From: Kansas City, Mo, USA Registered: 02-02-2004 |
I started working on a DX9 game engine a few months ago, but set the project aside. Well my reason for the post is cause I'm trying to decide if I should re-design the engine to be compatible with both DX and OpenGL. The thing that scares me about OpenGL is that I'd have to develop everything else that's not related to 3D graphics from scratch!!! Anyway. I'm trying to find as many tutorials on DX9 as I can, I'm a bit confused in the render pipeline... the .X 3D models load correctly, but the problem is that I haven't got them animating yet. And another is the texturing, if I try to create a cube for instance and then texture it, I get probs! Actually the program crashes :( I guess I'll post a snippet here of my render pipeline:
And this is the DrawEnt Function:
The problem is most likely somewhere in the DrawEnt() function. Any type of help would be greatly appreciated :)
[This message has been edited by brandon (edited May 09, 2005).] |
||
Brandon![]() Member Posts: 594 From: Kansas City, Mo, USA Registered: 02-02-2004 |
Okay, the problem isn't in either of those functions. But I've started over completly and am now working on an engine that will start off supporting OpenGL, then I'll add the DX9 support after I get the OpenGL side of things going good,... mainly after I get models loading and animating... I'm also considering using a custom model format as well. This might sound dumb, but should I base it off of quads or tri's? I think that .obj uses both... but I'm not sure how using one or the other is better... anyways, I'm working on the mesh\entity class today... so I hope I'll have it where you can at least create your custom meshes using the function calls before the day is done... k, enough babbling... now.. back to work
[This message has been edited by brandon (edited May 10, 2005).] |
||
nfektious Member Posts: 408 From: Registered: 10-25-2002 |
cool job brandon. i'm excited to see this project grow and check your progress. my opinion on the model issue: it really depends on how much data you want to pack...tris are more of the standard - and more likely to provide you with content to use (freeware models, etc) and a community base for your engine. quads of course offer more detail and more realism - and thus can become complex fast. if you want decent rendering and speed in processing, tris still offer enough bang for the buck. like i said, just my opinion. |
||
Brandon![]() Member Posts: 594 From: Kansas City, Mo, USA Registered: 02-02-2004 |
Thx! Yeah, I think I'll go with the tris instead. I've gotten textures loading, but still using the basic hardcoded style of rendering. I'm currently devising a set of classes for my mesh\entity system. I think the part that will give me the most problems right now is thinking on how I'll use the display lists when loading the meshes. Does anyone know of any alternative to using display lists? But one that is just as fast or faster? It's cool if not, I might use display lists anyway. I guess I was just wandering if it was the normal way of doing it. Okay, as for my mesh class I have some idea as to what I want to do. Here are some what I think that I'll need for basic mesh stuff (NOTE: this isn't final code just an overview, I'll probably add this into structs or classes once I get it all planned out right) :
------------------ |
||
HeardTheWord![]() Member Posts: 224 From: Des Moines, IA Registered: 08-16-2004 |
I wish I would take the time to do some of this stuff as well! I do know a bit about OpenGL though... Triangle strips would be the fastest way to load and render a model. They also take up less hard drive space. Hope this helps you and Good Luck! [This message has been edited by HeardTheWord (edited May 11, 2005).] |
||
nfektious Member Posts: 408 From: Registered: 10-25-2002 |
Brandon - there are several engines out there based on OpenGL that include model/render code that might serve as a reference resource for you. | ||
Brandon![]() Member Posts: 594 From: Kansas City, Mo, USA Registered: 02-02-2004 |
Cool, I'll look into triangle strips and I could look at the Irrlicht source code for the OpenGL rendering then, just to have some type of understanding as to how it's done correctly. Thanks for the tips guys, it's much appreciated! I haven't had time to do much within the past 24 hours! ------------------ |