   glDrawElements for circle, ring etc
  HiI've got 2 questions here.1> I know glBegin() is depreciated. What about gluDisk(), ie. does it use glBegin?2> I use gluDisk() to draw rings, circles etc. Is there an easy to use glDrawElements to draw these shapes?Thanks in advance.   
  1) Yes I believe all the glu stuff is deprecated (not depreciated)2) You can use glDrawElements to draw these for you, you just have to use some geometry to define the vertices yourself just like any other mesh. All this stuff is deprecated to strip the driver down to barebones what is necessary, if you want to avoid deprecated stuff you have to do some more work on your end.   ;Quote:Original post by karwosts1) Yes I believe all the glu stuff is deprecated (not depreciated)2) You can use glDrawElements to draw these for you, you just have to use some geometry to define the vertices yourself just like any other mesh. All this stuff is deprecated to strip the driver down to barebones what is necessary, if you want to avoid deprecated stuff you have to do some more work on your end.My program draws many partial rings with different sizes, diameters etc.. Generating the vertices and indices for these rings using the maths is really a pain in the ass. Sigh...Apart from using glDrawElements, are there any other way to do draw partial rings without touching the deprecated functions?   ;  Nah its pretty much glDrawElements/glDrawArrays for everything now.If each ring is just a different size then you can just use model matrix to scale it, if you want to do things like change the thickness of the ring it shouldn't be to difficult to have a function that generates the vertices based on parameters: (generateRingVertices(float width, float thickness, etc))Also if you really think you need to keep some of the deprecated functions it isn't the end of the world. Sure it feels good to be clean but in practicality I don't think it will make much difference.   ;  GLU is not part of OpenGL, hence it can't be deprecated;Quote:Original post by karwostsNah its pretty much glDrawElements/glDrawArrays for everything now.If each ring is just a different size then you can just use model matrix to scale it, if you want to do things like change the thickness of the ring it shouldn't be to difficult to have a function that generates the vertices based on parameters: (generateRingVertices(float width, float thickness, etc))Also if you really think you need to keep some of the deprecated functions it isn't the end of the world. Sure it feels good but in practicality it won't make much difference.To be honest, i am still using the "gluDisk" -- the deprecated function in my program. And it works fine.The thing I am not quite understand is how much trouble the deprecated functions could cause.I have a game which I made 4 years ago and I used many display lists in the game. The game now still runs fine in the laptop that I wrote the codes. But the speed varies a lot in other computers. It runs extremely slowly on my new computer (win xp) and 3 friends' computers (1 of which is win7). I thought that would because I used the deprecated display lists?   ;Quote:Original post by HuntsManGLU is not part of OpenGL, hence it can't be deprecatedSo, it is absolutely no problem if i use the gluDisk to generate my rings?   ;Quote:GLU is not part of OpenGL, hence it can't be deprecatedI do assume though that it uses immediate mode rendering though? I'm assuming glu isn't building vbo's and shaders to draw it's sphere. I thought it was just an abstraction layer that fires off a bunch of immediate mode vertices.If you use the core profile I wouldn't expect it to work, but I could be wrong.;Quote:Original post by karwostsQuote:GLU is not part of OpenGL, hence it can't be deprecatedI do assume though that it uses immediate mode rendering though? I'm assuming glu isn't building vbo's and shaders to draw it's sphere. I thought it was just an abstraction layer that fires off a bunch of immediate mode vertices.If you use the core profile I wouldn't expect it to work, but I could be wrong.I also understand it as a 'high level' api that provide convenient usages. Then if the immedate mode is deprecated, I would guess the guys who made glu package could also possibly change the implementation of the glu code from immediate mode to VBOs. Right? The problem is how would we know what mode they used?   ;  From opengl.org:Quote:GLU - the OpenGL Utility library is an additional library that contains a handful of functions for additional tasks.It was traditional and can be found in a lot of tutorials and examples. But GLU uses a lot of OpenGL features that are deprecated now.The internal projection matrix should not be used anymore, so the programmer should use a replacement for gluPerspective, that instead of updating the internal projection matrix will return this matrix.gluPerspective's source code is very simple and can be replaced easily.The code here comes from glh library (OpenGL Helper Library), LGPL license https://sourceforge.net/projects/glhlibAnyway if you want to use gluDisk then use it and use compatibility profile.   