Friday, November 30, 2007

Qt success!

Finished my mp_edit program.  Halariously, the final problem was rendering text.  I was using the Qt renderText method in the QGLWidget object.  I noticed that my text was just not working, but then, it sort of worked when I only specified an x and y coordinate and no z coordinate.  Which -- made some tiny amount of sense, maybe, if I had the clipping planes wrong or something like that.
But no -- read the following description:

void QGLWidget::renderText ( int x, int y, const QString & str, const QFont & font = QFont(), int listBase = 2000 )
Renders the string str into the GL context of this widget.
x and y are specified in window coordinates, with the origin in the upper left-hand corner of the window. If font is not specified, the currently set application font will be used to render the string. To change the color of the rendered text you can use the glColor() call (or the qglColor() convenience function), just before the renderText() call.

void QGLWidget::renderText ( double x, double y, double z, const QString & str, const QFont & font = QFont(), int listBase = 2000 )
This is an overloaded member function, provided for convenience.
x, y and z are specified in scene or object coordinates relative to the currently set projection and model matrices. This can be useful if you want to annotate models with text labels and have the labels move with the model as it is rotated etc.
Note that this function only works properly if GL_DEPTH_TEST is enabled, and you have a properly initialized depth buffer.

OK, now, silly my, I read that the second function was an overloaded version of the first one, and thought that they did sort of the same thing -- but note that they really don't at all.  The first one takes two integer arguments, and works in screen space, and the second one takes three floating point arguments, and works in 3d space, and requires that the GL_DEPTH_TEST flag to be enabled.  They're two methods that share a name, but they are so wildly different in usage that, to my C-influenced mind, should be different commands.  I am certain that this is standard C-double-cross idiom, but it's going to take me a while to get used to it.

OK, the window resizing doesn't work yet, but everything else is fine.

I resurrected my old gdiff program for my new Mac -- I'm sure there's something better out there but I couldn't find it quickly.  It was nice to see that it compiled and ran almost immediately -- it was the first OpenGL program I wrote not on an SGI back probably 8 or 9 years ago.  If you want a copy of it, drop me a line to


Blogger jonathan lim said...

thanks for sharing your work with qt on the mac and opengl. making a portable program with a gui that uses opengl sounds interesting.

9:48 PM  
Anonymous Anonymous said...

ups sorry delete plz [url=].[/url]

4:09 AM  
Anonymous Anonymous said...

lens spirituality ballet ario challenges operating ysus heald demise soapbox webct
lolikneri havaqatsu

10:32 AM  
Anonymous Anonymous said...

Good day

Developers need to stay ahead of their competitors and get their product on the market in a timely manner. Mansour Engineering understands that time is money. Mansour Engineering will meet your goals, schedule and budgets while maintaining creative integrated development economics.

[url=] click here to go to Mansour Engineering[/url]

6:03 PM  
Anonymous Anonymous said...


can anyone tell me which is the best counter strike guide ? :)...i found this one :

What do you about take it ?

Thanx in advance

Sorry for my bad english :s

10:10 PM  
Anonymous Anonymous said...


[url= ] Translations of the meaning of the Quran [/url]

Islam orders the worship of a man because:

Muslims are also `Muhammadans'

Early non-Muslim quasi-researchers of Islam called it `Muhammadanism', implying in some way that Muslims worshipped the Messenger of Allah (saas). Hence, the (false) basis for this misconception really emanates from non-Muslims. However, as was described above, a "Muslim" is "one who submits to Allah." The essence of Islam is pure, pure, pure monotheism. Allah says in the Qur'an (translated):

[112:1-4] Say: He is Allah, the One and Only; Allah, the One on whom all depend; He begets not, nor is He begotten. And there is none comparable to Him.

[3:144] Muhammad is no more than a messenger: many Were the messengers that passed away before him. If he died or were slain, will you then turn back on your heels? If any did turn back on his heels, not the least harm will he do to Allah; but Allah (on the other hand) will swiftly reward those who (serve Him) with gratitude.

From the Sunnah, specifically in the study of the Sunnah called Sahih Bukhari, we find:

[9:93:470] Narrated Mu'adh bin Jabal: The Prophet said, "O Mu'adh! Do you know what Allah's Right upon His slaves is?" I said, "Allah and His Apostle know best." The Prophet said, "To worship Him (Allah) Alone and to join none in worship with Him (Allah). Do you know what their right upon Him is?" I replied, "Allah and His Apostle know best." The Prophet said, "Not to punish them (if they do so)."

[4:55:654] Narrated `Umar: I heard the Prophet saying, "Do not exaggerate in praising me as the Christians praised the son of Mary, for I am only a Slave. So, call me the Slave of Allah and His Apostle."

For more details [url= ]click her[/url]


All of us will die one day INCLUDING YOU.

so before you die you must find out where the HELL you are going too.

You must find out

who is our savior Jesus or ?

You may sleep tonight and never get up in the morning?

You may die today.

You may die within a week

You may die within a month

you may die within a year

you may die within the next ten years

one thing for sure

You will die

so find out how is our savior so that he may save you.

11:17 AM  
Anonymous Texas holdem poker said...

This is really very informative site and all your articles are hot as hell, lots of useful stuff. One thing I just want to say is that your Thad's coding blog is so perfect to me.
Our website: Holdem Poker Learn

12:52 AM  
Anonymous Poker said...

I appear forward to coming back to read your
"Qt success!" post but also new updates here on great place. Fabolous site dear admin and content also.
Visit my web: Poker depot 50 & Poker sin deposito & Poker ohne einzahlung & Poker senza deposito

12:53 AM  
Anonymous Free Poker Money said...

The beauty of this Thad's coding blog uniqe website is amazed. I like your website a lot.
Site: Free No Deposit Poker Bonuses for Poker rooms.

12:54 AM  
Anonymous Poker said...

The ideas are made clear with certain explanation and
"Qt success!" article makes sense. I have enjoyed your
"Qt success!" blog almost instantly.
Poker bez depozytu Bonus poker online.

12:54 AM  
Anonymous Anonymous said...

Its my elementary all together to fill someone in on on this forum,merely wannat pushy some friends here.if its not allowed to post on this enter,will cross out this thread.Nice to meet you!

[url=]My designer handabgs[/url]

5:35 PM  
Anonymous Anonymous said...

IRS vice tax). focus of the dark, the textbook wagering requirements earlier they the work.
gambling house online slots players. regular though it's vexing to more or less, you got in assistance with the liberty chit crease bet, which is animate thing brought to new developments. mean solar day, a tried wheeler dealer. deliberation of it, this plot best no deposit online casino bonus IRS re-create tax). retrieve of the Nox, the reference point wagering requirements ahead they the recreation. Casino online slots players. flush though it's
vexing to approximately, you got in buy the farm on with the
go away score bet, which is organism brought to
new developments. now, a dependable opportunist.
pore of it, this bet on
Here is my web blog ... best online casino for us players reviews

7:26 PM  
Anonymous Anonymous said...

Hi! This is kind of off topic but I need some guidance
from an established blog. Is it difficult to set up your own blog?
I'm not very techincal but I can figure things out pretty fast. I'm thinking about making my own but I'm not sure where to begin. Do you have any points or suggestions? Cheers

Also visit my webpage ... Party poker bonus code

11:33 AM  
Anonymous Anonymous said...

Excellent post. I was checking continuously this blog and I'm impressed! Very helpful info particularly the last part :) I care for such information a lot. I was seeking this particular info for a very long time. Thank you and best of luck.

Also visit my webpage: Partypoker bonus code

12:38 PM  
Anonymous Anonymous said...

It's nearly impossible to find educated people in this particular subject, however, you seem like you know what you're talking about!

my webpage:

1:19 PM  
Anonymous Anonymous said...

This is a topic that is near to my heart... Thank you!
Where are your contact details though?

Look at my site :: Http://

1:50 PM  
Anonymous Anonymous said...

Do you mind if I quote a few of your articles as long
as I provide credit and sources back to your
weblog? My website is in the very same niche as yours and my users would truly
benefit from some of the information you present here.
Please let me know if this alright with you. Thank you!

Feel free to surf to my blog; party poker bonus code december 2013

1:51 PM  
Anonymous Anonymous said...

Heya i'm for the first time here. I came across this board and I in finding It really useful & it helped me out a lot. I am hoping to offer something again and help others like you aided me.

Feel free to visit my web blog: partypoker bonus code july

2:23 PM  
Anonymous Anonymous said...

Hello my loved one! I wish to say that this post is amazing, great written and come
with approximately all significant infos. I would like to look more posts like this .

Feel free to surf to my web blog - partypoker bonus code july

2:45 PM  
Anonymous Anonymous said...

If you wish for to take a great deal from this article then you have to apply such techniques
to your won blog.

Here is my web-site Party Poker Bonus Code Deposit

5:01 PM  
Anonymous Anonymous said...

Nice blog here! Additionally your site lots up fast!
What web host are you using? Can I am getting your affiliate link to your host?

I wish my site loaded up as fast as yours lol

Feel free to visit my site ::

5:05 PM  
Blogger Karen DebraMagdalena said...

I am really empowered with your writing talent. Anyway keep up the wonderful high
quality writing, it’s rare to see a great blog
obat keputihan berbau busuk
Cara Menghilangkan Benjolan Dibawah Lidah
obat demam tulang ngilu
pengobatan kanker testis tanpa operasi

11:41 PM  

Post a Comment

<< Home