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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:45:40+00:00 2026-06-18T02:45:40+00:00

I won’t post my entire program here because it’s a little too long. But

  • 0

I won’t post my entire program here because it’s a little too long. But I have this renderer (shortened):

     class OpenGLRenderer implements Renderer {

    private CubicPolygon cube;

    public OpenGLRenderer(Context context) {

        this.context = context;
        cube = new CubicPolygon();
    }

public void onDrawFrame(GL10 gl) {

    gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
    gl.glLoadIdentity();

    gl.glTranslatef(0.0f, 0.0f, -9.0f);
    gl.glScalef(0.8f, 0.8f, 0.8f);

    // If it's just a regular rotation
    if (!numberHasBeenDrawn) {
      gl.glRotatef(getXRotation(rotatingOfDOOMFire), 1, 0, 0);
      gl.glRotatef(getYRotation(rotatingOfDOOMFire), 0, 1, 0);
      gl.glRotatef(getZRotation(rotatingOfDOOMFire), 0, 0, 1);
    }

    // If there is a chosen one (number that is)
    if (numberHasBeenDrawn) {

      gl.glRotatef(xAnimation(number), 1, 0, 0);
      gl.glRotatef(yAnimation(number), 0, 1, 0);

    }
    gl.glFinish();
    cube.draw(gl);

  }

Now what I would love to do is get the current rotation values of that cube object there in the “numberHasBeenDrawn” if statement so I can create a little smooth end animation to rotate the cube. OpenGL is probably saving all the rotation values in a handy (barely readable) matrix but after some googling I couldn’t really find anything about WHERE (just how to initially rotate an object, which I already do).

// EDIT: If you want to see more code to maybe help me, go ahead and ask, it’s not really anything secret, I can post it as well 😉

  • 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-18T02:45:41+00:00Added an answer on June 18, 2026 at 2:45 am

    You should cache the rotation values yourself in the program somewhere. Reading state and values back from the OpenGL API is generally discouraged, and can be slow, as it breaks the pipelining that the API is built to allow (for performance reasons, to decouple the GPU from the CPU).

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

Sidebar

Related Questions

i won't to download multi files at this same time using c#, but i
I won't copy/paste my whole xaml file. It will be too long to explain
Godaddy won't enable mod_gzip for me, so I have to use headers like this:
This won't be a long or complex question. I'm just wondering if there is
Since i won't be able to post an image here's the link to it
I won't post my whole script because it's most likely irrelevant and will save
I won't get into specifics unless I need to, but I have an app
This won't work: $server = server; $cmd = hostname; C:\Users\ss\Documents\Scripts\PSTools\PsExec.exe \\$server $cmd; But this
Why won't this code draw parabola? It is as simple as it can be
Why won't this xml schema validate ? Visual studio says that the simpleContent tag

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.