Question

i am new to this core graphics or cv . I need a little help here. Can you plz guide me how to draw an image using openGL ES with my own cordinates or any other idea...

consider my points are topleft (40,160) topRight(80,160) bottomLeft(0,40) bottomRight(160,40)

i want my image to be drawn with in these points..... Plz help me... i will be really thankful to you guys....

Was it helpful?

Solution

You need to load your image into an OpenGL texture and then display the texture at the vertices you specify. Note that the texture width and height needs to be a power-of-2, so you'll have to pad the margins and adjust your vertices to get the correct placement if the image is not power-of-2. Apple has a great example of this in the GLSprite sample code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top