×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Jan 2011
    Posts
    53

    Smile [moved] Anti aliasing

    hello....... i am loading a .jpg file with a texture of football field..... i am succesfully able to load the football field but the white line used to represent the penalty area and boundary of field are not coming straight..... actually at a particular position of camera the line appear straight but after rotating the view bys ome angle the lines appear to be broken or "jaggy ways".......... please help me ???

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Anti aliasing

    Is it http://en.wikipedia.org/wiki/Texture...ve_correctness what you see? You have to enable perspective correction then.

  3. #3
    Registered User
    Join Date
    May 2006
    Location
    Germany
    Posts
    598

    Re: Anti aliasing

    Assuming you are using OpenGL. Try using different texture filtering.
    ES2: http://www.khronos.org/opengles/sdk/...xParameter.xml
    ES1: http://www.khronos.org/opengles/sdk/...xParameter.xml
    Mipmap with GL_LINEAR_MIPMAP_LINEAR should give you the best results.

  4. #4
    Regular Contributor
    Join Date
    Jan 2011
    Posts
    53

    Re: Anti aliasing

    this command doesn't work on symbian 3rd edition........ whenever i use this command the textures are not loaded onto the objects........... so please tell me how to deal with the problem of lines being bended or broken on different positions of camera

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Anti aliasing

    Do you have the perspective correctness problem?
    Code:
    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    would solve it (the alternative is GL_FASTEST, which is fast but causes this distortion)

  6. #6
    Registered User
    Join Date
    May 2006
    Location
    Germany
    Posts
    598

    Re: Anti aliasing

    You will need to generate the mipmap before using it. This should do it (on ES1 at least) :
    glTexParameter(GL_TEXTURE_2D, GL_GENERATE_MIPMAP,GL_TRUE);
    Make sure you generate it only once not on every frame.

  7. #7
    Regular Contributor
    Join Date
    Jan 2011
    Posts
    53

    Re: Anti aliasing

    sir, it gives an error that GL_GENERATE_MIPMAP is an undefined identifier... how to solve this ??? please guide me

  8. #8
    Regular Contributor
    Join Date
    Jan 2011
    Posts
    53

    Re: Anti aliasing

    sir, its not solving the problem....... actually what the problem is that the white lines in the model on maya3D are coming straight but when i load the model on emulator the whole texture distorts.......... please guide me through this..

  9. #9
    Registered User
    Join Date
    May 2006
    Location
    Germany
    Posts
    598

    Re: Anti aliasing

    Ok so you are using ES2 apparently. Use glGenerateMipmap instead.
    See: http://www.khronos.org/opengles/sdk/...rateMipmap.xml

  10. #10
    Nokia Developer Expert
    Join Date
    Oct 2008
    Posts
    40

    Re: Anti aliasing

    What phone model are you using?

    If you are using a phone with OpenGL ES 1.x and without 3D HW acceleration you should enable GL_PERSPECTIVE_CORRECTION_HINT if you are drawing big textures as adviced in this thread.

Similar Threads

  1. OpenGL anti-aliasing very costly on N8
    By lenclud in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2011-05-17, 16:18
  2. image resize with anti aliasing
    By ashwin.nath.m in forum Mobile Java General
    Replies: 0
    Last Post: 2009-07-22, 18:40
  3. Anti-aliasing
    By sirmic in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2008-02-13, 10:23
  4. Disabling Anti-Aliasing in Email Display
    By jmealins in forum General Development Questions
    Replies: 2
    Last Post: 2006-06-07, 17:01
  5. Replies: 0
    Last Post: 2005-04-04, 06:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×