Flightgear getting started9/19/2023 ![]() An effect in FlightGear is basically a set of XML files using the PropertyList format that is processed by the FlightGear/SimGear effects system to map effects to shaders using an inheritance mechanism, conditions and of course properties. What is most relevant are the pointers to effects and shaders. Like Stuart said, by default (without any patches applied), the Canvas pointers you have found are unlikely to be relevant "as is". Realistically, all Canvas textures are however instantiated/updated using scripting space hooks that end up writing to the corresponding properties in the global property tree, this makes it much easier to manipulate a canvas/element, because you don't need to do any low-level getprop/setprop stuff, but can directly use an element specific API. So far, all of this is handled using native code that watches the global /canvas tree in the property tree - there is a canvas manager that handles events and passes them onto the corresponding canvas instance and its child elements. an invisible RTT context - to become actually visible, you need to add a so called "placement" - this tells the rendering engine to look up a certain canvas and add it to the scene/cockpit or the GUI (dialogs/windows). And that's basically about it (with a few exceptions that handle use-case specific stuff like 2D mapping/charts).Īpart from that, the main thing to keep in mind is that a Canvas is really just a FBO - i.e. stuff like a raster image can be added to a Canvas group, a text string/font, and 2D drawing primitives in the form of OpenVG instrutions mapped to ShivaVG. And then there is a single top-level root group, which serves as the top-level element to keep other Canvas elements.Ī Canvas element is nothing more than a rendering primitive that the Canvas system can handle - e.g. Which is to say each Canvas has a handful of well-defined property names (and types) that it is watching to handle "events" - think stuff like changing the size/view port etc. Regarding your questions (actually, only #3 and #4) - the patch you have found is experimental, it will basically look up a view and dynamically add a slave camera to the renderer that renders the whole thing to a Canvas, a Canvas is a fancy word for a RTT/FBO context in FlightGear that can be updated by using a property-based API built on top of the property tree in the form of events/signals that are represented via listeners. icecode Posts: 667 Joined: Thu 1:17 pm Location: Spain Version: next OS: Thumbleweed I guess that'd be better than starting from zero. If you are interested feel free to contact me so I can share with you some code and pointers/ideas that I've been collecting along the way. For shader support it'd use the current effects framework, and to display stuff on the screen it'd either use Canvas or a OSG window directly. It'd be node based, heavily inspired by Blender, Ogre3D and other modern game engines. ![]() It would feature a fully configurable pipeline based on RTT, of course allowing direct forward rendering without any RTT if you so desire. ![]() Instead, we can base the rendering framework on the property system via PropertyBasedElement. If you dig deep enough and are familiar with OpenGL/3D rendering as you say, you'll quickly find that Canvas doesn't provide enough flexibility to do that. Hooray initially wanted to base the entire rendering framework on Canvas. ![]() In fact I think it can be done much more easily than the Canvas implementation a few years ago. Rewriting the FG rendering framework is not an easy task but it can be done. I've exchanged several PMs with Hooray on the matter, who has been proven to be very helpful when it comes to Canvas. I've been quite interested in this subject lately.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |