Jump to content
  • Advertisement
Sign in to follow this  
thorpe

OpenGL Pre-antialiased text [please help!]

This topic is 5090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have lots of pre-antialiased text which is generated in Photoshop, saved as png with a transparent background and then drawn, as textures on top of other textures. Blending is enabled with glBlendFunc(GL_SRC_ALPHA, GL_SRC_ONE_MINUS_ALPHA) The text "Purple" is supposed to look exactly as the text "Player". Purple is it's own textures which is blitted on to a green texture with the word Player already written on it. This is the result: http://design200.id.gu.se/~oscar/example.jpg What could possibly be wrong? How come Photoshop can load this texture as a layer and merge it down properly onto another layer while OpenGL screws everything up? Very grateful for replies.... [Edited by - thorpe on September 12, 2004 4:50:04 PM]

Share this post


Link to post
Share on other sites
Advertisement
The text "Purple" is supposed to look exactly as the text "Player".

There is no purple color anywhere :)

When you cut and paste the "Purple" texture onto the "Player" texture (which has green background) in Photoshop, everything looks good. When I do it in OpenGL, it looks horrible.

Please, please, please help. It is very important for out project and we've got a really tight dead-line. Thanks in advance!

Share this post


Link to post
Share on other sites
You know,we can't really tell what's wrong if you don't post some code on how you render the textures.Anyway,the "Purple" texture seems a little "blurred",maybe this has to do with mipmapping.Are you using mipmapping?Try to use different filters,like GL_LINEAR or GL_NEAREST and see what's best.

Share this post


Link to post
Share on other sites
OK, I have the code at work and I'll post it here tomorrow.

I have mipmapping enabled, linear_nearest I think, and a linear magfilter. I'll look in to changing mipmapping function tomorrow thouch I think we might already have done it.

Thanks...

Share this post


Link to post
Share on other sites
1) use nearest interpolation instead of linear or even mipmaps
2) in ortho mode you likely have to translate x and y by 0.375 or something to reference the centre of texels (for more info google for gltranslatef AND "0.375").
3) something i forgot.

Share this post


Link to post
Share on other sites
We have a model coordinate system which is 1366x768 at z=0 with a camera angle of 40 degrees. Not a ortoghonal projection that is.

This is then rendered to 1024x768 pixels (We have a plasma-screen with non-square pixels). All the textures are drawn as if they were supposed to be shown in 1366x768 so that things look properly when we work with them.

We've tried experimenting with different mipmapping and mag-filtersw but it doesn't solve the problem.

=(

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!