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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:39:09+00:00 2026-05-29T04:39:09+00:00

I have been going over tutorials but i have hit some quesitons. when the

  • 0

I have been going over tutorials but i have hit some quesitons.

  1. when the positions for a certain object/polygon are made, they are stored as floats (how many pixels wide is 1.0f)

  2. When i color a polygon, with shades of colors, what is method used (ie.

    // R, G, B, A
    final float[] cubeColorData =
    {
    // Front face (red)
    1.0f, 0.0f, 0.0f, 1.0f,
    1.0f, 0.0f, 0.0f, 1.0f,
    1.0f, 0.0f, 0.0f, 1.0f,
    1.0f, 0.0f, 0.0f, 1.0f,
    1.0f, 0.0f, 0.0f, 1.0f,
    1.0f, 0.0f, 0.0f, 1.0f,

            // Right face (green)
            0.0f, 1.0f, 0.0f, 1.0f,             
            0.0f, 1.0f, 0.0f, 1.0f,
            0.0f, 1.0f, 0.0f, 1.0f,
            0.0f, 1.0f, 0.0f, 1.0f,             
            0.0f, 1.0f, 0.0f, 1.0f,
            0.0f, 1.0f, 0.0f, 1.0f,
    

3.What is a matrix and its purpose?
4. What about the buffers that are created from the positions? Are changes applied to buffers on every frame step or the direct vector positions?

  • 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-29T04:39:12+00:00Added an answer on May 29, 2026 at 4:39 am
    1. Depends. If you are viewing an object in 3D in the real world–for example your house–how many “pixels wide” your eyes perceive your house depends on how far you are from it! 1.0f is unity, a single unit. So whatever you elect your scale to be, 1.0f will be a single unit of that.

    2. You can use glColor3f or glColor3vf if you wish to pass in a vertex array. This also depends on if you are using OpenGL ES 1.1 or 2. You can also use glColor4x if you want to specify your values in Hex and I think they even have glColor3fi for ints. Take a look at your OpenGL header file (or I guess .class definition since this is Android/Java you’re talking about: android.opengl.GLU)+++

    3. A matrix is a 2d array of floats. When you multiply a vector by a matrix, you get a transformed vector. Thus, you can use a matrix to transform vectors (which are object orientations and positions) from one coordinate system to another. For example the local coordinate system used to describe an object can be transformed into the world coordinate system (where the object exists in your world). Having a local coordinate system is useful because it makes it easy to rotate an object about itself. Having a world coordinate system is useful when many objects interact with each other. You can also transform to, say, a ‘camera’ coordinate system. Just like how each object in our real world looks different form various camera angle views, the computer also needs to know how to transform the object to be presented in those views. Each camera would have its own transformation matrix defined and when the vectors, or vertices rather, of an object are multiplied by said matrix, the result is the transformed object in the view of the camera. Slight simplification.

    Some suggested reading:

    • Tricks of the 3D Game Programming Gurus by Andre LaMothe. It’s old and talks about software rasterization instead of hardware, but it’ll teach you about all the math necessary for you to understand 3D graphics and then some.

    • Any Linear Algebra academic book

    • NeHe Game Programming, just google it


    +++Note:
    For your purposes, the way you have your colors defined, it looks to me like you would probably want to instantiate a Float Buffer, store those color values in it, and utilize the glColorPointer function.

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

Sidebar

Related Questions

I have been going over python tutorials in this resource . Everything is pretty
I have been going over the practicality of some of the new parallel features
I have been going over some books and some articles to refresh my memory
I've switched over to a Mac recently and, although things have been going quite
I have a question that may have been answered over 9000 times before but
I have been going over this for hours and cannot find the problem. I
I have been going over rails scheduling tasks options and stumbled upon this piece
Well, I have been beating my head over this one for some time now,
I have been going crazy over a seemingly easy question with Python: I want
I'm preparing for an exam and after going over some sample exercises (which have

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.