I Don't Watch 3D Fund, But....

The Partridge Family were neither partridges nor a family. Discuss.
goldengamesTM

Re: I Don't Watch 3D Fund, But....

Post by goldengamesTM » December 9th, 2017, 4:04 pm

Well, I Was testing the same code as chili and it did not work, and I don't think that's why.
I could be wrong, so I'll give it a try.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: I Don't Watch 3D Fund, But....

Post by albinopapa » December 9th, 2017, 6:57 pm

Ok, I might see the problem, slope ( m ) and intercept ( b ) should be float, not int which also means dx and dy should be float so you don't lose the fraction part of the division result. Don't just cast the result, you need to make dx and dy floats.

Code: Select all

void DrawLine(int x1, int y1, int x2, int y2, Color c)
{
     float dx = static_cast<float>( x2 - x1 );
     float dy = static_cast<float>( y2 - y1 );
     float m = dy / dx;
     float b = y1 - m*x1;
     for (int x = x1; x <= x2; x++)
     {
          int y = m*x + b;
          PutPixel(x, y, c);
     }
}
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

goldengamesTM

Re: I Don't Watch 3D Fund, But....

Post by goldengamesTM » December 9th, 2017, 11:04 pm

Thanks I’ll try

goldengamesTM

Re: I Don't Watch 3D Fund, But....

Post by goldengamesTM » December 10th, 2017, 12:41 am

What the Heck!?!??!!? I can only draw a horizontal line!!!!!
Last edited by goldengamesTM on December 12th, 2017, 2:29 pm, edited 2 times in total.

User avatar
DicheBach
Posts: 22
Joined: December 11th, 2017, 3:29 pm
Location: recurring

Re: I Don't Watch 3D Fund, But....

Post by DicheBach » December 11th, 2017, 3:45 pm

You should just watch his videos. All of them. Five times.
1. 100% speed and take notes
2. 100% speed and use pause to follow in your own VS studio
3. 50% speed, paying attention to whatever you didn't fully get last time
4. 100% speed with your eyes closed and hand on your joystick
5. 200% speed

These are the rituals of the pure and true Chili Minion.
The greatest joy a man can know is to conquer his enemies & drive them before him.
To ride their horses & take away their possessions. To see faces of those who were dear
bedewed with tears & clasp their wives & daughters to his arms.

goldengamesTM

Re: I Don't Watch 3D Fund, But....

Post by goldengamesTM » December 11th, 2017, 6:51 pm

Thank You, But I Can't Watch Any Chili Vids Except Old Ones. ( No 3D Fund, Or Normal Tutorials From Beginner No.0 And On)
Last edited by goldengamesTM on December 12th, 2017, 2:32 pm, edited 3 times in total.

cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Re: I Don't Watch 3D Fund, But....

Post by cameron » December 12th, 2017, 12:02 am

I think you should reconsider watching chillis videos. However, if you don't want to do that, I recommend uploading a ziped solution for your project to get help.

P.S. I recommend being more respectful as people will be less likely to help if you swear at them when they give you a solution you don't want.
Computer too slow? Consider running a VM on your toaster.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: I Don't Watch 3D Fund, But....

Post by chili » December 12th, 2017, 1:15 am

P.P.S. I recommend being more respectful to people, especially people like DicheBach. I mean, have you seen the dude's signature? That's some Robert E. Howard shit right there.
Chili

User avatar
DicheBach
Posts: 22
Joined: December 11th, 2017, 3:29 pm
Location: recurring

Re: I Don't Watch 3D Fund, But....

Post by DicheBach » December 13th, 2017, 2:40 pm

In the name of Crom and his Archangel Chili of the C++ . . .
https://www.youtube.com/watch?v=OBGOQ7SsJrw
The greatest joy a man can know is to conquer his enemies & drive them before him.
To ride their horses & take away their possessions. To see faces of those who were dear
bedewed with tears & clasp their wives & daughters to his arms.

goldengamesTM

Re: I Don't Watch 3D Fund, But....

Post by goldengamesTM » December 14th, 2017, 6:34 am

Ok, So I Have The Triangles, I Have The Wireframe, But Now I Need To Learn How To Fill The Triangles. I Want To Fill Them One Of 2 Ways:
1. I Want To Keep Drawing Triangles Of Slightly Smaller Dimensions Each Time
2. I Can Make Lines That Fill Up The Triangle And Get Smaller Each Time
But, There's A Problem, I Don't Know How To Detect The Edges Of The Triangle...

Post Reply