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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:44:59+00:00 2026-05-13T20:44:59+00:00

I am drawing a rectangular block: GLfloat cubeVertexV[] = { // FRONT -0.5f, -1.0f,

  • 0

I am drawing a rectangular block:

GLfloat cubeVertexV[] = {
    // FRONT
    -0.5f, -1.0f,  0.5f,
     0.5f, -1.0f,  0.5f,
    -0.5f,  1.0f,  0.5f,
     0.5f,  1.0f,  0.5f,
    // BACK
    -0.5f, -1.0f,  -0.5f,
     0.5f, -1.0f,  -0.5f,
    -0.5f,  1.0f,  -0.5f,
     0.5f,  1.0f,  -0.5f,
    // LEFT
    -0.5f, -1.0f,  0.5f,
    -0.5f,  1.0f,  0.5f,
    -0.5f, -1.0f, -0.5f,
    -0.5f,  1.0f, -0.5f,
    // RIGHT
     0.5f, -1.0f, -0.5f,
     0.5f,  1.0f, -0.5f,
     0.5f, -1.0f,  0.5f,
     0.5f,  1.0f,  0.5f,
    // TOP
    -0.5f,  1.0f,  0.5f,
     0.5f,  1.0f,  0.5f,
     -0.5f,  1.0f, -0.5f,
     0.5f,  1.0f, -0.5f,
    // BOTTOM
    -0.5f, -1.0f,  0.5f,
    -0.5f, -1.0f, -0.5f,
     0.5f, -1.0f,  0.5f,
     0.5f, -1.0f, -0.5f,
};

Now I apply glRotate() in x, y, and z axes on this block. Now I want to change the cubeVertex array with the new coordinates resulting from the application of glRotate call. Is this possible in OpenGL?

  • 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-13T20:45:00+00:00Added an answer on May 13, 2026 at 8:45 pm

    Generally speaking, OpenGL will just accumulate the transforms, and only actually apply them to the data when you render it. In the plain old fixed-function graphics pipeline, there’s no way to do it. However, as programmability has been increasing every generation, there is support for this now via OpenGL extensions, provided you’re using a recent enough graphics card. Whether you have an nVidia or ATI card might also make a difference, as they don’t always support the same extensions.

    It’s been some time since I did much OpenGL, so this is going to be a little vague, but the general idea is:

    • you bind a pair of Vertex Buffer Objects,
    • put your data in the first one,
    • use Transform Feedback to render the transformed vertices into the second,
    • and you can then read back data from the second VBO into memory.

    The nVidia Transform Feedback Fractal demo on their OpenGL Code Samples page should help you with the actual code for this.

    If you want to do more general math on your GPU, you should look into GPGPU techniques, there’s a LOT more stuff you can do, and with CUDA / OpenCL / etc. it gets a lot easier to code, too.

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

Sidebar

Related Questions

I am drawing an image from MetaFile (emf) and then apply some rotation transformations
I'm drawing a shadow of various non-rectangular shapes inside the CIImage object. I did
I'm drawing points on a map with OpenLayers like in this example: http://dev.openlayers.org/examples/draw-feature.html Now
Whilst drawing on a SurfaceView, I'm having a problem intercepting a 'back' key press.
I'm having trouble drawing a UIImage in front of a CAShapeLayer . I have
I have a problem with drawing a texture stretched over a rectangular area in
I know it's possible to tint a rectangular image by drawing a CGContextFillRect over
Drawing a blank on this, and google was not helpful. Want to make a
This drawing shows a tree of parent-child relationships. It is directed, without cycles. A
While drawing graphics in 2D, how can I handle the depth of a picture

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.