BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Route Viewer into Winform?

4 posters

Go down

Route Viewer into Winform? Empty Route Viewer into Winform?

Post by zbx1425 Fri May 18, 2018 1:21 pm

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 Sad
zbx1425
zbx1425

Posts : 143
Join date : 2017-08-18
Location : China

https://www.zbx1425.cn

Back to top Go down

Route Viewer into Winform? Empty Re: Route Viewer into Winform?

Post by Quork Sat May 19, 2018 8:31 am

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
Quork
Quork

Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union

Back to top Go down

Route Viewer into Winform? Empty Re: Route Viewer into Winform?

Post by zbx1425 Sat May 19, 2018 11:14 am

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
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.
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.
zbx1425
zbx1425

Posts : 143
Join date : 2017-08-18
Location : China

https://www.zbx1425.cn

Back to top Go down

Route Viewer into Winform? Empty Re: Route Viewer into Winform?

Post by leezer3 Sat May 19, 2018 12:23 pm

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

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Route Viewer into Winform? Empty Re: Route Viewer into Winform?

Post by tof63 Fri Jun 01, 2018 10:45 pm

zbx1425 wrote: I don't want to start the route viewer over and over
Simply, after modifications to objects and/or route files, save them and press F5 in the Route Viewer's window.
tof63
tof63

Posts : 40
Join date : 2012-05-08
Location : Turin (Italy)

http://bve.altervista.org/index.html

Back to top Go down

Route Viewer into Winform? Empty Re: Route Viewer into Winform?

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum