[vtkusers] android examples openGL ES 2.0
Ken Martin
ken.martin at kitware.com
Wed Feb 17 15:43:10 EST 2016
Well the second issue (too many eglMakeCurrent) is a performance issue but
should not cause crashes or incorrect results etc. At some point I plan to
try cleaning some of that up to reduce latency etc.
The first issue GL_UNSIGNED_INT is really your problem I suspect. Where it
is being used would determine how to handle it. If you are creating a
unsigned int texture map then the solution is probably to not create an
unsigned int texture map. Typically other formats work better than unsigned
int and unsigned int is often overkill for the data. If it is somewhere
else then the answer could be different.
The real fix would be for VTK to catch this and on the fly map the data to
a supported format as best we can but I'm not sure how much effort we want
to put into OpenGL ES 2.0, it is a pretty limited subset of OpenGL and most
newer devices seem to have ES 3.0 or later.
Thanks
Ken
On Wed, Feb 17, 2016 at 3:27 PM, Francesco R <francesco81492 at gmail.com>
wrote:
> Dear vtk users and developers,
> I recently asked for suggestions on this problem on the ARM Mali Graphics
> community. You can find the post at
> https://community.arm.com/message/34034
>
> Two issues have been found:
> 1. draw calls in VTK are using type=GL_UNSIGNED_INT. However, this type is
> supported only for GLES30, but not for GLES20. So, I fear that current vtk
> master is not compatible with GLES20.
> 2. it is suggest that too many eglMakeCurrent are being made.
>
> As concerns 1., I basically replaced all occurences of GL_UNSIGNED_INT
> with GL_UNSIGNED_SHORT in Rendering/OpenGL2. Of course this is probably not
> the correct approach, because the result is not as expected (I modified the
> examples to render only the sphere, but I can see less than a quarter of
> it), but at least now I can see some rendering on my screen.
>
> Do you have any suggestion on how to proceed now? Thanks
>
> On Tue, Jan 5, 2016 at 2:20 PM, Francesco R <francesco81492 at gmail.com>
> wrote:
>
>> Ok. I posted logcat and gltrace files, is there anything else that I can
>> do to help debug the issue? Thanks
>>
>> On Tue, Jan 5, 2016 at 1:57 PM, Ken Martin <ken.martin at kitware.com>
>> wrote:
>>
>>> The system I tested on is a Mali 628 MP6 GPU running 5.0.2 (support ES
>>> 20 and 3.0). The Mali 400 is old but its specs say that it supports OpenGL
>>> ES 2.0 so it should work.
>>>
>>> Thanks
>>> Ken
>>>
>>> On Tue, Jan 5, 2016 at 7:28 AM, Francesco R <francesco81492 at gmail.com>
>>> wrote:
>>>
>>>> Thanks Dr. Martin for you reply. I just recompiled the current master
>>>> with API 19 (the version of android installed on the device is 4.4) and I
>>>> can confirm that I have the same issues as in my first email. Do you think
>>>> it can be related to my particular GPU (ARM Mali 400 MP)? What GPU do you
>>>> have on your device? Thank you!
>>>>
>>>> On Mon, Jan 4, 2016 at 4:29 PM, Ken Martin <ken.martin at kitware.com>
>>>> wrote:
>>>>
>>>>> I'm not sure what the issue is. I just checked and the Native app is
>>>>> working on my device. I just rebuilt and used API level 21 and
>>>>> OPENGL_ES_VERSION set to 2.0
>>>>>
>>>>> - Ken
>>>>>
>>>>> On Sun, Dec 20, 2015 at 3:09 PM, Francesco R <francesco81492 at gmail.com
>>>>> > wrote:
>>>>>
>>>>>>
>>>>>> Dear vtk users and developers,
>>>>>> I am currently trying to run the two android examples with OpenGL ES
>>>>>> 2.0 backend available in vtk 7.0.0 rc1, on an ARM Mali 400 MP GPU.
>>>>>> Unfortunately, I am not able to run neither of them on the device.
>>>>>>
>>>>>> NativeVTK crashes at Rendering/OpenGL2/vtkShaderProgram.cxx, line 399
>>>>>> with "Shader object was not initialized, cannot attach it."
>>>>>> See also http://pastebin.com/Wvew3gen for the full log.
>>>>>>
>>>>>> JavaVTK appears to interact correctly with the user (see
>>>>>> http://pastebin.com/w3Sdu7CC ), but only a blue background is shown.
>>>>>> The trace file obtained with the android device monitor is available at
>>>>>> http://filebin.ca/2QdKao08I3lb/trace1.gltrace
>>>>>>
>>>>>> Do you have any suggestion on what could be the issue?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Powered by www.kitware.com
>>>>>>
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>
>>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>
>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ken Martin PhD
>>>>> Chairman & CFO
>>>>> Kitware Inc.
>>>>> 28 Corporate Drive
>>>>> Clifton Park NY 12065
>>>>> 518 371 3971
>>>>>
>>>>> This communication, including all attachments, contains confidential
>>>>> and legally privileged information, and it is intended only for the use of
>>>>> the addressee. Access to this email by anyone else is unauthorized. If you
>>>>> are not the intended recipient, any disclosure, copying, distribution or
>>>>> any action taken in reliance on it is prohibited and may be unlawful. If
>>>>> you received this communication in error please notify us immediately and
>>>>> destroy the original message. Thank you.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Ken Martin PhD
>>> Chairman & CFO
>>> Kitware Inc.
>>> 28 Corporate Drive
>>> Clifton Park NY 12065
>>> 518 371 3971
>>>
>>> This communication, including all attachments, contains confidential and
>>> legally privileged information, and it is intended only for the use of the
>>> addressee. Access to this email by anyone else is unauthorized. If you are
>>> not the intended recipient, any disclosure, copying, distribution or any
>>> action taken in reliance on it is prohibited and may be unlawful. If you
>>> received this communication in error please notify us immediately and
>>> destroy the original message. Thank you.
>>>
>>
>>
>
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160217/e5310a61/attachment.html>
More information about the vtkusers
mailing list