OpenGL Orthographic Projection problems on emulator (rendering 1/4 size)

by Robert Green » Thu, 20 Aug 2009 13:07:50 GMT


Sponsored Links
  seem to have found the bug.  The problem appears to be with how
Fixed Point numbers are used with glOrthox. The specification is such
that glOrtho creates a relative number of "pixels" that can be used -
so no matter what the actual screen resolution is, you get to draw to
whatever you defined as your coordinate system in glOrtho. This means
that instead of converting everything to FP (int << 16), you can just
put the regular int in for the width and height of the orthographic
projection and then use regular ints in your geometry. This works
correctly on the device and in every opengl example I've seen, but the
emulator doesn't like it. Here's what I found:

Testing landscape full screen 480x320

glOrthox(0, 480, 320, 0, 0, 1) and geometry using ints (320, 480)
works on device but not on emulator (1/2 length and width show up)
glOrthox(0, 480 << 16, 320 << 16, 0, 0, 1) and geometry using FP (320
<< 16, 480 << 16) works on both emulator and device
glOrthof(0, 480f, 320f, 0, 0, 1) and geometry using floats (320f x
480f) works on both emulator and device
glOrthof(0, 480f, 320f, 0, 0, 1) and geometry using FP (320 << 16, 480
<< 16) works on both emulator and device

I think it's a bug that the first method doesn't work, but I'll just
convert everything to FP and forget about it.

On Aug 19, 11:44pm, Robert Green <rbgrn....@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. siti sarah ekawati supardan wants to chat

-----------------------------------------------------------------------

siti sarah ekawati supardan wants to stay in better touch using some
of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-82ea8cc49d-a2851462b5-DS2LLdhaDmeBkEa1-tXUTPkojEQ
You'll need to click this link to be able to chat with siti sarah
ekawati supardan.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with siti sarah ekawati supardan, visit:
http://mail.google.com/mail/a-82ea8cc49d-a2851462b5-DS2LLdhaDmeBkEa1-tXUTPkojEQ

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/intl/en-GB/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/intl/en_GB/about.html
http://www.google.com/talk/intl/en-GB/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

-- 
"Indonesian Android Community [id-android]" 

2. error putting "LGPL" file in res/ directory?

as i'm getting used to downloading, building and installing android
apps on my emulator, i ran across the following.  i decided to
download an ECM client from here:

http://blog.yerbabuenasoftware.com/2010/05/open-source-mobile-clients-for-nuxeo.html

to see how easy it would be to build.  once i unloaded it, i made the
following changes:

  * added a simple build.xml file
  * added local.properties to point at the location of the SDK
  * edited default properties, "android-4" -> "android-8"

which, i'm guessing, makes sense.  but when i ran "ant debug", i got:

...
     [null] invalid resource directory name:
/home/rpjday/nuxeo/morfeo/nuxeo-mobile-scm-2010-05-21/Android/res/LGPL

BUILD FAILED
...


  sure enough, the tarball installed the normally harmless LGPL file
at both the toplevel *and* in the res/ directory.  is that second copy
of LGPL technically an error that the vendor should remove because it
will cause a build failure every time?  simply deleting it fixed the
problem, but i'm curious as to how it could be there if the vendor
should have at least test built from that tarball and should have
noticed that.  thanks.

rday

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================

-- 

3. Miring di Springhill

4. Certain apps not being shown in Android Market?

5. Hi I'm Flash

6. minor suggestion for downloadable android "samples"

7. What's the localization language code for Turkish?