Tuesday, May 10, 2011

Threading. OpenGL?

I experimented with threading and am pleasantly surprised with the results. The only irritating bit was that the most obvious way of doing threads only takes methods with no parameters. It's a bit more esoteric to do a method parameters, but the end result is just one line extra. It let me place or dig blocks and keep on moving while the world recalculated everything.

I am becoming increasingly aware, though, that XNA may not be the best choice for this. I'm trying to render a million blocks, after all. The alternative is to work with DirectX directly, or to use OpenGL. If I stick with XNA, I can run things on the Xbox. If I go with DirectX, I'm stuck Windows-only. If I go with OpenGL, I can run cross-platform. So, I'm going to attempt to learn and use OpenGL.

If openGL is anything like SDL was with Adventurer, it'll be a nightmare to work with. But damn fast. So I'm going in expecting the worst. It really should be the most blindingly fast thing I can do, though, since openGL is made for drawing 3D primitives.

And if that's too much of a headache, I can go back to XNA. Infiniminer was made with XNA, after all.

No comments:

Post a Comment