Sign in to follow this  
max1024

new to it, got some questions.

Recommended Posts

max1024    100
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]

Share this post


Link to post
Share on other sites
Buckeye    10747
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.

Share this post


Link to post
Share on other sites
max1024    100
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this