Jump to content
  • Advertisement

Nahrix

Member
  • Content Count

    100
  • Joined

  • Last visited

Community Reputation

237 Neutral

About Nahrix

  • Rank
    Member

Personal Information

  • Interests
    DevOps
    Programming
  1. Thank you for the information, Hodgman.  Since this exercise is just a learning experience for me, and not intended to be productive, I've decided to investigate the optimized approach.   I have one other question about having a single vertex buffer.  If I were to add a model to the vertex buffer after having already initialized it with vertex data earlier on, the method that I see typically presented is: Create a new vertex array, with a mirror of the data already on the GPU, except sized larger to store the additional model vertex data Map the vertex buffer resource Copy the new vertex array over to the mapped resource My question is, is there a way to append the model's data to the end of the vertex buffer on the GPU, rather than copying over an entire block of redundant data, with the new model at the end?
  2. I've been using the tutorial site http://www.rastertek.com/ to learn DirectX 11 in C++.  I'm a little ways past a tutorial about rendering models to the screen.  The strategy in the tutorial is to create a class for the model, which includes an initialize function which creates a vertex buffer for the model.  I've since expanded and generalized the class to load any number of models, to be rendered to the screen later.   After doing some browsing on other sites related to DirectX, I found what seems to be a consensus opinion that everything should be put into a single vertex buffer, which is different than what I'm doing:  I'm creating a vertex buffer for every model, and in another function in my application, iterating through all the model objects, and calling their Render() function, which in turn call IASetVertexBuffers, IASetIndexBuffer, and IASetPrimitiveTopology, and then runs the shaders on each in turn.  This draws multiple models properly, but I don't want to continue doing it this way if it's wrong.   I have a few questions. Is it best practice to fit everything into a single vertex buffer? If so, how do I efficiently add / remove models to/from the vertex buffer in-between frames? Are there any tutorials out there that illustrate this method for DirectX 11 in C++? Because I'm so new to this, I might even be asking the wrong questions, so please correct any assumptions I might have accidentally made if that's the case.   Thanks!
  3. It could also be that you have to perform: UV.y = 1.0f - UV.y;.     L. Spiro   It's all good;  I just made a typo where I was assigning the same value over and over.  Everything works after modifying my code for triangle fans.  Thanks for all the help; you're the best!
  4. It works! .. sort of.   All the polygons show up now, but both the texture and normals are all out of whack.  It must be due to a combination of the right-hand to left-hand coordinate conversion, and the triangle-fan conversion I've done for the indices.   Edit:  Actually nevermind, it was just a simple typo in my code.  Everything works perfectly now!
  5. Thanks!  I'll go try to implement that right now :)
  6. I'm using this tutorial as a baseline for parsing obj files: http://www.rastertek.com/dx11tut08.html   This works fine if the obj file only contains faces with 3 vertices, but I'm trying to figure out how to make it work for obj files with faces that index 4 or more vertices.   My original thought was that, for faces with more than 3 vertices, (I'll simplify their description as f1, f2, f3, f4...) the first polygon would be built from f1, f2, f3, and the next from f2, f3, f4, etc.  When I parse and render that, however, there are lots of missing polygons in the mesh, so there's something I'm doing wrong.   My next thought was to read in f1, f2, f3 normally (backwards as f3, f2, f1, to convert the right-hand coordinate system to left-hand), and then read f2, f3, f4 in reverse (so in forwards order, f2, f3, f4, to convert coordinate systems again), and alternate that back and forth, since maybe the vertices were supposed to be read in like a stripe in Maya.  That didn't work either.   Anyways, I'm completely new to this, but I gave it my best shot before coming here for help.  Hopefully someone knows exactly how to handle this.
  7. Nahrix

    Sick

    I've been dead with a flu/fever recently, and have been spending countless hours asleep in various rooms of my house. My head is spinning and pounding, and it's been impossible to get any work done. I have, however, purchased a book on AI, and am attempting to read it between migraines. Hopefully I'll finish it soon. I just want to get back to programming again.
  8. Nahrix

    Done and done. Well, sort of done.

    No, I cannot load multiple maps in the editor.
  9. Nahrix

    In more then one place at once...

    Your game has definition. That definition is: kickin rad. I salute you.
  10. Nahrix

    Hola!

    I have come to say that Raptor is an amazing game of which I have loved since I was a tiny little nerd.
  11. Nahrix

    Done and done. Well, sort of done.

    CivEdit has transcended to complete, while basic, functionality. This landmark is halled with the sigil 'beta' instead of alpha, and has been been moved to version 0.3. Whereas previous screenshots were carefully captured to display maximum potential and minimum bugs, I now present you a screenshot of the editor that acts exactly the way it looks like it acts. Visually, little difference can be discerned from earlier builds. However, major additions have been coded to the structure of the objects, and what information those objects hold. As well, the manner in which tiles are 'painted' on by the user to create landscapes has been drastically altered for maximum intuitiveness. I will now officially begin work on the AI, while simultaneously updating code to the editor. For example, I still plan on implementing a minimap to both CivEdit and CivSim. Everything is going according to the plans which I never drew. Excellent.
  12. Nahrix

    Almost done.

    At this moment, I am wrapping up the few loose ends with CivEdit. When I am done, I will draw out a large, detailed map in the editor, and begin work on the actual program. Here's to a crazy ride down the road of AI.
  13. Nahrix

    Tieing the last few string

    This week has wreaked havok on my brain. I've had a migraine that has refused to succomb to the terrible power of advil and tylenol. Work on CivEdit is coming along slowly, since it's becoming increasingly difficult to think. I do, however, have good news. Despite the achingly slow rate of development, I have managed to plan out the completion of the first version of the editor. As of now, I am writing the heap of additions and alterations which will result in said version. Areas of development include more code optimization, including object-orienting the code more clearly, as well as coding the final data structures contained by each map element in the array. There is no definitive area of importance, and so I cannot give a clear idea of what is left, without going into long-winded lists. Edit: To make issues clear, there is no visual difference in the project yet. Thus, screenshots do not apply to this journal entry.
  14. Nahrix

    Home again. Time for a screenshot!

    As now it is the weekend, and I have resolved to return to work on the project come the weekend, my conscience will rest easy knowing that I have, indeed, accomplished my goal. Such efforts have lead to the completion of my Object-Oriented conversion of my editor. Visually, difference can be noted in the fact that you can now drag around the different elements of the editor, positioning them wherever is most convenient. Next up the line is saving and loading multiple map files. I have given myself a deadline of the end of Sunday to complete this section. For the time being, here is a screenshot of the result of another day's work: I am approaching the point in the editor where I may call it complete. If I don't have any more good ideas to add to it, I will name it Version 1.0b, and begin development of the actual simulator agents. If anyone has any good ideas for the editor, please comment, and I will decide whether they should or should not be implemented. Please note when suggesting ideas that the editor is merely an interface designer, meant to supply the 'world' in which the simulated agents will interact. Thus, no additions involving realtime modifications will be needed, such as: scripting engine, weather patterns, animation, etc. This is a static world editor whose sole purpose is to ease the development of 'maps' to be used, instead of manually writing them in a text editor. Regardless, good idea or bad, I thank you in advance for your input.
  15. Nahrix

    Moved out!

    Finally, I've packed and moved all of my belongings into my new house, set up the computer, set up the 'net, and had a bit of a rest after a long day's work. I'll be back programming this weekend.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!