Route Viewer into Winform?
4 posters
Page 1 of 1
Route Viewer into Winform?
I was hopeing to combine the Route Viewer with a text editor and change the parser code slightly in order to support instant preview, which might be very convenient for developers.
However I have no experience working with OpenGL and OpenTK and I was terribly confused when I found the Route Viewer used nearly the same code from the master program, which leads to plenty of extra and complicated features that are not very necessery for just a viewing tool. And also, the OpenTK's GameWindow design - That's a nightmare. It isn't implementing Winform at all and I have no idea how to change it into a Winform user control. I don't understand the logic of OpenTK very much. I fully understood this design is for platform compatibility and efficiency, but I am really stuck at there.
It is far more complicated that I thought. I wished a Route Viewer program to be a simple program reading route instructions, models and buffers into arrays and have the ability to change a proprty of a object instantly so editing a line won't cause the whole route to reload, and draws to a graphics handle. The program structure of OpenBVE is too complicated forr me to understand
However I have no experience working with OpenGL and OpenTK and I was terribly confused when I found the Route Viewer used nearly the same code from the master program, which leads to plenty of extra and complicated features that are not very necessery for just a viewing tool. And also, the OpenTK's GameWindow design - That's a nightmare. It isn't implementing Winform at all and I have no idea how to change it into a Winform user control. I don't understand the logic of OpenTK very much. I fully understood this design is for platform compatibility and efficiency, but I am really stuck at there.
It is far more complicated that I thought. I wished a Route Viewer program to be a simple program reading route instructions, models and buffers into arrays and have the ability to change a proprty of a object instantly so editing a line won't cause the whole route to reload, and draws to a graphics handle. The program structure of OpenBVE is too complicated forr me to understand
Re: Route Viewer into Winform?
Personally, I think writing a plugin for Notepad++ with syntax highlighting and a button to call RouteViewer/ObjectViewer with the current code would help more.
Winform is Windows only and thus not used here afaik.
The viewers and their code is a "historically grown" mess, you'll find rants by about everyone who touched the code in the last years
Winform is Windows only and thus not used here afaik.
The viewers and their code is a "historically grown" mess, you'll find rants by about everyone who touched the code in the last years
Quork- Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: Route Viewer into Winform?
Well I think it might be convenient when placing FreeObjs around the track. It might be hard to place them to a good-looking position in a single shot with precious visual distance measuring and traingular function calculation. I prefer to try adjusting the position several times and see when it looks fine, and I don't want to start the route viewer over and over.Quork wrote:Personally, I think writing a plugin for Notepad++ with syntax highlighting and a button to call RouteViewer/ObjectViewer with the current code would help more.
Winform is Windows only and thus not used here afaik.
The viewers and their code is a "historically grown" mess, you'll find rants by about everyone who touched the code in the last years
Or at least provide a way to interact a running instance of route viewer to alter the view position and the position of certain FreeObj? I have no idea.
Re: Route Viewer into Winform?
The short, (and for that matter) long answer is not without a very considerable amount of work.
The gamewindow itself isn't particularly necessary- It just provides a convenient way to access an openGL context and multi-platform windowing/ input system.
Fundamentally, speaking you can render onto any available openGL context, you'd just have to respin the update functionality slightly to remove it from the gamewindow loop and handle input yourself.
Altering the position of an object within the worldspace comes back to one of the fundamental design problems we've got at the minute:
The current code (essentially) creates a transformed clone of each base object within the worldspace. When we alter an object, all of the clones need to be updated.
There is however a syntax highlighter plugin for CSV routes available:
https://bveworldwide.forumotion.com/t87-openbve-syntax-highlighter-for-notepad
The gamewindow itself isn't particularly necessary- It just provides a convenient way to access an openGL context and multi-platform windowing/ input system.
Fundamentally, speaking you can render onto any available openGL context, you'd just have to respin the update functionality slightly to remove it from the gamewindow loop and handle input yourself.
Altering the position of an object within the worldspace comes back to one of the fundamental design problems we've got at the minute:
The current code (essentially) creates a transformed clone of each base object within the worldspace. When we alter an object, all of the clones need to be updated.
There is however a syntax highlighter plugin for CSV routes available:
https://bveworldwide.forumotion.com/t87-openbve-syntax-highlighter-for-notepad
Re: Route Viewer into Winform?
Simply, after modifications to objects and/or route files, save them and press F5 in the Route Viewer's window.zbx1425 wrote: I don't want to start the route viewer over and over
Similar topics
» All of a sudden - Route viewer and Object viewer not working
» route viewer
» route/object viewer
» Route Viewer for Openbve
» Extensions.cfg files in Object Viewer
» route viewer
» route/object viewer
» Route Viewer for Openbve
» Extensions.cfg files in Object Viewer
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum