OpenGL Tutorial 12 - Drawing A Circle Using A Triangle Fan

preview_player
Показать описание
🚀 Get 100% Off Your First Month with CustomGPT! 🚀

Sign up for a Standard CustomGPT.ai subscription using my referral link and enjoy 100% off your first month. Plus, you'll help support my channel with a 15% commission at no extra cost to you!

If you like this stuff, as always, show the love through comments, likes, favorites, subscriptions, etc.

Thousands of free videos at

If you have any questions feel free to post them at

Our Website

Our games made using Cocos2d-x
------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

Thanks for the video. Bu I had error with these lines:
GLfloat
GLfloat
GLfloat


GLfloat * 3];

the error is (Error C3863 array type 'GLfloat [numberOfVertices*]' is not assignable) .

thelegend
Автор

Thanks for this video. Love the drawing board explanation.

AnObj
Автор

How do you change the colour of the circle?

VibhaMasti
Автор

I can't really understand these lines:

for(int i=1; i<numberofvertices; i++)
{
arrayX[i]= x + (radius * cos(i* (doublepi/numberofsides) ));

arrayY[i]= y + (radius * sin (i* (doublepi/numberofsides) ));

arrayZ[i]= z;
}

what would had happen if I would want to draw a sphere, what would had happen to arrayZ[i] in this case?
Also, why is it necessary to multiply radius with cos(i* (doublepi/numberofsides) ), it's hard for me to find it's logic... Thank you in advance!

drcvagos-iu
Автор

well i have problem with your source code on my Visual Studio 2015
on this part
"expression must have a constant value"

GLfloat
GLfloat
GLfloat

YaHoMaKo
Автор

Sonar Systems your channel is very good and i like your videos too :) i subscribed

COLORPAPERPRINCESS
Автор

GLfloat

numberOfVertices is giving me an error of expression must have a constant value.

johnquebec
Автор

How to convert allCircleVertices to NDC values i, e -1 to 1 range as iam not using glviewport

kareemunnisabegum
Автор

Thanks a lot for the video and your work.
I want to draw a rectangle where its distance from centre differs every time..so here r*cos and r*sin doesnt work..how to create?

rajurambha
Автор

how can I color the circle or the shape? (Im using lwjgl 2.9.4 java)

fls
Автор

Hey! Great video! Are you using OpenGL 3 or 2?

caiquecoelho
Автор

How can we change the colors of circles?

fatihbaba
Автор

ok so when using visual studio the compiler wont let you set the number of elements in an array to a number that isnt a constant. this is pretty common knowledge because its unsafe, i dont know which compiler you're using that lets you get away with that but it isn't great.

leetlemahn
Автор

Finally got it to work, but I have no idea how the math parts of drawCircle() work.

receperdogan