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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:26:27+00:00 2026-05-26T10:26:27+00:00

In My application i have to use the Android Camera, and OpenGLES. I have

  • 0

In My application i have to use the Android Camera, and OpenGLES.
I have also have to give the effect to the Camera Vision with two files called one.vsh and one.fsh But i dont know how to implement that file in OpenGLES.

Even i also dont know how to implement android camera to work with OPENGLES to do effect with that two files.

Please help me for this.
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-05-26T10:26:28+00:00Added an answer on May 26, 2026 at 10:26 am

    Well, I don’t have a test about Android camera to use such effect on it.
    But ofcourse, you can use the shader file in the onSurfaceCreated method as like below:

    //
    // Initialize the shader and program object
    //
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {
        String vShaderStr = "uniform mat4 u_mvpMatrix;         \n"
                + "attribute vec4 a_position;                  \n"
                + "void main()                                 \n"
                + "{                                           \n"
                + "   gl_Position = u_mvpMatrix * a_position;  \n"
                + "}                                           \n";
    
    
        String fShaderStr = "precision mediump float;                  \n"
                + "void main()                                         \n"
                + "{                                                   \n"
                + "  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );        \n"
                + "}                                                   \n";
    
        // Load the shaders and get a linked program object
        mProgramObject = ESShader.loadProgram(vShaderStr, fShaderStr);
    
        // Get the attribute locations
        mPositionLoc = GLES20.glGetAttribLocation(mProgramObject, "position");
    
        // Get the uniform locations
        mMVPLoc = GLES20.glGetUniformLocation(mProgramObject, "u_mvpMatrix");
    
        // Generate the vertex data
        mCube.genCube(1.0f);
    
        // Starting rotation angle for the cube
        mAngle = 45.0f;
    
        GLES20.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    }
    

    Just replace the String that you want to use for vertex shader and fragment shader.
    Hope this helps.

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

Sidebar

Related Questions

I have a big text file (5Mb) that I use in my Android application.
I have application which needs to use a dll (also written by me) which
I am working on an application where i have to use android tabhost. I
For some reasons I have to use WebView in my Android application and part
I have an application which makes use of the default camera to take pictures
I'm currently developing a camera application for Android on which some problems have occurred.
How can we use OCR web service in android application I have use this
I have an application and i want to use Android Market License as copy
I use Android to make an application. I have an activity where I create
In My Android Camera Application i want to Set some Effect on the Android

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.