Hello,
I am porting over some of our OpenGL code which renders some triangle facets (similar to STL).
In OpenGL, we use the glBegin statement, set to triangle type, and add the 3 vertexes, and finally call glEnd statement.
I'm using VB6 and DG kernel OCX, using iDraw entity. It works for Points, Lines, but it does not work for triangles?
Any assistance you can provide? Here is my approach...
Set IModel = picDGViewer.GetModel()
Set m_iDraw = IModel
Call m_iDraw.PushAttrib
Call m_iDraw.Begin(eTrianglesDG)
for i = 0 to MyFacetCount - 1
Call m_iDraw.Vertex(vert1(0), vert1(1), vert1(2))
Call m_iDraw.Vertex(vert2(0), vert2(1), vert2(2))
Call m_iDraw.Vertex(vert3(0), vert3(1), vert3(2))
next i
Call m_iDraw.end
Call m_iDraw.PopAttrib
picDGViewer.UpdateView
Rendering iDraw Triangles...
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Rendering iDraw Triangles...
Hello
Sorry for the late answer.
It should work. I will dig a little deeper and post something here shortly.
Regards
Sorry for the late answer.
It should work. I will dig a little deeper and post something here shortly.
Regards
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Rendering iDraw Triangles...
My quick test does show a problem in a C# test. We will fix it shortly. It might not be related to your issue. I need to dig a little deeper to reproduce it on a native DGK.
Meanwhile: IDraw_DG was intended to draw only few auxiliary items. For anything other than a tiny mesh, a direct definition using mesh-related interfaces IMesh_DG, etc. are recommended. See Morph sample for the code. Logic in your app should be pretty close.
Regards
Meanwhile: IDraw_DG was intended to draw only few auxiliary items. For anything other than a tiny mesh, a direct definition using mesh-related interfaces IMesh_DG, etc. are recommended. See Morph sample for the code. Logic in your app should be pretty close.
Regards
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Rendering iDraw Triangles...
Yes. The native control has also the problem.
There should be an update with a fix soon.
Thanks for reporting.
Code: Select all
void IDraw_DGTest::Triangles()
{
IDraw_DGPtr iDraw = m_iModel;
IEntity_DGPtr iEntity;
iDraw->Begin(DrawPrimitive_DG::eTrianglesDG);
iDraw->Vertex(0, 0, 0);
iDraw->Vertex(1, 0, 0);
iDraw->Vertex(0, 1, 0);
iDraw->End(&iEntity);
m_view->Reset(true, true);
}
Thanks for reporting.
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Rendering iDraw Triangles...
Done.
5385 (or later) is the update number.
It works now in both native and DGKC editions.
Thanks for reporting.
5385 (or later) is the update number.
It works now in both native and DGKC editions.
Thanks for reporting.