[Ves] [Resolved] Not displayed all data but cturtle.vtp

Mansoo Kim to.mansoo at gmail.com
Fri Jun 13 03:27:55 EDT 2014


Hi, Aashish Chaudhary

I found what's wrong.
The below code have the bug related to this error.

//-----------------------------------------------------------------------------
vesSharedPtr<vesGeometryData> vesKiwiDataConversionTools::Convert(
  vtkPolyData* input)
{
  const vtkIdType maximumNumberOfPoints = -1;

  if (input->GetNumberOfPoints() > maximumNumberOfPoints) {
    return vesKiwiDataConversionTools::GenericConvert<unsigned int>(input);
  }
  else {
    return vesKiwiDataConversionTools::GenericConvert<unsigned
short>(input);
  }
}

maximumNumberOfPoints is set by -1.
This code always convert  indices into "unsigned int" type.

Samsung Galaxy S2 may not support unsigned-int-typed indices. So the below
function could not draw any triangles.

void vesMapper::drawTriangles(const vesRenderState &renderState,
                              vesSharedPtr<vesPrimitive> triangles)
{
......
      glDrawElements(triangles->primitiveType(), numberOfIndicesToDraw,
                     triangles->indicesValueType(), (void*)offset);
......
}

I think you should rewrite  maximumNumberOfPoints = -1; into
maximumNumberOfPoints = 65536; Then, all vtp data which the number of
vertices is smaller than 65K works well on the devices such as S2 which
support only short-type index.

Best regards.


2014-06-06 20:31 GMT+09:00 Aashish Chaudhary <aashish.chaudhary at kitware.com>
:

> On Thu, Jun 5, 2014 at 6:43 PM, Mansoo Kim <to.mansoo at gmail.com> wrote:
>
>> Hi, Aashish Chaudhary.
>>
>> Is there some progress on this problem?
>> Please tell me the Git sha of the version of kiwiviewer released at
>> Google Play, which works well on Galaxy S2.
>>
>
> We are looking into it.
>
>
>> And, I will try to find the differences between the market-released
>> version and the recent master version.
>>
>
>  I will see if I can find that out and send it to you.
>
> - Aashish
>
>>
>> Thanks in advance,
>>
>>
>> 2014-05-30 11:59 GMT+09:00 Mansoo Kim <to.mansoo at gmail.com>:
>>
>> Hi, Aashish Chaudhary.
>>>
>>>
>>>
>>> Did you find something wrong with the trace file I sent?
>>>
>>> There is a strange thing that the kiwiviewer app which Kitware Inc.
>>> distributed through Google Play works well on my Galaxy S2 phone.
>>>
>>> Do you know what is the difference between two apks?
>>>
>>>
>>>
>>> Best Regards,
>>>
>>> Mansoo Kim.
>>>
>>>
>>>
>>> *From:* Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
>>> *Sent:* Thursday, May 29, 2014 2:18 PM
>>> *To:* Mansoo Kim
>>> *Cc:* ves at public.kitware.com
>>> *Subject:* Re: [Ves] Not displayed all data but cturtle.vtp
>>>
>>>
>>>
>>> It may be something specific to Galaxy? Is it possible for you to send
>>> me the opengl trace for VES? Also, one thing you could possibly do is set
>>> the final color in the shader
>>>
>>> to something vec4(1.0, 1.0, 1.0, 1.0) and see if something shows up.
>>>
>>>
>>>
>>> I am running it in Samsung 10 inch without any issues.
>>>
>>>
>>>
>>> On Wed, May 28, 2014 at 10:30 PM, Mansoo Kim <to.mansoo at gmail.com>
>>> wrote:
>>>
>>> I got the clone by doing "git clone git://vtk.org/stage/VES.git" and
>>> checked by doing "git checkout master"
>>>
>>> Git Sha will be d1506467aa3c63adceb04ec434868f4c4005ed24
>>>
>>>
>>>
>>> The list of other datasets is like :
>>>
>>> teapot.vtp, bunny.vtp, visible-woman-hand.vtp, and so on.
>>>
>>>
>>>
>>> - Mason Kim
>>>
>>>
>>>
>>> 2014-05-28 22:22 GMT+09:00 Aashish Chaudhary <
>>> aashish.chaudhary at kitware.com>:
>>>
>>> This is odd. what is your GIT sha of VES? Do you see the list of other
>>> datasets?
>>>
>>>
>>>
>>> - Aashish
>>>
>>>
>>>
>>> On Wed, May 28, 2014 at 4:15 AM, Mansoo Kim <to.mansoo at gmail.com> wrote:
>>>
>>> I have just built ves & kiwiviewer on Android as following instructions
>>> on http://www.kitware.com/blog/home/post/642 and
>>> http://www.kitware.com/blog/home/post/546
>>>
>>> I successed to generate Kiwiviewer-debug.apk.
>>>
>>> But, I can see only cturtle.vtp, which have only vertices, and no
>>> triangles, no lines. The other data, which have triangles, aren't displayed
>>> at all.
>>>
>>> I can confirm the geometry information by clicking "information" button
>>> in the target device.
>>>
>>>
>>>
>>> My target device is like :
>>>
>>> - Samsung Galaxy S2
>>>
>>> - Android OS 4.1.2 (SDK level 16)
>>>
>>> - NDKr9 (Native Level 8)
>>>
>>>
>>>
>>> How can i fix it?
>>>
>>>
>>>
>>> Thanks in advance
>>>
>>> (P.S. I found similar question "
>>> http://public.kitware.com/pipermail/ves/2014-January/000747.html" in
>>> mail archives. But, there is no information about the result.)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Ves mailing list
>>> Ves at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>   *
>>>
>>> *| http://www.kitware.com/company/team/chaudhary.html
>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>   *
>>>
>>> *| http://www.kitware.com/company/team/chaudhary.html
>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>
>>
>>
>
>
> --
>
>
>
> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
> *| http://www.kitware.com/company/team/chaudhary.html
> <http://www.kitware.com/company/team/chaudhary.html>*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20140613/2b46468e/attachment-0002.html>


More information about the Ves mailing list