Drawing a textured polygon

Problems with Canvas, OpenGL, etc...

Drawing a textured polygon

Postby jgibbs » Fri Jan 20, 2012 12:13 pm

Hi, I'm messing around with a game idea at the moment and I'm trying to figure out a good way to skin a variable height ground object that is part of a box2d world.

For now I've stapled together a chain of linebodies and linked them to Line objects which has the desired physical results and matches up the lines to the objects interacting with the ground, but I know this isn't going to work out once I need to paint up the scene.

My immediate thought is that I would like to create 4 sided polygon segments that have a common base hieght that extends below the screen and a top of varying heights. I can create the polygon object with box2D, but is there any way to make a sprite or some other attachable graphics object that can stretch it's bitmap out to the 4 corners of the polygon?

Any help or alternative ideas would be appreciated.
Posts: 4
Joined: Sat Apr 23, 2011 10:07 am


Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 3 guests