SGI: Development

Advice on approaching new IRIX image viewer application.

Hey all,

After some consideration I've decided to start a new coding project: a general purpose image viewer for IRIX. I do realise there are a bunch of other programs out there that already do good job, but by writing my own thing I'm hoping to increase my coding skill so I can maybe tackle a larger graphics-related project in the future.

I've considered refactoring/extending my Comix cbr/cbz viewer. But perhaps it's best to start fresh with a new Motif/ViewKit/C++ UI. I figure I'll use Graphicsmagick's magicke++ C++ binding to do any image manipulation. I know that IRIX has the image library and IFL but my primitive benchmarking seems to indicate that Graphicsmagick is almost twice as fast for the rotation/scaling stuff I might want to include in the viewer. And it gives me a ready-made Image class which offers a range of functionality for 'free'.

Of course there's a ton of things I need to read up about, but I thought I'd try the novel approach of asking the nekochanners for some advice and guidance first. Some of my specific questions are:

1. I'm not sure whether I should use OpenGL for this. And if yes, what parts of the application might benefit most.
2. I definitely don't know enough to decide whether I should be using glDrawPixels or quads & textures to display stuff.
3. Will I run into issues with memory handling for large images? Say, the 12 or 16 megapixel images that come out of my Lumix G6...
4. Though I'll be developing on my Fuel, should I be worrying about other IPxx at this stage?

Any advice and other topical hints/tips would be greatly appreciated.

J.
:Fuel: redbox 800Mhz 4Gb V12
Wow, that's a neat project, small enough that it can be worked on in short intervals and first results should be quick.
What i've seen from the viewkit apps i really like, it is simple and looks cool. So i really like the idea of building it with Viewkit.

Your first choices is for what platforms you want to build and run this application. If you want to include Indy's and Indigo2's and Impact Octanes, you need to take into account the fact that these machines don't have hardware texture support. Other than that, as long as you stay within openGL 1.1 boundaries, you're fine. I learned a lot of openGL machine specifics from xscreensaver code and rss-glx, so it is possible to if/else your code to account for specific platforms.

OpenGL and the good old glDrawPixels should be fine, although looking recently into the Indy hardware documentation, they mention that sending one glDrawPixel is very costly DMA-wise since the R4K processor needs to flush the cache for each DMA operation. This is of course not very interesting for the Octane since its hardware can do this much more efficiently, but when writing openGL information on a very atomic scale, it may be faster to write it in blocks or even directly into the framebuffer.

Large images should be okay, though you may break the 2GB barrier, so be prepared to go 64 bit.

Start with an app you can hack around with. Is there a Viewkit demo app which displays images?
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:
rapidapp has a tutorial that displays .iv files using Viewkit SoFly from inventor.
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
MyDungeon() << :Fuel: :Octane2: :Octane2: :Octane2: :Octane: :Indy: MyLoft() << :540: :Octane: MyWork() << :Indy: :Indy: :O2: :O2: :O2: :Indigo: :Indigo:
If you want to be able to open 3D images and spin them around then you need opengl for sure, but you might want to consider SDL for all other image types, the IRIX version has everything you need and it's fast...
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:
Thanks all for your input. Much appreciated. I've decided to start by refactoring/completing Comix.