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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:52:35+00:00 2026-06-01T10:52:35+00:00

I just got started on a renderer for my cross platform framework (iOS and

  • 0

I just got started on a renderer for my cross platform framework (iOS and Android) using opengl es. When I got to the viewport stuff (which is needed for splitscreen stuff) and noticed there is a difference between iOS and Android. Here are two images.

Android
There is actually another glitch. IT seems to wrap.

Android quarter sized viewport

iOS

iOS quarter size viewport

My question.
Which of the two is correct? I have no transformations applied but one to bring the drawn quad back a bit. glTranslatef(0.0f, 0.0f, -5.f);

Initialisation code:

glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);            //Enable Smooth Shading
glClearColor(0.f, 0.f, 0.f, 1.0f);  //Black Background
glClearDepthf(1.0f);                    //Depth Buffer Setup
glEnable(GL_DEPTH_TEST);            //Enables Depth Testing
glDepthFunc(GL_LEQUAL);             //The Type Of Depth Testing To Do

//Really Nice Perspective Calculations
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

Viewport and project code

glViewport(viewportX, viewportY, viewportW, viewportH);.

glEnable(GL_SCISSOR_TEST);
glScissor(viewportX, viewportY, viewportW, viewportH);

glMatrixMode(GL_PROJECTION);
glLoadIdentity();

… And finally the frustrum is calculated and set glFrustrum.
I have also used this code:

float widthH = width * .1f;
float heightH = height * .1f;
glOrthof(-widthH, widthH, -heightH, heightH, .1f, 100.f);
glScalef(widthH, heightH, 1.f);

Maybe Android or iOS has something set by default? I am clueless.

  • 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-06-01T10:52:37+00:00Added an answer on June 1, 2026 at 10:52 am

    Answering my own question for those who have the same issue.

    I use GLKView which apparently calls the glViewport on each render call, resetting what I just did in the previous frame. So if you use GLKView make sure to call glViewport each frame! … or roll your own EAGLView to have some real control which I think, I am about to.

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

Sidebar

Related Questions

I just started using Sequel in a really small Sinatra app. Since I've got
I just got started with Android and I was wondering how to use listeners
I just got started today developing for Android. I tried to make an application
I just got started running UI tests against my ASP.NET MVC application using WatiN.
I just got started looking at using Solr as my search web service. I
Just got started with Android programming and i got a task where im supposed
I've just got started with Sentry , which is lovely. I've got about 10
I've just started with iOS 5 and got surprised from the beginning. Now the
I've just started using VS2010. I've got a largish solution that migrated successfully from
I have just started using maven-glassfish-plugin. I got the start-domain goal working. However when

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.