Polygon primitive

  ... discussions about development with the GLES2 branch of AndEngine.

Re: Polygon primitive

Postby recastrodiaz » Tue Feb 28, 2012 7:05 pm

Cloning Andengine's github repo from a console is very easy (given you've installed git first):

git clone git://github.com/nicolasgramlich/AndEngine.git

You also need to fetch my git branch, as polygon support is not part of the official repo yet:

[cd AndEngine]
git remote add polygonsupport git://github.com/recastrodiaz/AndEngine.git
git fetch polygonsupport

Finally merge my GLES2 branch with yours:

git merge polygonsupport/GLES2

You should now be able to draw polygons.
recastrodiaz
 
Posts: 26
Joined: Mon Aug 22, 2011 11:32 pm
Location: Lyon, France

Re: Polygon primitive

Postby gst » Tue Feb 28, 2012 7:24 pm

Thanks, I realized that I was working with GLES1.0 repository, not GLES20.
I installed git on my Eclipse and cloned AndEngine.
I also installed the 4.03 Android API so I get some errors.

But now after installing this one, I have again errors with AndEngine:

"Description Resource Path Location Type
GINGERBREAD cannot be resolved or is not a field SystemUtils.java /PolygonTest/AndEngine_src/org/andengine/util/system line 32 Java Problem"

Four errors like this:
"Description Resource Path Location Type
HONEYCOMB_MR2 cannot be resolved or is not a field VertexBufferObject.java /PolygonTest/AndEngine_src/org/andengine/opengl/vbo line 66 Java Problem"

"Description Resource Path Location Type
ICE_CREAM_SANDWICH cannot be resolved or is not a field SystemUtils.java /PolygonTest/AndEngine_src/org/andengine/util/system line 34 Java Problem"

Two like this:
"Description Resource Path Location Type
SCREEN_ORIENTATION_SENSOR_LANDSCAPE cannot be resolved or is not a field BaseGameActivity.java /PolygonTest/AndEngine_src/org/andengine/ui/activity line 396 Java Problem"

and more similar errors....I missing something.

And about the git commands you posted...How can I execute them?

Thanks
gst
 
Posts: 10
Joined: Thu Feb 23, 2012 1:57 pm

Re: Polygon primitive

Postby RealMayo » Tue Feb 28, 2012 7:28 pm

Your errors are because when you installed the Android APK you did not choose all of the different API levels. You need to select and install almost all of the APIs.
User avatar
RealMayo
 
Posts: 1681
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Polygon primitive

Postby gst » Tue Feb 28, 2012 7:32 pm

Ok, I solved the errors. I had the old AndEngine linked with my test project.

Well, I will try to do the other things. :roll:
gst
 
Posts: 10
Joined: Thu Feb 23, 2012 1:57 pm

Re: Polygon primitive

Postby recastrodiaz » Tue Feb 28, 2012 7:35 pm

gst wrote:And about the git commands you posted...How can I execute them?

I use Git Bash on windows (comes bundled with the official git release)
Any decent console on linux should do the job.
recastrodiaz
 
Posts: 26
Joined: Mon Aug 22, 2011 11:32 pm
Location: Lyon, France

Re: Polygon primitive

Postby gst » Wed Feb 29, 2012 12:48 am

Ok, after merging the branches and opening Eclipse, now I have errors within the Polygon.java file.
gst
 
Posts: 10
Joined: Thu Feb 23, 2012 1:57 pm

Re: Polygon primitive

Postby recastrodiaz » Wed Feb 29, 2012 8:26 am

That's because you also need the AndEnginePhysicsBox2DExtension

git clone git://github.com/nicolasgramlich/AndEng ... ension.git

Open it up in your Eclipse workspace and add it to your AndEngine's project classpath. (Eclipse should propose this autofix).
This weird dependency should disappear once the code is merged into the main Nicholas' branch.
recastrodiaz
 
Posts: 26
Joined: Mon Aug 22, 2011 11:32 pm
Location: Lyon, France

Re: Polygon primitive

Postby RealMayo » Wed Feb 29, 2012 4:30 pm

recastrodiaz wrote:This weird dependency should disappear once the code is merged into the main Nicholas' branch.

When does Nicolas plan to do that?
And will Nicolas also merge in the Box2dDebugDraw code?
Thanks
User avatar
RealMayo
 
Posts: 1681
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Polygon primitive

Postby gst » Wed Feb 29, 2012 6:06 pm

Ok, finally I compiled the andengine and the extension.
I think I was doing something wrong when cloning and then mergin the repositories.

Now I'm testing the PolygonExample.java, but with no results at the moment.

Thanks for the previous help!
gst
 
Posts: 10
Joined: Thu Feb 23, 2012 1:57 pm

Re: Polygon primitive

Postby RealMayo » Tue Mar 06, 2012 5:13 am

Hi Rodrigo,
I finally had a chance to play with your PolygonExample and it is awesome!
But I have a problem... when I copy that example code into my own project, the image does not repeat inside the TexturedPolygon. Instead the image stretches to fit the TexturedPolygon :( Do you have any idea why this is happening?
User avatar
RealMayo
 
Posts: 1681
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

PreviousNext

Return to GLES2

Who is online

Users browsing this forum: Alexa [Bot], kern0, mancasal, RonScript, Yahoo [Bot] and 31 guests