View Full Version : inconsistent rendering
02-16-2004, 01:15 PM
I am trying to draw my own text(just numbers), very simply through lines and points. While testing this I noticed that the numbers while drawn the same every time didn't always appear the same on different parts of the screen specifically the bottom quarter of the display area. I noticed this holds true for other lines and polygons as well. This is a mfc project, i have tried both double buffering and rendering to a DIB. Any insignt on this would be extremely appreciated.
What do you mean by it not appearing "the same"? What's different?
My first guess is that you're drawing in a perspective view and noticing that the characters warp slightly towards the edges of the screen - that's normal, and a function of the way perspective views work. Try switching to an orthogonal view instead: look at glOrtho or gluOrtho2D.
02-16-2004, 01:49 PM
Thanks for your reply. I am however currently using gluOrtho2D and have tried glOrtho as well. The reason they do not look the same is that 1 has perfect looking numbers and the other the numbers are distorted looking for example the number 2 is not a consistent looking number, there is a break in the diagonal part of it right below the rounded top section. and then that top rounded part is 1 pixel too high. The goal of my display setup is simply to create a view that mimicks pixel coordinates on the screen.
02-18-2004, 12:36 AM
Since you are using MFC, you need to properly synchronize the GL and the GDI, as this can cause snow among other problems.
This is correct rendering and I would recommend turning on line antialiasing, or setting the line width to a larger number.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.