Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: How to draw a polygon in OpenGL ES ?

  1. #1
    Intern Newbie anime.igala.net's Avatar
    Join Date
    Jul 2008
    Location
    France
    Posts
    32

    How to draw a polygon in OpenGL ES ?

    Hello guys,

    I'm using OpenGL ES on Symbian. It does not support polygon primitive type.

    I'm wondering how can I draw a polygon in any shape, some thing like this:

    http://img188.imageshack.us/img188/3212/shape.png

    and I want to fill it with a texture, so I cannot use lines.

    Thanks,
    Relax in break time: http://igala.net
    Android Core http://androidcore.com

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,575

    Re: How to draw a polygon in OpenGL ES ?

    In standard OpenGL also, filled concave polygons like yours can not be drawn.
    Either you split it in triangles by hand, either you do that algorithmically (not sure how to do that efficiently though).

  3. #3
    Intern Newbie anime.igala.net's Avatar
    Join Date
    Jul 2008
    Location
    France
    Posts
    32

    Re: How to draw a polygon in OpenGL ES ?

    I found this page: http://codesuppository.blogspot.com/...-clipping.html

    But it does not work for me. Does any one have a working source? I don't want to redo from scratch.

    Thanks,
    Relax in break time: http://igala.net
    Android Core http://androidcore.com

Posting Permissions

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