Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Jul 2011
Offline Last Active Jul 21 2014 12:24 PM

Topics I've Started

Drawing not working?

19 April 2014 - 05:03 PM

I've been looking over this problem for days now and I can't figure out why this class isnt drawing.




Thats my whole project so far, easier than pasting. I've set breakpoints and every method is being called and every variable initialized. This one has got me stumped :s 



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