I’ve been working on a new OpenGL program. Didn’t finish the last one as I decided I wanted to make a portable application (ie, so I can port it to Windows, and possibly even DirectX one day). Only a touch of Objective-C/Cocoa to set up the windowing and use some nice OS specific functions (such as Cocoa automatically being able to decode PNG files), most of it is written in C++
So I’ve been playing around with VBO’s (Vertex Buffer Objects) and FBO’s (Frame Buffer Objects) which I had been doing in the previous program, but it turns out I was doing it slightly wrong. So now that it’s all working correctly I have a bit of an app going.
Currently it pretty much only loads Obj models (a simple ASCII based format), but most 3D applications will export this.
Underneath there is a lot going on. It has:-
Next things I’d like to do are is have a model manager to allocate one (or more) large VBO on the card to hold lots of smaller models and index them within the VBO, more shaders – I’d really love to try some SSAO (Screen Space Ambient Occlusion – basically simulating the way that indirect light will still light and shadow things) and deferred lighting/shadowing and write a full GUI for it for things like menus, combo boxes, buttons, etc.
I’m sure I’ll come up with a lot more, possibly turning it into some type of game engine one day.
Here’s a screenshot of what I have so far.
It doesn’t look like much, but there’s a lot of work going on there.
The colours you can see on the model (which I actually made myself) are what’s known as a normal map. It’s the way lighting is calculated on 3D models.
Unfortunately there’s a couple of problems with this model.
One thing that may stick out in that screenshot too (at least if you click it and view it in full size) is that the frame rate is only 20FPS. Basically there are three reasons for this:-
So next post, I’ll hopefully show a proper render of the model. Maybe even throw in a quick tutorial on VBO’s (which are really quite easy when you get your head around them).
Ok, so I figured I’d jot down my thoughts on Apple’s announcements at WWDC09. Normally I’d just chuck this on Twitter, but I don’t think 140 characters isn’t enough
iPhone 3G S
I like that it’s got a speed upgrade and a dedicated 3D processor (I’m actually a little jealous of this one), but that’s about it really (for me anyway).
I’m a bit meh about the Magnometer (compass). I’m sure I’ll eat my words here when a killer app requires it.
The camera doesn’t really bother me. 3MP with crappy optics isn’t going to do much. I hardly use mine anyway, I’d much prefer to use a dedicated camera. Video could be nice, but once again, if I wanted video, I’d use a dedicated one.
Voice control, while a very nice technology, it’s not really practical. You can’t really use it in public without annoying people, and I don’t know about you, but when I’m by myself, I feel a bit stupid talking to nothingness.
All of the rest of the features are included in the 3.0 software update (which I’m actually quite excited about) that is coming out worldwide on the 17th of June (Australia included, their press release was actually incorrect).
MacBook Pro
This one is easy. I am so glad that I bought mine last year! At the same price point that I paid (bottom level 15″ MacBook Pro), you now get a downgraded machine
Pros:-
Cons:-
Snow Leopard
Out in September. This is going to be a fantastic upgrade. Full 64bit operating system. The current OS is 32bit with 64bit extensions (basically to allow addressing of over 4Gb of system memory – ie. This doesn’t just include installed RAM). Going to full 64bit should speed things up quite a bit.
Installation time has gone from 1 hour down to 15min which is a nice change, it’s not a big change in the scheme of things (you only do this once every now and again – much less on the Mac than Windows).
It’s smaller. This one surprised me. I’m currently hearing that the installed size is about 6gb smaller. I guess this is due to not having to have the PowerPC binaries in their apps anymore (Snow Leopard is Intel only). This is a very nice change that a newer operating system is faster and smaller than the one it’s upgrading.
OpenCL. Most people really don’t care about this one, but this is going to give some major performance increases for anyone with a GeForce 8600 or better. Basically your Dual Core system just got a whole lot more cores added to it (think hundreds of slower cores). Now while this won’t double performance in most cases, you will see some major speed-ups.
One that I don’t know which way it’s going (if anyone knows, let me know). OpenGL. Is Apple going to have OpenGL 3.1 (and GLSL 1.3) on this, or will it still be stuck back at OpenGL 2? I’d love to start playing around with 3.1 (some quite major changes) and I’m sure more apps/games would use this if available.
Safari 4
Meh.
So, have a couple of updates for this today. Firstly, I have a very cool girlfriend. For our anniversary (2 wonderful years), she bought me this:-
How awesome! Two of my favourite things, Star Wars, and lots of female flesh
Secondly, I’ve picked myself up a new MacBook Pro
It’s just the base model of the pro’s, but it’s absolutely awesome. Idealy I want to write apps for both the Mac and for the iPhone.
I’m still going through an learning Objective C/Foundation libraries. Getting there slowly. I think the hardest bit for me to get my head around is using the Interface Builder to link my classes to the ui. A very different style to what I’m used to, and not sure if I like it yet or not. I’m all happy with the speedy creation (even if it does feel a bit like cheating), but I’m not a fan of not having actual code behind it for future flexibility. We’ll see how restrictive it is though.