• 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: glReadPixels and glDrawPixels optimized
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glReadPixels and glDrawPixels optimized


  • Subject: Re: glReadPixels and glDrawPixels optimized
  • From: "Andy O'Meara" <email@hidden>
  • Date: Wed, 13 Dec 2006 13:17:03 -0500


I'm pretty sure that glDrawPixels() doesn't have the performance and architecture considerations compared to the usual texture upload approach. My best recommendation is to not use glDrawPixels() at all and instead use normal texture uploads (followed by a single quad draw) using the GL_UNPACK_CLIENT_STORAGE_APPLE extension. Search in ADC or this list archive (search.lists.apple.com) for it and you'll get tons of info and sample code.



andy





On Dec 13, 2006, at 12:21 PM, Yaron Tadmor wrote:

Hi,

In order to support color profiles, I render my scene and then I need to convert to the screen profile.

To do that I use glReadPixels to read the data, convert it using ColorSync, and then write the pixels back using glDrawPixels.

I used GL_BGRA and GL_UNSIGNED_INT_8_8_8_8_REV since I understand this is the best format.

The questions I have are theses:

1) When profiling I see that both glReadPixels and glDrawPixels call glgVectorCopy<GLGProfile_Generic32, (GLGMemory)2> (…). Does this mean openGL really only copies the pixels, or does it convert something as well? Is what I'm doing utilizes openGL in the best way?

2) Is there a better way to convert things to the screen profile? I can't upload textures in the screen profile as blending is affected by profile, so I need to let openGL blend is the specific profile I choose (which isn't the screen profile).


Thanx

Yaron Tadmor


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40soundspectrum.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: 4 vs 8 alignment
  • Next by Date: Re: ___spin_lock
  • Previous by thread: Re: duplicated headers
  • Next by thread: gdb isn't looking at DYLD_LIBRARY_PATH - NO frameworks involved.
  • Index(es):
    • Date
    • Thread