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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:03:38+00:00 2026-05-13T07:03:38+00:00

So I am trying to render my program in landscape mode… however I am

  • 0

So I am trying to render my program in landscape mode… however I am coming across something that I am having trouble wrapping my mind around. In order to move down on my map I have to have a negative offset. If I keep the current positive yOffset of 100 then the map scrolls down instead of up. Why is this? I’m not happy having to put negative y coords to see the map. Is there a way I can reverse this so the map scrolls in the opposite direction when yOffset is positive?

        float yOffset = 100;
    float xOffset = 0;
    glOrthof(0 - yOffset,
             320 - yOffset,
             480 + xOffset,
             0 + xOffset,
             -10000.0f,10000.0f);

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();       
    glTranslatef(320.0f, 0.0f, 0.0f );
    glRotatef(90.0, 0.0, 0.0, 1.0);

    static const GLfloat squareVertices[] = {
    0.0f,  0.0f,
    1024.0f,  0.0f,
    0.0f,   1024.0f,
    1024.0f,   1024.0f
};



static const GLfloat texCoords[] = {
    0.0, 1.0,
    1.0, 1.0,
    0.0, 0.0,
    1.0, 0.0
};


glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);    

glTexCoordPointer(2, GL_FLOAT, 0, texCoords);   
glVertexPointer(2, GL_FLOAT, 0, squareVertices);        


glBindTexture(GL_TEXTURE_2D, mapTexture);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);


glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
  • 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-13T07:03:38+00:00Added an answer on May 13, 2026 at 7:03 am

    OpenGL uses a “right-handed” coordinate system. To switch your y direction, you can do something like:

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    glScalef (1.0f, -1.0f, 1.0f);
    // multiply view transforms as usual... 
    // multiply model transforms as usual...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to render emails on my site. The problem is that these emails
I'm trying to render to a texture, then draw that texture to the screen
I am having trouble with a camera class I am trying to use in
I'm trying to build a Render Callback function that will load a variety of
I'm trying to make a string binary search program. Trouble is I don't remember
I'm trying to set my program so that the password only is validated if
So I am trying to write a program that uses both the big-bang (see
I'm trying render the results of surveys from Surveryor gem as a CSV file,
trying to render the contents of an IFrame in an Asp.Net Application. This is
i´m trying to render PDF with renderpdf grails plugin, but their documentation is very

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.