meaning of this

Started by
8 comments, last by jpetrie 16 years ago
can someone tell me the meaning of this HFONT hFont ;
Advertisement
It's a line of C or C++ code that declares a variable of type "HFONT", named "hFont". An HFONT is a type defined in the Windows API that is used as a handle to a font, so your code can specify which font it wants to use when rendering text or for other purposes.
thanks
also i want to know the meaning of the line
base = glGenLists(96);
In Rip-off's Awesome Programming LanguageTM, that is a minimalistic "Hello, World" application. Of course, I have had to assume you are using RAPL, if not please be kind enough to give more detail.
sorry , i forgot to paste this

GLuint base;
base = glGenLists(96);

what does this mean ?
please someone explain it ?
It generates 96 display lists.
and what does this mean ?

wglUseFontBitmaps(hDC, 32, 96, base);
SelectObject(hDC, oldfont);
Where are you getting these lines from, here? I find it hard to believe that our line by line responses will explain it better than there, unless some kind soul writes you a mini essay on text rendering in OpenGL. My guess is that you still don't really understand what the lines of code are doing.

I have a feeling that instead of hitting Google with these lines, you are coming here first. Google should be your first port of call. If for some reason after Googling for a bit you find you are still unable to understand the code, then you come here. Include in your post evidence that you could not find the answers on Google.

Such a post might include phrases such as:
"I tried Googling with 'foo', all I got was This site (not a real link), which said this <include quote>, which I don't quite understand...".

This has a few advantages:

* Shows us that you are capable of independent learning. If you don't find out how to learn for yourself, you will always be dependant on others. In addition, most of us on Gamedev are happy to help those who are struggling, but not those who will not try for themselves.

* It will improve your Googling skills, which are vital if you are serious about programming.

* Who knows, you may find the answer. Probably faster than sitting waiting for some volunteer here to post a response.

In addition, forum etiquette includes not bumping your post, unless a long time has passed. If you need something to do while waiting for a response, try Google [smile].

For more information, read this.
Everything rip-off said. This is a beginners forum not a beginners chat room. Additionally, we'd prefer it if you showed some initiative in your education; simply asking trivially searchable questions without any kind of background isn't sufficient.

Your questions suggest a relatively shallow amount of experience with C++ itself. Perhaps you might consider brushing up on the language basics before embarking into 3D graphics. The online e-books C++: A Dialog and Thinking in C++ are pretty good for that sort of thing.

This topic is closed to new replies.

Advertisement