Drawing shapes opengl es
Hello everyone,
Im currently having a problem i need to solve, so basically at the moment im drawing a series of lines to create a shape. This works fine but I now want to fill in the shape, whats the best way to do this? I know open gl es doesnt support GL_FILL
Could someone please point me in the right direction, heres the code im using atm if anyone needs it. Im looping through and drawing one of these lines for each one i need to ultimately make a single shape.
Thanks for any help
Im currently having a problem i need to solve, so basically at the moment im drawing a series of lines to create a shape. This works fine but I now want to fill in the shape, whats the best way to do this? I know open gl es doesnt support GL_FILL
Could someone please point me in the right direction, heres the code im using atm if anyone needs it. Im looping through and drawing one of these lines for each one i need to ultimately make a single shape.
Code:
GLfloat vVertices[] = {lsx, lsy, 0.0f, lfx, lfy, 0.0f};
glLineWidth(3*endGameScale);
glVertexPointer(3, GL_FLOAT, 0, vVertices);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawArrays(GL_LINES, 0, 2);
Thanks for any help
GL_TRIANGLE_FAN might do what you want.
Thanks for the tip, GL_TRIANGLE_STRIP ended up the best choice, thanks for the help
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
OpenGL Cube drawing: VBOs, instanced geometry, octrees | Symbol$ | 5 | 13,272 |
Dec 23, 2011 01:43 PM Last Post: Skorche |
|
Chipmunk physics accessing shapes in multiple methods issue | JinnoRb | 0 | 2,955 |
Mar 24, 2010 11:53 AM Last Post: JinnoRb |
|
Drawing menu versus drawing game | johncmurphy | 4 | 6,254 |
Jan 6, 2010 09:14 AM Last Post: AnotherJake |
|
OpenGL ES : Drawing Text... | savage | 8 | 14,210 |
Jan 4, 2010 08:59 PM Last Post: alerus |
|
Drawing Anti-Aliased Shapes With Open GL | muleskinner | 4 | 5,684 |
Nov 17, 2009 10:01 AM Last Post: warmi |