Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 May 2006
Offline Last Active Yesterday, 01:17 PM

Posts I've Made

In Topic: Interleaved Arrays

17 July 2012 - 08:02 PM

Figured this out. In line 43 of my second code snip, notice anything wrong there? I bind the vertex buffer again, and give it the index data. No wonder nothing was getting rendered, and my vertex buffer was corrupted.

What tipped me off, as I was just about to call it a night, i was staring at the Vertex Buffer Objects node in gDEBugger, and noticed VBO2 said something to the effect of 'not attached'. Not attached? And why is my index data showing up in VBO1 if I'm setting data in the vertex buffer first, I would think the index data would be in VBO2.

Thanks to Neilo and Brother Bob though for pointing out VAOs. They are pretty slick.

In Topic: Horizon SkyDome Sun Shader

30 March 2012 - 08:37 PM

Awhile back I started to come up with a 'close enough' approach to rendering the sun in the sky. http://matt328.wordpress.com/category/xna/ These two posts here try to detail what I've done. It's nowhere near the aforementioned models and pretty incomplete, but if you're just looking for somewhere to start your own implementation, you might find them interesting reads.

In Topic: Sadistic library authors (my rant about Xerces for C++)

26 March 2012 - 06:51 PM

Whats wrong with TinyXml++? Its a few source files you can drop into your project and code written with it is about as concise as parsing xml can be. The few times I've had to parse xml in C++ its worked pretty well for me.

It might not be the fastest thing there is, but the decision to use xml pretty much admits that you favor human readability over performance anyway.

Edit: Doh i see you were looking for something that validates against a schema which I don't think TinyXml++ does. I validation is something that you decide can fall off the cart, check out TinyXml++.

In Topic: How do I take a look at HashSet while debugging in Eclipse Expressions?

24 March 2012 - 10:44 AM

The contents are contained in the 'table' member. However since the table is actually an array with the hash of the object used as the index in the array, it will may seem pretty sparsely populated, there will be alot of gaps between cells that actually have values.

Personally, I always override toString() and print all my members' values nicely in there. The debugger displays the return value of toString() in the lower pane, if you don't override it, it falls back to Object.toString() which just prints the Object's class (if my memory is correct) plus the address the object is stored at, which is (usually) not very helpful.


While I'm thinking of it, you should also always override .equals() and .hashCode(), especially if you're putting those objects into a Set.

In Topic: Is it wrong that I look down on Joe Blow?

20 February 2012 - 07:16 PM

These people don't even know what computer programming is and their inability to grasp simple concepts like if statements is mind baffling to me.

I would consider that your weakness, not theirs.