Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Pain Greater Than Pleasure

Sign in to follow this  
Stephen R


I spent all day fixing one problem after another but I finally got my quad tree rendering some terrain.

The quad tree caused me no end of problems. First of all I was allocating the number of indexes I wanted in my index buffer instead of their size in bytes. Forgive me for thinking that DX would be able to do a simple num * sizeof(x) op without my help. That wasn't immediately obvious because the error only occoured when the app was shutdown.

I also had my most stupid mistake to date. I was wandering why I couldn't see anything on the screen, even though I was rendering without error. Finally I figured it out. My line of sight was on the same plane as my terrain making it invisiable. All I had to do was move my camera up and tada - there was my terrain.

On the plus side this is quite an acheivement for me to get the quad-tree working in one day. I am using a triangle fan to render each of the elements of the grid. THere is no real difference between it and a triangle strip in this instance so I went with the fan because they're cool (bow before the might of my punning)! I am only using unlit untextured verts atm, thats why I render in wireframe. Tomorrow I will add texture coords and the texture map for the terrain. Should have another screeny then.
Sign in to follow this  


Recommended Comments

There are no comments to display.

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
  • 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!