Howto:Use a Camera View in an Instrument: Difference between revisions

Jump to navigation Jump to search
m
Correct list formatting
(Short introduction to od_gauge)
m (Correct list formatting)
Line 50: Line 50:


Using it would be something like this:
Using it would be something like this:
- Create a custom instrument which inherits od_gauge. class CameraInstrument : public FGODGauge { ... }
 
- Implement the init and update functions, whatever instrument manager requires.
* Create a custom instrument which inherits od_gauge. class CameraInstrument : public FGODGauge { ... }
- In init set up proper texture sizes and call allocRT().
* Implement the init and update functions, whatever instrument manager requires.
- In update function update camera position according to viewer->getAbsolutePosition(...).
* In init set up proper texture sizes and call allocRT().
- Add the custom instrument to instrument_mgr.cxx.
* In update function update camera position according to viewer->getAbsolutePosition(...).
* Add the custom instrument to instrument_mgr.cxx.


=Part 2: Getting that texture into an instrument=
=Part 2: Getting that texture into an instrument=
46

edits

Navigation menu