<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hello,<br>I am looking for an example or some general comments, how I can extend the vtkOpenGLRenderWindow for a very special OpenGL library (vtkXOpenGLRenderWindow is not applicable, because I want to run VTK on an embedded system with a custom window system).<br><br>Currently I am more or less duplicating vtkXOpenGLRenderWindow with changes where necessary to account for the window system that replaces X11. Compilation of the new class vtkNewOpenGLRenderWindow is successful.<br><br>Unfortunately the following call in a VTK application always results in renWin being a vtkXOpenGLRenderWindow, not the desired vtkNewOpenGLRenderWindow:<br><br>vtkRenderWindow *renWin = vtkNewOpenGLRenderWindow::New();<br><br>The reason is that New() is inherited from vtkRenderWindow::New(), which calls
vtkGraphicsFactory::CreateInstance("vtkRenderWindow") which finally executes "return vtkXOpenGLRenderWindow::New();".<br><br>Is it necessary to dig through the vtkRenderWindow hierarchy and replace each occurrence of vtkXOpenGLRenderWindow with vtkNewOpenGLRenderWindow?<br>Or is there a way with less modifications of the vtk sources, for example overriding vtkNewOpenGLRenderWindow::New(), but how does it have to look like? I found that I cannot simply ignore the chain of calls down to vtkGraphicsFactory::CreateInstance(), but on the other hand my impression is that it is unnecessarily complicated if I have to modify several classes if all I want is to derive from vtkOpenGLRenderWindow.<br><br>Any comments are appreciated!<br><br>Thank you in advance<br>cryo<br></div></div><br>
<hr size=1>You rock. That's why Blockbuster's offering you <a href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com">one month of Blockbuster Total Access</a>, No Cost.</body></html>