• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSGLImage doesnt open large images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSGLImage doesnt open large images


  • Subject: Re: NSGLImage doesnt open large images
  • From: John Stiles <email@hidden>
  • Date: Thu, 10 Mar 2005 17:03:08 -0800

On Mar 10, 2005, at 4:59 PM, Edward Hillenbrand wrote:

On Mar 10, 2005, at 5:28 PM, Pradeep Kumar wrote:

Yes, there is a query for this. I get a value 2048. So whenever the image size is greater than
2048 pixs in width or height the image doesn't display. However there are some images
which are less than this size which doesnt display properly. Although openGL doesn't report
any error for such images, it displays garbled up. It's like there is some difference in the
parameters between the image and the parameters that are used by openGL. It's like some
kind of mismatch in the row bytes.

I am reconsidering the use of openGL for displaying images because of these issues unless
someone has a way to solve this problem.


"Before I start explaining the code there are a few VERY important things you need to know about the images you plan to use as textures. The image height and width MUST be a power of 2. The width and height must be at least 64 pixels, and for compatability reasons, shouldn't be more than 256 pixels. If the image you want to use is not 64, 128 or 256 pixels on the width or height, resize it in an art program. There are ways around this limitation, but for now we'll just stick to standard texture size"

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06

I don't know if this is the problem or not, but I remembered reading it back when I was experimenting with OpenGL.

The power-of-2 issue can be worked around somewhat with GL_TEXTURE_RECTANGLE_EXT. (This limits you in other ways, but nothing unsolvable.)

The max texture size is only 256 on very old hardware. If you're targeting OS X, I think 1024 is a reasonable minimum. I'm pretty sure the Rage 128 tops out around there.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSGLImage doesnt open large images
      • From: Edward Hillenbrand <email@hidden>
References: 
 >Re: Re: NSGLImage doesnt open large images (From: "Pradeep Kumar" <email@hidden>)
 >Re: NSGLImage doesnt open large images (From: Edward Hillenbrand <email@hidden>)

  • Prev by Date: Re: Re: NSGLImage doesnt open large images
  • Next by Date: NSPopUpButtons and removing items
  • Previous by thread: Re: NSGLImage doesnt open large images
  • Next by thread: Re: NSGLImage doesnt open large images
  • Index(es):
    • Date
    • Thread