![]() |
#1 |
Junior Member
Member
Join Date: Aug 2013
Location: London UK
Posts: 22
|
![]()
I have created a render callback for each object in my scene (using plugin in C/C++). The callback is called 8 times for each AC3D object (if 4 views are displayed) or twice per object if 1 view is on display. The callback argument 'is_primary_render' eliminates half of these callbacks.
I only want to get the callback once per redraw, so I would like either: to identify the window which is causing the callback OR have a type of callback which occurs before all views are updated. I think there would be many uses for the first option - perhaps 'is_primary_render' could be an integer to identify the ACView being redrawn (or 0 for updates that are not window related). |
![]() |
![]() |
![]() |
#2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
The existing callback can't be changed (I know the X-Plane plugin uses that).
It sounds like you probably want a callback that is called in a redraw_all(). What is it you are trying to accomplish? (i.e. if you are sending additional OpenGL commands, that could be complicated) |
![]() |
![]() |
![]() |
#3 |
Junior Member
Member
Join Date: Aug 2013
Location: London UK
Posts: 22
|
![]()
I have extra user-data on each object, and this needs to be interpreted once per redraw of the scene (all 4 windows will show same appearance).
If the update reported its window then I could detect the first redrawn window. However if only one view is on screen I only get 2 callback events and the window which updates the user-data might not be used (so I wont get the update). Geoff |
![]() |
![]() |
![]() |
#4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
You could try reading the opengl context to identify the current window/view. Under Windows, you should be able to use wglGetCurrentContext.
|
![]() |
![]() |
![]() |
Tags |
ac_plugin, callback, plugin |
Thread Tools | |
Display Modes | |
|
|