zcGetDisplayByType failed with a error : Display Not Found

0 votes
asked Jun 25, 2017 by Ito Yoshihiro (12 points)
Hello,

I'm using zSpace SDK version 4.0.0.3

I wrote the code with reference to "BasicStereoGLSample.cpp".

My code works on my PC, and most my customer's environments.

But only one of my customer's environments, the code prints "zcGetDisplayByType() : Display Not Found".

The following is a simplified version of my code and it printed the same error in the problem environment.

In the environment, zcGetRuntimeVersion returns 4.0.0 .

Please tell me what is wrong with this environment.

---------

#define CHECK_ERROR(func, error) \
    if (error != ZC_ERROR_OK) \
    { \
        char errorString[256]; \
        zcGetErrorString(error, errorString, sizeof(errorString)); \
        printf(func); \
        printf(" : "); \
        printf(errorString); \
        printf("\n"); \
    }

int
main(int argc, char* argv[])
{
    ZCContext                    _zSpaceContext = nullptr;
    ZCHandle                    _displayHandle = nullptr;
    ZCHandle                    _bufferHandle = nullptr;
    ZCHandle                    _viewportHandle = nullptr;
    ZCHandle                    _frustumHandle = nullptr;
    ZCHandle                    _stylusHandle = nullptr;

    int                            _runtimeVersion[3];

    char buf[4096] = {0};

    ZCError error = ZC_ERROR_OK;
    if (error == ZC_ERROR_OK) { error = zcInitialize(&_zSpaceContext); CHECK_ERROR("zcInitialize()", error); }
    if (error == ZC_ERROR_OK) { error = zcGetRuntimeVersion(_zSpaceContext, &_runtimeVersion[0], &_runtimeVersion[1], &_runtimeVersion[2]); CHECK_ERROR("zcGetRuntimeVersion()", error); }
    if (error == ZC_ERROR_OK) { error = zcCreateStereoBuffer(_zSpaceContext, ZC_RENDERER_QUAD_BUFFER_GL, 0, &_bufferHandle); CHECK_ERROR("zcCreateStereoBuffer()", error); }
    if (error == ZC_ERROR_OK) { error = zcCreateViewport(_zSpaceContext, &_viewportHandle); CHECK_ERROR("zcCreateViewport()", error); }
    if (error == ZC_ERROR_OK) { error = zcGetFrustum(_viewportHandle, &_frustumHandle); CHECK_ERROR("zcGetFrustum()", error); }
    if (error == ZC_ERROR_OK) { error = zcGetTargetByType(_zSpaceContext, ZC_TARGET_TYPE_PRIMARY, 0, &_stylusHandle); CHECK_ERROR("zcGetTargetByType()", error); }
    if (error == ZC_ERROR_OK) { error = zcGetDisplayByType(_zSpaceContext, ZC_DISPLAY_TYPE_ZSPACE, 0, &_displayHandle); CHECK_ERROR("zcGetDisplayByType()", error); }

   ......
commented Jul 5, 2017 by AlexShorey (194 points)
moved Jul 5, 2017 by AlexShorey
Hello Ito Yoshihiro,

We'd like to help you get to the bottom of this. To do so, we'll need a little more information.

This might be an issue regarding the display's EDID which is used to identify whether a display is a zSpace display.

Use the following to query the number of displays and their corresponding handles.

zcGetNumDisplays(ZCContext context, ZSInt32* numDisplays);

zcGetDisplayByIndex(ZCContext context, ZSInt32 index, ZCHandle* displayHandle);

Then, use the following to retrieve information about the displays (specifically attributes such as ZC_DISPLAY_ATTRIBUTE_MANUFACTURER_NAME, ZC_DISPLAY_ATTRIBUTE_PRODUCT_CODE, and ZC_DISPLAY_ATTRIBUTE_SERIAL_NUMBER):

zcGetDisplayAttributeStr(ZCHandle displayHandle, ZCDisplayAttribute attribute, char* buffer, ZSInt32 bufferSize);

zcGetDisplayAttributeStrSize(ZCHandle displayHandle, ZCDisplayAttribute attribute, ZSInt32* size);

Please, let us know what these are returning and we'll continue to narrow down your issue.
commented Jul 5, 2017 by AlexShorey (194 points)
One more question. Would you be able to tell us if this is a 200 model zSpace?
...