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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:34:31+00:00 2026-06-06T08:34:31+00:00

I want to do camera image processing on the GPU on android. In my

  • 0

I want to do camera image processing on the GPU on android.

In my current set-up I use a SurfaceTexture to capture frames from the camera image stream as an OpenGL ES texture. This is an efficient way to get the camera stream accesible in my shaders. (http://developer.android.com/reference/android/graphics/SurfaceTexture.html)

Now i would like to start using the new RenderScript API instead of direct OenGL ES usage. (http://developer.android.com/guide/topics/renderscript/index.html)

But to create a SurfaceTexture, i need to pass the openGl Texture ID to the constructor. Unfortunately the texture ID is not available (RenderScript uses the Allocation class to load textures, which does not expose the texture ID). So i am not able to create a SurfaceTexture when using RenderScript.

I have read all documentation on renderscript (which is still pretty sparse) and looked at the samples, but they have no information on the subject.

So my question is:
Is it possible to use SurfaceTexture in combination with RenderScript, or is there some other efficient way to use the live camera stream in a RenderScript Graphics script?

  • 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-06T08:34:32+00:00Added an answer on June 6, 2026 at 8:34 am

    If I understand correctly, you already use SurfaceTexture. You can then register a callback with setOnFrameAvailableListener.

    I see two solutions :

    1. Implements you own RSTextureView, which inherits from SurfaceTexture.OnFrameAvailableListener. Register your view as the SurfaceTexture callback.
      Every time your surface view is updated by the camera stream, your RSTextureView will be notified and you can handle it the way you want.

    2. Another solution would be to implement your own RenderScriptGL (still inheriting from SurfaceTexture.OnFrameAvailableListener) and call setSurfaceTexture when the callback is called.

    You should be able to combine RenderScript with a SurfaceTexture with at least one of these two solutions.

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

Sidebar

Related Questions

In my android application I use camera to capture photo. I want to print
I would like to capture an image from the camera on Android, and send
I want to render virtual content over the camera image from the back-facing camera
Kinect camera has a very low resolution RGB image. I want to use point
in my app i want use the camera for capturing image and send to
I capture an image using the photo or camera task and I want to
I want to launch the camera from my application and want to use the
Before i click the image to pull the camera, i want to set up
In my project i want to take image from my iPhone camera and upload
I want to use the Camera Image to get the google search results. I

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.