WynterStorm - Development Setup

Published May 13, 2011
Advertisement
Been working on WynterStorm for the past hour now, implementing loading of textures. I wanted to use this entry to go over the tools I use for development. I run Mac OS X Snow Leopard as my primary OS choice, so most of my development is done in that. I don't use the XCode IDE though unless I am forced to. I prefer instead to use TextMate for writing my code, and to use make for compiling. This didn't use to be the case though; most of my work on WynterStorm used to be done in XCode. With the release of XCode 4 Developer Preview 1 though, the project files broke and I decided at that point to start the project anew, refactoring the project in order to provide myself a better framework. Thus, the current incarnation of WynterStorm was born.

Since then I have learned to somewhat tame the beast that is make into building my project, as well as training myself to use the wonderful gdb for debugging.

One of my favorite tools in Mac OS, aside from TextMate, is Apple's OpenGL Profiler. I'm curious why Microsoft doesn't offer a similar tool. At least I was never introduced to one back when I used Windows primarily. OpenGL Profiler has seriously cut down on debugging time by allowing me to view the contents of opengl data during program execution (though in a suspended state). With the recent changes made to texture loading I would like to present an example texture loaded into WynterStorm, which I have attached below.

The code used to achieve this is:
[source lang="cpp"]int main(int argc, const char* argv[])
{
// define the application
Shard::Application app;

// create a new graphics device using OpenGL
Shade::GraphicsDevice* graphicsDevice = new Shade::OpenGLGraphicsDevice();

// define a new window using SDL
Shard::Window* window = new Shard::SDLWindow();

// create the window with dimensions [320,240]
window->create(320,240, graphicsDevice);

// create a new texture of dimensions [48,48]
Shade::ResourceHandle texture = graphicsDevice->textureCreate(48,48);

// load texture from file. Texture creation and file loading was
// purposefully designed as being two steps to keep graphics
// functions limited in the number of actual tasks performed.
// Any arguments against this decision?
graphicsDevice->textureLoadFromFile(texture, "build/spectrum-prism.png");

// set the window's 'title' property. This makes use of Trefall's
// property system, the Shard::Window class being a
// descendant of Trefall::PropertyContainer. This allows the
// engine to automatically update the window's title when this
// property is changed.
window->title = "Some Title";

// app.shouldQuit is also a property, though currently doesn't
// make use of any special callbacks.
while (app.shouldQuit != true)
{
graphicsDevice->sceneClear();

// this function is defined earlier in main.cpp, but will
// later be a part of WynterStorm's core libraries. It's main
// purpose is to poll the event loop and push events to
// the rest of the engine.
processEvents(app);
window->swap();
}
return 0;
}[/source]


In my next entry I would like to discuss the engine's layout in order to get feedback and determine any flaws in my current design.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement