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

Ian Wadham ianw2 at optusnet.com.au
Fri Jun 20 09:28:57 CEST 2008


On Wed, 18 Jun 2008 10:23 am, Matthew Woehlke wrote:
> That sounded too much like a challenge to pass up.
>
No challenge or contest was intended ... :-)
If you want a *real* challenge, how about the 4D and 5D cube? ;-)

> My 2D GL-fu must 
> still be good; the attached patch took about 30-40 minutes, of which I
> got the background quad rendering in a few minutes and spent most of it
> figuring out that I needed the line 'glShadeModel (GL_SMOOTH);' to make
> it shade as I wanted. (Say, can we keep this as one of the options? I
> like the colors quite a bit ;-).)
>
Eugene and I are considering a fixed background picture for KDE 4.1.
Graphics themes, including your background option (i.e. a multi-way
color gradient), are a possibility for Kubrick in KDE 4.2.

> The steps aren't quite the same order, but this should give you an idea
> what is needed. I'm guessing you missed one of them (I'd be curious
> which one).
>
Now here is a strange thing.  gluOrtho2D has params left, right, bottom,
top, in that order, and you are writing gluOrtho2D (0.0, 1.0, 1.0, 0.0),
which works.  But should not 0.0 be the bottom and 1.0 the top in OpenGL
co-ordinates?  I was writing gluOrtho2D (0.0, width, 0.0, height).

If I change your code to read gluOrtho2D (0.0, 1.0, 0.0, 1.0), it gives the
same problem as I had before - no background is drawn.  I was basing
what I wrote on Martin and Andi's book, page 207, and also on:
http://www.opengl.org/sdk/docs/man/xhtml/gluOrtho2D.xml
which ought to be authoritative.  Isn't it the OpenGL API reference?

What is going on?  Will the real gluOrtho2D please stand up?

Cheers, Ian W.

P.S. I seem to have read somewhere that "Arthur the Paint Engine"
is based on OpenGL.  Hence my earlier thoughts about QPainter.
Maybe Qt is reversing the OpenGL Y-axis, to make it follow the
QPainter convention (zero at the top).


More information about the kde-games-devel mailing list