Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Jul 2011
Offline Last Active Today, 02:09 PM

Topics I've Started

Max buffer size

08 April 2014 - 07:43 PM

Is there a max buffer size in XNA? or am i just doing something really wrong here?





Assigning parameters of a struct

08 April 2014 - 05:30 PM

This is a pretty simple question, but I havent used c# in a while so I'm a bit rusty.

 struct Voxel
            Vector3 Position;
            enum VoxelType
                air = 0,
                grass = 1

This is how I'm going to create the voxel data structure.

for (int x = 0; x < CHUNKSIZE; x++)
                for (int y = 0; y < CHUNKSIZE; y++)
                    for (int z = 0; z < CHUNKSIZE; z++)
                        ChunkArray[x, y, z] = new Voxel();

I populate my ChunkArray with voxel structures. My question is, how do I set the Voxel Position variable using the x, y, and z variables?

Voxel[,,] ChunkArray = new Voxel[32, 32, 32];


I think I solved my problem...

                        ChunkArray[x, y, z] = new Voxel
                            Position = new Vector3(x, y, z),


30 March 2014 - 08:13 AM

While looking at tutorials, i came across this CreateMesh function. I was tying to create a simple cube which i had no problem with. I basically used the Rastertek modelclass.cpp modified to fit my needs. My class doesnt use the createmesh method, so I'm wondering what are the advantages and disadvantages of using this method to create the cube?

Merging meshes

21 March 2014 - 11:18 AM

I'm asking about this topic because I saw an old post where someone had used a technique to merge the meshes of cubes to reduce draw calls. I've never tried to merge meshes so I don't know how it works exactly.

If I have a vertex buffer for a cube, I can create a chunk and store the chunk into another big vertex buffer. But this doesn't reduce the number of triangles for each cube in the chunk. How would I take the chunk and create two giant trianlges for the side of the chunk?

Is this technique worth using if the cubes will be changing constantly? The initial loading of the chunks will be done at load time, but little changes can be done easily at render time

debugging for beginners

18 March 2014 - 08:37 AM

I've gotten the hang of c++ and DirectX so far, but when I create my own projects I have trouble debugging when I run into an error. I know how to set breakpoints and check for local variables, but when I miss an initialization or declaration I have a hard time finding the error. Are there any tutorials or books based just on debugging practices? Or is it a skill that you have to learn as you go?