Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glTexSubImage2D, Leopard




On 27 May 2008, at 12:53, loMadi wrote:
Hi,

when updating an Alpha texture with glTexSubImage2D there are some
strange effects (the right most columns are updated wrong).


glTexSubImage2D(GL_TEXTURE_2D, 0, // level 0, // xoffset 0, // yoffset 258, // width, it woks for 256, 260, etc but not for 258! 258, // height, it woks for 256, 260, etc but not for 258! GL_ALPHA, // format GL_FLOAT, // type (GLvoid*)sourcePointer);



does not work!

What format is your texture defined as (i.e. the internal format in the original glTexImage2D). Are they float textures or straight 8 bit components?
Does the height parameter really make a difference? You description would suggest no, but your comments say yes.
Do you see the same on the left side if you change the offset?


If you are using 8-bit textures, then I wonder if you might have more luck if your texture data was passed as 8-bit values rather than floats. If that works I think you've found a bug. (glTexSubImage updating 32-bit value based on input format rather than texture format)

BTW If you are using ARB_TEXTURE_FLOAT, it probably a safe bet to use ARB_TEXTURE_RECTANGLE to do NPOT textures.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden


This email sent to email@hidden
References: 
 >glTexSubImage2D, Leopard (From: loMadi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.