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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:34:25+00:00 2026-05-29T19:34:25+00:00

I am using OpenGL ES in JNI to draw the frame (RGB data) returned

  • 0

I am using OpenGL ES in JNI to draw the frame (RGB data) returned from the C source code (MPEG2 Codec). For this I have created one texture and draw RGB data using glTexSubImage2D() function of OpenGL. But Using this function I am not getting even 7 FPS. While As I have studied that using OpenGL we can get 22 FPS.

Is there any other specific function to display an image through android-ndk which will give better performance than that function (glTexSubImage2D()).
I have referred to this link to draw frame returned from codec.

Thanks in advance.

  • 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-29T19:34:27+00:00Added an answer on May 29, 2026 at 7:34 pm

    There are a set of native bitmap functions added in Android 2.2 which allow you to get direct access to the bits of a bitmap without making a copy of it. In your C code you will use:

    #include <android/bitmap.h>
    
    JNIEXPORT jint JNICALL Java_com_somecompany_someapp_someclass_drawonbitmap(JNIEnv *env, jobject obj, jobject bitmap)
    {
    int iReturn;
    AndroidBitmapInfo info;
    void *pixels;
    
       iReturn = AndroidBitmap_getInfo(env, bitmap, &info);
       if (iReturn < 0)
       {
           return <some error>;
       }
       iReturn = AndroidBitmap_lockPixels(env, bitmap, &pixels);
       if (iReturn < 0)
       {
           return <some error>;
       }
    
       // Draw directly into the bitmap here
       //
       // use the structure members:
       // info.stride
       // info.width
       // info.height
       // info.format (e.g. ANDROID_BITMAP_FORMAT_RGB_565)
    
       if (pixels != NULL) // we previously locked the pixels
       {
           AndroidBitmap_unlockPixels(env, bitmap);
       }
       return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem using opengl on android to draw a simple rectangle. This
I'm using OpenGL ES on Android to draw some shapes, so I have some
In relation to this question on Using OpenGL extensions , what's the purpose of
I've created this basic 3D Demo using OpenGL/SDL. I handled the keyboard callback so
I am trying to draw a series of rectangles using OpenGL but some of
I'm using OpenGL and was told I should draw circles at each vertex of
I'm using OpenGL ES to display some objects exported from Blender. Blender provides a
I am using OpenGL ES 2.0 and GLSL to draw objects. Then I want
I'm currently using OpenGL on Android to draw set width lines, which work great
I want to draw a rectangle using OPENGL in Android... Just a simple rectangle

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.