Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Soccer Ball Update

This thread is locked; no one can reply to it. rss feed Print
Soccer Ball Update
Scooter
Member #16,799
January 2018

Hi all:

On 9-17-2019 I made a post on this site concerning modeling a soccer ball

with allegro5 and opengl. Well it is 4 months later and I am still working

on this soccer ball. I am making some progress; this being my fifth try.

I have posted my code above in hopes that someone could offer me some help.

If you could run this code you will see that something weird is happening. I

believe you can follow it although it is done in the most crappy way. It could

be written nicer, but I did it this way to check each vertex.

I am using gluSphere and trying to attach the pentagons and hexagons, but

items in the rear are showing through in rotating. I don't know if this is

a legal way of doing this. I tried to make the sphere with triangles but had

NO LUCK!

It was coded on Ubuntu with Code::Blocks. Thanks for your time!!!!!!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Dude, please, those hard coded coordinates are going to kill you every time.

EDIT

All you need is ONE hexagon and ONE pentagon. Make the rest using transforms.

EDIT2
I got it to compile and run. Looks like a culling issue, and light position issue.

Scooter
Member #16,799
January 2018

Edgar:

Thanks for the reply!

I was thinking the same thing and tried everything to fix it

but had no luck as usual.

Do you have any idea how to fix this or should I start over again?

I finally got the vertices figured out and now another problem!

Oh the joy of programming!!!!!!!!!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Scooter
Member #16,799
January 2018

Edgar:

Man, that is great!!!!!!!!

THANK YOU! THANK YOU! THANK YOU!

You would NOT believe the sleepless nights I have had working on this!

It has been off and on for 4 months!

I am so excited I probably won't sleep tonight!

YOU ARE THE MAN!

As far as I know this is the first soccer ball on the internet using opengl!

Hope others can use this!

Thanks for your time on this! GREAT JOB!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: