Drawing in OpenGL

Started by
4 comments, last by knight 22 years, 1 month ago
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
Advertisement
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
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.
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]
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?
Thanks for your help

[edited by - knight on March 19, 2002 8:41:36 PM]
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?
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.

This topic is closed to new replies.

Advertisement