[Kde-games-devel] Ksudoku, Kubrik 3D background

Matthew Woehlke mw_triad at users.sourceforge.net
Mon May 19 19:09:44 CEST 2008


Ian Wadham wrote:
> On Fri, 16 May 2008 02:22 am, Matthew Woehlke wrote:
>> <snip>
> 
> Hi Matthew,
> 
> Thank you very, very much for all of your useful advice on
> how to draw a background in OpenGL.  I had indeed never
> considered that you could mix 2-D and 3-D in one scene.

Ah, whew, guess I'm *not* just ranting and raving then ;-).

> Your help is very much appreciated.  I'll give these ideas a
> try in a week or two, after the upcoming deadlines.

I did a fair bit of OpenGL a few years back; nothing fancy, but 
certainly something like Kubrick would give me little problem (whereas I 
understand the concepts behind something like Quake, but I'd need a good 
bit more researching to get something like that right ;-) ), so please 
feel free to ask for advice, especially if you get stuck.

If you need me to, I can dig out some actual doc and throw out actual 
API names and/or pseudo-code instead of hand-waving around techniques 
without knowing the actual API's off the top of my head :-).

> Eugene ... Did you get all that?  It looks as though any kind of
> background artwork would work, provided it has an aspect ratio
> similar to a Kubrick window.  And it can be padded out to the next
> power of 2 just by rendering the SVG into an image with empty edges.

Yes and yes. Given that the window is resizable, though, you probably 
want to consider how cropping will work. (KNetWalk had a similar issue.)

I should note that compositing multiple backgrounds, possibly at 
different sizes and with alpha blending, is also easy, if that would be 
useful (again, I think that's what KNetWalk does?). In fact, GL should 
give you most or all of the Porter-Duff blending modes, should you want 
them, with little to no overhead.

-- 
Matthew
Save soybeans! Avoid TOFU! (http://en.wikipedia.org/wiki/Posting_style)



More information about the kde-games-devel mailing list