#### Archived

This topic is now archived and is closed to further replies.

# OpenGL Drawing in OpenGL

This topic is 5962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi I am new in OpenGL Programming and I have only gone through some of the NeHe Tutorials(currently 11). What i want to know is that is there any tutorial(s) that teaches how to construct arcs and circles in OpenGL. Does anyone know what is the dimension of the window/display at different zoom level? Thanks Edited by - knight on March 19, 2002 3:54:10 AM

##### Share on other sites
Zoom level? What are you asking about? Being the programmer of the app, you are the one who sets the dimensions of the screen, so I would assume you already know... Unless I am reading the question wrong.

Oh well,
Landsknecht

##### Share on other sites
knight: about that zoom..?! you should have know that or you did not read tutorials enough deep and also understand them so that you could make same thing now without help.

circles, red book has a piece of code about them, this will more or less be copied from there:
----------------

#define PI 3.14159265
#define circle_points 100

GLint angle;

glBegin(GL_LINE_LOOP);
for (int i=0; i{
angle=2*PI*i/circle_points;
glVertex2f(cos(angle),sin(angle));
}
----------------

[edited by - kren on March 19, 2002 3:05:25 PM]

##### Share on other sites
Thanks anyway
Regarding the zoom, what i meant was that if
for example i use glTranslate(0.0f,0.0f,-0.5f), There are more spaces available than using glTranslate(0.0f,0.0f,0.0f) so how is this space calculated?
Are there any online tutorials for ARC and CIRCLES?

[edited by - knight on March 19, 2002 8:41:36 PM]

##### Share on other sites
Thanks Kren
But what I want is just a simple circle ... I don''t want a circle that is made up of polygons and there an error in the for loop so what should the i variable be limited to?
Is the simple circle possible?

##### Share on other sites
no. there are no circles. what do you need if for? HUD? you can draw a circle to a texture and render the texture in ortho projection. if you need to know how to draw a circle, look up bresenham''s circle algorithm.

1. 1
Rutin
19
2. 2
JoeJ
15
3. 3
4. 4
5. 5

• 24
• 20
• 13
• 13
• 17
• ### Forum Statistics

• Total Topics
631700
• Total Posts
3001778
×