Results 1 to 2 of 2

Thread: context validation

  1. #1

    context validation

    Hi Forum,

    I am creating a context with the opengl interoperability. I am checking if the created context is ok or not as follows:

    Code :
    cl_int status;
    context = clCreateContext(.....,&status);
    if(status != CL_SUCCESS)

    Is this the only way to validate the created context is valid or not ?


  2. #2
    Junior Member
    Join Date
    Jul 2011
    Bristol, UK

    If the clCreateContext() function succeeds, then status will be set to CL_SUCCESS, and context will be non-NULL. So yes, your test should be sufficient to determine if the context is valid. You could also check that context != NULL just to be doubly sure, if you wish.

    Best wishes,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts