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

  • Home
  • SEARCH
  • 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 1808756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:18:09+00:00 2026-05-17T06:18:09+00:00

I have a simple Android OpenGL-ES app, and as all the models are very

  • 0

I have a simple Android OpenGL-ES app, and as all the models are very simple (<10 vertices!) I have implemented a global “world” class that tracks all the vertices, and performs a single pair of GL commands on the frame rendering.

Each model object adds it’s vertices to the global buffers, and these these are ‘sent’ to GL in one operation:

gl.glVertexBuffer(...);
gl.glDrawElements(...);

My question (perhaps an obvious answer, but I want to be sure) is, does this mean I have to do all my own rotations manually?

My base objects just define a bunch of vertices that get added to the cache, for example a triangle, a square, a pentagram, etc. My World object then takes the big array of vertices, and dumps them out to GL. If I want to rotate all those, am I correct in thinking I have to perform my own vertex coordinate manipulations (trigonometry!)?

I guess it’s not the end of the world to have to create some utility functions to rotate all the vertices in my models, but I’d rather not if it’s not necessary.

  • 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-17T06:18:09+00:00Added an answer on May 17, 2026 at 6:18 am

    Yes, unfortunately that is the price to pay for performing a single draw callfor multiple models. The calculations are really quite simple, if you use the standard Scale-Rotate-Translate order.
    For every vertex:

    • Determine the distance to the center: Xrel = X-Xcenter and Yrel = Y-Ycenter
    • Multiply that by the scale for x and y. Xscaled = scalex*Xrel and Yscaled = scalex*Yrel.
    • Determine the new positions relative to the center after rotation: Xrot = Xscaled*cos(d)-Yscaled*sin(d) and Ynew = Xscaled*sin(d)+Yscaled*cos(d).
    • Move the vertices with the translation: Xnew = Xrot + translatex and Ynew = Yrot+translatey.

    Easy! Cheers, Aert.

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

Sidebar

Related Questions

I am trying to create a simple 3-D app for android that will have
So I have a very simple android activity that starts a timer when you
I am writing a simple Android app and have a database that will send
I have a simple question. I am trying to design a simple Android app,
I have written a simple android app and it runs in the emulator. Now
I have a simple Android RSS reader app in which I am using SAX
I have a very simple Android activity layout like this: <?xml version=1.0 encoding=utf-8?> <LinearLayout
I have a simple HelloWorld Activity that I try to test with an Android
Should simple JavaBeans that have only simple getters and setters be unit tested?? What
I have a simple webform that will allow unauthenticated users to input their information,

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.