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 8131767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:10:44+00:00 2026-06-06T09:10:44+00:00

I am trying to allow OpenCL to render to 2D textures. I first encountered

  • 0

I am trying to allow OpenCL to render to 2D textures. I first encountered the function clCreateFromGLTexture2D. I wrote it in, but when I went to compile, I found that it was not defined. I eventually found it in “cl_gl.h”:

#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
#warning CL_USE_DEPRECATED_OPENCL_1_1_APIS is defined. These APIs are unsupported and untested in OpenCL 1.2!
    extern CL_API_ENTRY cl_mem CL_API_CALL
    clCreateFromGLTexture2D(cl_context      /* context */,
                            cl_mem_flags    /* flags */,
                            cl_GLenum       /* target */,
                            cl_GLint        /* miplevel */,
                            cl_GLuint       /* texture */,
                            cl_int *        /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;

    extern CL_API_ENTRY cl_mem CL_API_CALL
    clCreateFromGLTexture3D(cl_context      /* context */,
                            cl_mem_flags    /* flags */,
                            cl_GLenum       /* target */,
                            cl_GLint        /* miplevel */,
                            cl_GLuint       /* texture */,
                            cl_int *        /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
#endif /* CL_USE_DEPRECATED_OPENCL_1_2_APIS */

So, I looked elsewhere in “cl_gl.h” and I found clCreateFromGLTexture. In the interest of forward compatibility, I wrote that into the code instead. However, the function clCreateFromGLTexture causes a LNK2019 (unresolved external). I find this very suspect, as I CAN compile when using clCreateFromGLBuffer and clCreateFromGLRenderbuffer, and both of these are ALSO in “cl_gl.h”.

So, my question: why doesn’t clCreateFromGLTexture have a definition, while the functions right next to it in the same module do? I am currently linking against “OpenCL.lib”. Is there anything else I need? I didn’t see anything. Is this a problem with the library itself?

[EDIT: clGetDeviceInfo(device_id,CL_DEVICE_IMAGE_SUPPORT,sizeof(cl_bool),&result,NULL); is CL_TRUE, for what it’s worth.]

Thanks,

  • 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-06-06T09:10:46+00:00Added an answer on June 6, 2026 at 9:10 am

    Try updating the OpenCL libraries to the latest version(1.2).

    clCreateFromGLTexture is defined as part of the OpenCL 1.2 standard, whereas clCreateFromGLTexture2D and clCreateFromGLTexture3D are part of OpenCL 1.0. If your OpenCL library is not up to date, you will get an undefined error.

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

Sidebar

Related Questions

I'm trying to write two batch files that will allow me to switch the
I am trying to build a page that will allow me to take an
I'm trying to create a custom patch for Quartz Composer that will function just
I am trying allow users to copy and paste my text content that sits
Background: I am trying to create a really simple iPhone app that will allow
I'm trying to allow users that have connected their Facebook accounts to my rails
I am trying to allow a click function if the user has checked a
Im trying to allow users to login to a website by verifying if they
I'm trying to allow my php pages to run inside a content page of
I am trying to allow very primitive customization based on being able to pass

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.