PDA

View Full Version : Create rectangle using openGL ES 1.1



Naseeb Panghal
08-11-2015, 08:18 AM
Hello Everyone,

Very basic question.
How to create Rectangle using openGL ES 1.1. I have searched a lot over the internet.

Please someone share the sample code if already handy with you to draw Rectangle.

Thanks
Naseeb Panghal

mhagain
08-11-2015, 09:42 AM
I could just give you code but I don't believe that you would learn anything from it, so instead have a look at:

glEnableClientState: https://www.khronos.org/opengles/sdk/1.1/docs/man/glEnableClientState.xml
glVertexPointer: https://www.khronos.org/opengles/sdk/1.1/docs/man/glVertexPointer.xml
glDrawArrays: https://www.khronos.org/opengles/sdk/1.1/docs/man/glDrawArrays.xml

Introduction to vertex arrays: https://www.opengl.org/sdk/docs/tutorials/CodeColony/vertexarrays.php

Naseeb Panghal
08-11-2015, 10:35 PM
I could just give you code but I don't believe that you would learn anything from it, so instead have a look at:

glEnableClientState: https://www.khronos.org/opengles/sdk/1.1/docs/man/glEnableClientState.xml
glVertexPointer: https://www.khronos.org/opengles/sdk/1.1/docs/man/glVertexPointer.xml
glDrawArrays: https://www.khronos.org/opengles/sdk/1.1/docs/man/glDrawArrays.xml

Introduction to vertex arrays: https://www.opengl.org/sdk/docs/tutorials/CodeColony/vertexarrays.php

Thanks mhagain!!!
I will look into links.

Best Regards,
Naseeb Panghal