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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:50:59+00:00 2026-05-25T05:50:59+00:00

This might sound trivial, but it’s causing me some issues. I haven’t been able

  • 0

This might sound trivial, but it’s causing me some issues. I haven’t been able to find any documentation about this.

How does OpenGL perform viewport transformation? At some point the normalized device coordinates get turned into viewport coordinates, which I presume is still expressed in floating point numbers. How does OpenGL convert these viewport coordinates to pixels on the screen? Does it floor? ceil? average?

And can this behavior be customized in any way?

  • 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-25T05:51:00+00:00Added an answer on May 25, 2026 at 5:51 am

    How does OpenGL perform viewport transformation?

    The OpenGL-3.1 specification defines this in Section 2.12. It’s too long to quote here, just download the document from http://opengl.org and read for yourself.

    AFAIK OpenGL doesn’t specify a specific roundoff operation. OpenGL isn’t pixel exact at all, so implementations are free to implement this however it suits them.

    And can this behavior be customized in any way?

    None I’m aware of. The best thing you could do is writing a vertex shader that transforms vertices in a way they end up on integer coordinates (+/- a small offset if floor or ceil is used) after the whole transformation chain.

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

Sidebar

Related Questions

This might sound lame, but I have not been able to find a really
This might sound like a trivial problem but for some reason it is not.
This might sound like a very stupid question to some of you, but I
This might sound lazy at first, but I've been researching it for 2 days.
I know this might sound like something which is explained everywhere.. but I've been
This might sound like a trivial question, but it is rather important for consumer
This might sound dumb but why some functions/methods in Objective-C use parentheses rather than
This might sound a bit complicated, but what I want to do is find
This might sound silly but I have been trying to execute a NUnit test
I know this might sound crazy...but i am integrating with some third party api's

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.