Open PlutoniumHeart opened 10 years ago
The Dispose
methods are part of the IDisposable
interface so we have to implement both functions. See http://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx
// Dispose(bool disposing) executes in two distinct scenarios.
// If disposing equals true, the method has been called directly
// or indirectly by a user's code. Managed and unmanaged resources
// can be disposed.
// If disposing equals false, the method has been called by the
// runtime from inside the finalizer and you should not reference
// other objects. Only unmanaged resources can be disposed.
Its been a few years, but I believe object destructors (like in TextureNameGL3x, for example) may be called when no GL context is current, so FinalizerThreadContextGL3x
ensures a shared context is current so the GL resource can be deleted.
Also, @kring and I are not really maintaining this project other than merging the occasional pull request. If you are interested in an open-source web globe, we are working on Cesium.
Thank you very much for the reply, I understand that this code is not maintained any more, I was reading the book. By the way, when I read about the Tessellation part, I thought you guys are going to talk about the tessellation shader, but then the shader was not in the 3.3 core profile, do you think tessellation discussed in chapter 4 can be achieved by using tessellation shader in GL4?
Also I took a look at Cesium, I am not quite sure if I like WebGL or programming in a browser at all... And I am most familiar with C/C++, and only has limited knowledge about C# (That's why I am asking this simple question), and has no idea about Java at all. I followed the Cesium repository for sometime, and I can see it is very active, may be in time, I will start learning Java, and participate in it as well.
do you think tessellation discussed in chapter 4 can be achieved by using tessellation shader in GL4?
Definitely. Here's a good intro to tessellation shaders: http://prideout.net/blog/?p=48
Hi, I am going through the code in Source/Renderer/GL3x/Names folder, and noticed that the private methods used in those classes take a bool type input 'disposing' however this input is never used in this method. Is there a particular reason why it should take a bool type input?
I am also not quite sure why in the FinalizerThreadContextGL3x class we will have to create a NtiveWindow and GraphicsContext.
Thank you!