|
|
Comments and Discussions
|
|
 |

|
Simply changing (WinMain.h):
#define APP_ALLOW_FULLSCREEN true
#define APP_DEF_BPP 16
#define APP_DEF_FULLSCREEN true
#define APP_DEF_WIDTH 1024
#define APP_DEF_HEIGHT 768
shows a totally black screen... I've tried using this as a code base for my own project and for me it shows a green gradient from midding of the screen up to the right corner if I choose fullscreen. Very strange. I am however drawing a bunch of 16x16 greenish tiles, I'm guessing they're being displayed. But there definatly seems to be missing some important part in this tutorial or code base.
Also when building with vs2010 the project it says: exe can't be found.
simply right click the project and select Properties and do this:
Change Output dir under general to: $(SolutionDir)bin\$(Configuration)\
Change Intermediate dir under general to: bin\$(Configuration)\debug_crap\
These are obviously my preferred folders, but they'll work for you too
One thing which I think this tutorial needs is the ability to change from/to fullscreen in runtime. Cause like it's made up now, there's no way to do this.
EDIT:
Fix for fullscreen:
inside DrawMain.cpp: unsigned int __stdcall InitScene (const PRENDERARGS pArgList)
Just before the while loop add:
GetClientRect(pArgList->hWnd, &rcClient);
OnResizeFrame(pArgList->hWnd, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top);
Also make sure the other OnResizeFrame and RenderFrame uses same calculation for width and height as above.
modified 8 Dec '11 - 16:34.
|
|
|
|

|
a very nice sample, could you tell me how to catch events from mouse?
Thank you very much.
|
|
|
|

|
I wonder how to sync this demo with a 60Hz monitor refresh.
The Debug compilation tells something of 1248 Hz frame rate, which is quite hmmm....
Well, any ideas welcome
|
|
|
|
|

|
Hi,
why if active system menu, display stops?
Thanks
Antonio Giuliana
|
|
|
|

|
Hi,
good job. Very interesting.
I modify the example project to allow resize (#define APP_ALLOW_RESIZE true). During resize it flickers. Does anyone know why?
Thanks.
PD: My message is a bit outdated, but haven't found this article before. .
|
|
|
|

|
I create a SDI MFC program in which there is a worker thread to render a 3D scene. I found the rendering speed will be interupted and slowed by some UI interactions, e.g., moving the window by drag the window title, mouse move on some toolbar's buttons. I don't why. Could you give some suggestion?
Thanks.
|
|
|
|

|
I too am developing an engine using OpenGL, also for the learning more than anything else. My plan is to create an engine that is scriptable so have spent the last few months creating an interpreter for a C-style scripting language which manipulates objects, lights, cameras etc.
I am now looking into the more advanced OpenGL stuff to include in my engine, along with support for shaders - now that I have a new computer which has a seriously powerful graphics card. It has been a while since I looked at this project but I shall try this approach and see if it offers me any speed increases. Thanks!
PS. Your name is familiar, I think we spoke a few years ago - you were creating a VB encryption program. If it is you, it is funny how we are moving along the same lines.
|
|
|
|

|
Very well done article. Found it well written and informative. I am going to add it to my blog
Paul
I'd like to help but I don't feel like Googling it for you.
|
|
|
|

|
hi,
i am looking for a minimal opengl framework that supports picking elements in the model and interactive navigation such as pan, zoom, rotate, orbit ... does anybody know of a good clean implementation of such a beast? preferable platform independent, e.g. wxWindows based?
cheers
jeremy
|
|
|
|

|
I agree with everyone else and your article is well written and will definitely aid coders in writing OpenGL apps. Earlier in my Windows programming career, I did some testing to determine the speed difference between Windows messaging and using Events and memory mapped files to pass messages. Like you, my first code was written in C, not C++. I cannot find my data after 8 years, but I seem to remember that the Windows based mesaging came out slower. I alo did some playing around with priorities at the time and that certainly could have been a factor in the differences. Have you ever done any tests in looking at the differences in response times of the 2 methods?
Kenneth Krueger Jr.
|
|
|
|

|
Good article and refresher on multithreading. My only complaint is that it might have abit heavier error checking, especially in InitScene, where initialization can and will go wrong.
A cynic is a man who, when he smells flowers, looks around for a coffin. -H.L. Mencken
|
|
|
|

|
hu... what about a D[^] version?
I know, I could write it myself, but I have a lazy and sick curiosity about it...
|
|
|
|

|
I am particularly interested in the use of thread messaging between the Windowing and OpenGL rendering threads, which gives stunning performance. Good work. Thanks for sharing.
Best,
Jun
|
|
|
|
|

|
Not to be too picky, but 'irregardless' is not a word...
Should be 'regardless' or 'irrespective'.
|
|
|
|

|
Excellent work. Got my 5.
|
|
|
|

|
Congratulations on a well written article. It is nice to read something on this sight written by someone with an excellent command of the English language. It's like a cool, gentle breeze through a sere desert at 4 in the afternoon.
Thankful
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Provides a base to use when programming OpenGL-enabled applications for the real world, rather than a simple hello world.
| Type | Article |
| Licence | CPOL |
| First Posted | 26 Aug 2006 |
| Views | 131,117 |
| Downloads | 3,554 |
| Bookmarked | 95 times |
|
|