Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7036285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:24:21+00:00 2026-05-28T01:24:21+00:00

Question: How do I take a GLXContext and pass it to clCreateContextFromType? Info: I’m

  • 0

Question: How do I take a GLXContext and pass it to clCreateContextFromType?


Info:

I’m learning how the openGL CL interop works. I’ve managed learn how openCL works and how openGl works, now I’m on the final step of making them work together. I was using glut, but have since started using GLX because I need a GL context for CL to be able to create its context from. I have my GLXContext saved as a global variable and I pass it to to clCreateContextFromType and i get this when I compile:

error: invalid conversion from ‘GLXContext {aka __GLXcontextRec*}’ to ‘cl_context_properties {aka long int}’

So i ran around the internet, found some advise from this blog, and made a cl_context_properties list which contained {CL_GLX_DISPLAY_KHR, glc}. It threw the exact same error. What am I missing here? there obviously something that needs to happen in order to make this GLX context suitable for openCL to take. What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:24:22+00:00Added an answer on May 28, 2026 at 1:24 am

    I figured it out:

    cl_context_properties props[] =
    {
        CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
        CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
        CL_CONTEXT_PLATFORM, (cl_context_properties)(platform_id),
        0
    };
    

    Why it works I don’t really know. But I found it here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hy, I'm learning for my exams and came over the following question: Take the
Hopefully a simple question. Take for instance a Circularly-linked list: class ListContainer { private
I’ve chosen to take this as a question in its own right since it
I've decided to take the advice in this question: create-excel-chart-programmatically-in-php and NOT attempt to
On researching another question I noted that the stat function in Perl can take
Here is a very and straight forward question: How long will it take to
I have a basic PHP question, take the code below for example, let's say
I have a generic question about scope and encapsulation. Take two scenarios: Scenario 1:
This is a follow-up question to this one . Take a look at these
I've got a quick question about default values in PL/SQL functions in Oracle. Take

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.