R12: DrawViews does not redraw anymore
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/09/2010 at 08:04, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ; Mac ;
Language(s) : C++ ;---------
Hi,I'm in the process of updating my plugins for R12, and it's mostly going well so far.
Except, when i call DrawViews from within MouseInput:
Bool PolyPaintTool::MouseInput(BaseDocument *doc, BaseContainer &data, BaseDraw *bd,EditorWindow *win, const BaseContainer &msg){ . . while(win->MouseDrag(&dx,&dy,&device)==MOUSEDRAG_CONTINUE){ . // manipulate active object's poly points . DrawViews(DRAWFLAGS_ONLY_ACTIVE_VIEW |DRAWFLAGS_NO_THREAD |DRAWFLAGS_NO_ANIMATION); } // END DRAG LOOP . . } END MouseInput
Problem is that the Viewport is not updated anymore, which was the case with previous SDK versions.
My Toolplugin manipulates polygon points of the active Object, but now you cannot see the change, and neither my helper lines/Points (Line3D/Handle..) until after you have finished dragging the mouse.. So it seems that my Draw(..) is not called at all..
Does this have to do with the openGL changes maybe ?
Do i maybe have to set the Matrix here inside MouseInput, before calling DrawViews, as well ?
I did that in my Draw(..) funtion already, and when when I'm not dragging or clicking with the LMB, my handles and lines are drawn fine.thx,
Daniel -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/09/2010 at 10:29, xxxxxxxx wrote:
ok now i know why it doesnt work.
It was not due to Draw(..) not being called but because 'Enhanced OpenGL' was turned on under Display Options.When echancedOGL is turned off, the object gets updated just fine in the viewport, but when its turned on, I dont see the change until i finish the mouse drag.
After looking in the simpleSculpting SDK example and the R12 API, it seems to me that i need to mess around with the VBO to refresh the graphics card memory or sth, when in enhanced OGL mode ...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/09/2010 at 04:33, xxxxxxxx wrote:
I have it working now, but it had nothing to do with the VBO stuff.
Actually it seems i just needed another obj->Message(MSG_UPDATE) at some point to make it work during mouseInput.. ..
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/09/2010 at 00:46, xxxxxxxx wrote:
Yes, after every change to an object's geometry you have to send a MSG_UPDATE.
cheers,
Matthias