Hey hey!
I’m having two problems with the Radeon 9500 and latest Catalyst drivers(6.4)
- It appears I can’t disable FSAA once is enabled. The glDisable(GL_MULTISAMPLE_ARB) seems to be broken. I do this to create bitmap font:
HFONT l_hFont = CreateFont
(
-11, // height of font
0, // average character width(0 to adjust automatically with the height)
0, // angle of escapement
0, // base-line orientation angle
FW_THIN, // font weight
FALSE, // italic attribute option
FALSE, // underline attribute option
FALSE, // strikeout attribute option
DEFAULT_CHARSET, // character set identifier
OUT_TT_PRECIS, // output precision
CLIP_DEFAULT_PRECIS, // clipping precision
NONANTIALIASED_QUALITY, // output quality
FF_DONTCARE|DEFAULT_PITCH, // pitch and family
L"Arial" // typeface name
);
// make the system font the device context's selected font
SelectObject (m_hDC,l_hFont);
m_uiTextListBase = glGenLists(255);
wglUseFontBitmaps (m_hDC, 0, 255, m_uiTextListBase);
And this to draw a text:
//Disable FSAA
glDisable(GL_MULTISAMPLE_ARB)
//Set otho projection
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0,(GLdouble)m_uiWidth,(GLdouble)m_uiHeight,0.0,-1.0,1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
//Disable depth test and zwrite
glDisable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);
//Fill mode
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
//Draw each text
size_t i;
for ( i=0; i<m_sDrawSet.texts.size(); ++i )
{
const sDRAWPETITION_TEXT& t = m_sDrawSet.texts[i];
glColor4f ( t.color.x, t.color.y, t.color.z, t.opacity );
glRasterPos2i((GLint)t.x,(GLint)t.y+11);
// now draw the characters in a string
glListBase(m_uiTextListBase);
glCallLists ( (GLsizei)t.text.length(), GL_UNSIGNED_BYTE, Utils::UNICODE2ASCII(t.text).c_str() );
}
//Restore list base
glListBase(0);
And I get blurred-by-fsaa antialiasing text…
If I dont use the GL_multisample_arb extension and don’t create a fsaa framebuffer text is rendered cleanly and ok…
- I’m making vertex picking using a glReadPixels() call to compare the vertex.z with the z-buffer to test if that vertex is occluded. Using a multisapled framebuffer it appears I can’t get the z-buffer because glReadPixels() fails. I know I could do this with occlusion queries but can’t understand why glReadPixels() fails
With a GeForce 6800 text is drawn ok with multisample AA and glReadPixels() doesn’t fail.
thx