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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:21:00+00:00 2026-05-24T01:21:00+00:00

Assuming I use Orhographic Projection, and have a reshape function like this: void reshape(f32

  • 0

Assuming I use Orhographic Projection, and have a reshape function like this:

void reshape(f32 width, f32 height){
    aspect = width/height;
    glViewport(0, 0, width, height);
    // guaranted 960x640 HUD canvas
    if(640*aspect>=960){
        ortho.x = 640*aspect;
        ortho.y = 640;
    }else{
        ortho.x = 960;
        ortho.y = 960/aspect;
    }
    glOrtho(0, ortho.x, ortho.y, 0, -1.0f, 1.0f);
}

How can I make sure, that all vertices >ortho.x or >ortho.y (normally offscreen) are didn’t drawn?
Because if I scale the windows to something with a bigger aspect ratio than 1.5f (960/640) I see the objects, that schouldn’t be full visible (because the viewport is so big like the window).
Is there something like a clipping pane in orthographic projection?

  • 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-24T01:21:01+00:00Added an answer on May 24, 2026 at 1:21 am

    What you want is to use [glScissor][1] to ensure that the rendered area never goes beyond a certain size. glScissor takes a rectangle in window coordinates (remember: window coordinates have the origin at the bottom-left). The scissor test prevents the generation of fragments outside of this area.

    To activate the scissor test, you must use glEnable(GL_SCISSOR). Unless you do that, the above call won’t actually do anything.

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

Sidebar

Related Questions

Assuming sr is an IEnumerable<string> , I want to use code like this to
Assuming I have to use C (no C++ or object oriented compilers) and I
Why when I use this: (assuming i = 1 ) divID = question- +
assuming we use this on a table using select * from table ? i
I know it makes little difference to a project but, assuming you use #defined
Assuming we always use a Sun JVM (say, 1.5+), is it always safe to
Assuming you can't use LINQ for whatever reason, is it a better practice to
Assuming that I want to use a hash as an ID instead of a
Assuming a MySQL datastore, when would you NOT want to use memcached in a
Can I use specific html if the browser is IE? (Assuming FF is the

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.