Lesson 13 problem
"I''m having a small problem with lesson 13, and I''m wondering if anyone else has had this problem... When I run the program in windowed mode, it works fine, but in fullscreen mode the text does not show up. Has anyone encountered (and hopefully fixed!) this problem?"
Another user posted that back in May (I searched the messages) and I''m encountering the same problem. Unlike him, however, I''ll post the Power-Rig-Of-The-Future (my computer) specs:
A mind-numbing fast 450mhz Celeron processor
128 megs of RAM
Voodoo 3 2000 PCI (it''s a 2D AND 3D card... all in one!)
Thanks for any help, and please excuse the sarcasm. I''ve been trying to fix this damn problem and I''m a bit silly in the head from it.
Brian
I came into the same problem and I don''t know what''s going on my whole computer frooze when I threw it into Full Screen mode ;-< I didn''t really like...
--------------------------I shall thrash his bloody head in, cut it from upon his shoulders, and as his blood flows effortlessly down my blade, I shall taste it's sweetness. Blade Runner’s Entertainment Nothing much right now...
Are you sure you power rig has the right video drivers... (i remember when i got a voodoo banshee no ogl worked cause it came with bad drivers???) just a sugestion
btw for a power rig check out my comp
piii500mhz
256mb ram
geforce2
33gb harddisk
winme (nice and slow but what can u do)
btw for a power rig check out my comp
piii500mhz
256mb ram
geforce2
33gb harddisk
winme (nice and slow but what can u do)
I have a Voodoo3 2000 PCI as well! I had the same problem with that tutorial and never did find a fix! I can''t find any logical reason for it not to work all I know is that when I try to run the tutorial the frame rate is about 0.1 fps and it only draws the fist letter half of the second and a fragment or two of the third! I haven''t need to have text in my programs yet so I''ve not worried about it too much. If you do find an answer please let me know. Otherwise the only thing I could suggest is what I was planning on doing when I needed text. Make texture maps of what you need to display and then draw texture mapped quads. I was even going to recreate the texture map when the string changed and my rendering code would never need to know the difference in the texture it was drawing on the quad. It''s was just an idea but all youd need to do is creat a bitmap with a memory device context so that windows can draw to it then just copy the pixels out to your texture. Haven''t tried it yet so I don''t know how big a pain it''ll be.
Well, before I ramble on too much....
Well, before I ramble on too much....
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
I think it''s a driver bug. They simply didn''t test wgUseFontBitmaps properly. I''ve got the same problem on Voodoo5 5500 but wglUseFontOutlines works perfectly.
Ok, after some nervous investigation the truth poped up
I''m VERY GLAD to say there was neither bug nor compatiblity problem with 3DfxGL drivers.
First, I''ve find some code, based on NeHes OpenGL app. framework created by Mark Morley. He made fonts to work just fine.
Then, I looked deeply into the MSDN OpenGL documentation titled "OpenGL Correctness Tips" and found that for glBitmap() [which is the core of Bitmap Fonts display lists build with glUseFontBitmaps()] they noted: "To obtain exact two-dimensional rasterization, carefully specify both the orthographic projection and the vertices of the primitives that are to be rasterized. ..." and demo code applied.
So, what does all that mess above mean? The only thing you need to do is to emplement the following two functions:
void ortho( void ) // Changes Projection To Orthgonal
{
glDisable(GL_DEPTH_TEST); // Disable Depth Testing
glDisable(GL_LIGHTING); // Disable Lighting
glMatrixMode(GL_PROJECTION); // Save The PROJECTION Matrix
glPushMatrix();
glLoadIdentity();
// Enter Orthographic Mode
glOrtho( 0, windowwidth, windowheight, 0, -1, 1 );
glMatrixMode(GL_MODELVIEW); // Save The MODELVIEW Matrix
glPushMatrix();
glLoadIdentity();
}
void perspective( void ) // Changes Projection To Perspective
{
glMatrixMode( GL_PROJECTION ); // Restore The PROJECTION Matrix
glPopMatrix();
glMatrixMode( GL_MODELVIEW ); // Restore The MODELVIEW Matrix
glPopMatrix();
glEnable( GL_DEPTH_TEST ); // Enable Depth Testing
glEnable(GL_LIGHTING); // Enable Lighting
}
And after that all your printing code must look like this:
ortho(); // Enter Orthographic Mode
...
glPrint( 1, 10, "FPS : %0.1f", fps );
or something else
... Do All you printing job here ...
perspective(); // Return to Perspective mode
Also Mark modifued glPrint function to include raster positioning. Notice that (0, 0) - is the top left screen corner.
Ok, suppose this theme is closed now
PS: Thanks to Mark Morly for his modifications. And May NeHe notice this message of mine :-\
I''m VERY GLAD to say there was neither bug nor compatiblity problem with 3DfxGL drivers.
First, I''ve find some code, based on NeHes OpenGL app. framework created by Mark Morley. He made fonts to work just fine.
Then, I looked deeply into the MSDN OpenGL documentation titled "OpenGL Correctness Tips" and found that for glBitmap() [which is the core of Bitmap Fonts display lists build with glUseFontBitmaps()] they noted: "To obtain exact two-dimensional rasterization, carefully specify both the orthographic projection and the vertices of the primitives that are to be rasterized. ..." and demo code applied.
So, what does all that mess above mean? The only thing you need to do is to emplement the following two functions:
void ortho( void ) // Changes Projection To Orthgonal
{
glDisable(GL_DEPTH_TEST); // Disable Depth Testing
glDisable(GL_LIGHTING); // Disable Lighting
glMatrixMode(GL_PROJECTION); // Save The PROJECTION Matrix
glPushMatrix();
glLoadIdentity();
// Enter Orthographic Mode
glOrtho( 0, windowwidth, windowheight, 0, -1, 1 );
glMatrixMode(GL_MODELVIEW); // Save The MODELVIEW Matrix
glPushMatrix();
glLoadIdentity();
}
void perspective( void ) // Changes Projection To Perspective
{
glMatrixMode( GL_PROJECTION ); // Restore The PROJECTION Matrix
glPopMatrix();
glMatrixMode( GL_MODELVIEW ); // Restore The MODELVIEW Matrix
glPopMatrix();
glEnable( GL_DEPTH_TEST ); // Enable Depth Testing
glEnable(GL_LIGHTING); // Enable Lighting
}
And after that all your printing code must look like this:
ortho(); // Enter Orthographic Mode
...
glPrint( 1, 10, "FPS : %0.1f", fps );
or something else
... Do All you printing job here ...
perspective(); // Return to Perspective mode
Also Mark modifued glPrint function to include raster positioning. Notice that (0, 0) - is the top left screen corner.
Ok, suppose this theme is closed now
PS: Thanks to Mark Morly for his modifications. And May NeHe notice this message of mine :-\
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement