new to it, got some questions.

Started by
1 comment, last by max1024 14 years, 2 months ago
Hi, I'm new to this and having a hard time understanding index and vertex buffers in a practical sense. I'm just reading up on C++ and playing around with it (doing the routine .md5 import classes etc) at the moment with a view to start really coding something in the next few months. I dont know how you use vb's and ib's. What I am planing on doing is a simple game with, 2 soldiers on a terrain with one weapon each. A simple game core. Now having no idea, how do I set up my rendering? Do I put each soilder and the terrain info into a seperate vb/ib. The vb stays static and is modified by the transform? Or do I update the vb/ib dynamically with the data I want to present each render? I remember reading, locking and unlocking is very expensive (atleast was in the dx8 era). I can see that dynamically is possible, I could code that. Statically, I don't know about that. What would be the convention for the example I want to make? This is the only part of the process I don't understand. Not really looking for detailed answers, I'll research it myself; all I need is the basic logic behind the process. Thanks from a noob. [Edited by - max1024 on February 13, 2010 9:19:46 AM]
Advertisement
Quote:I'm just reading up on C++ .. with a view to start really coding something in the next few months

Just to let you know, if you're just starting into C++, it's a very big leap from "just reading up" to creating an animated game, even 2D. Don't be surprised if it takes you several months to a year before you're close to coding what you're talking about (if you've done other types of programming).

Start coding something now, using simple examples for whatever graphics system you're using. If you haven't created a window yet, start even simpler.
Quote:all I need is the basic logic behind the process

Startup your graphics system.Load model data.Create VBOs (OGL), Meshes (DirectX), etc. for your models.In a timed loop:   Get user input.   Update transforms for your models.   Render.Release/delete/shutdown.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Sorry, should have been more specific. i got something like this coded like 10 years ago. I'm 're-reading' up, so the concepts are not too foreign. I just couldn't remember how I rendered back then. It was a just a hobby then, looks fun to do again now.

Found a page on static and dynamic buffers. Answered what I needed - with your help too. Thanks again.

This topic is closed to new replies.

Advertisement