Skip to content
January 7, 2012 / windperson

iOS使用OpenGL ES貼圖的注意事項

  1. 餵給glTexImage2D()的影像texture圖的長寬必須都是2的次方才行,ex: 64×64, 128×128, 256×256,請參考這篇的Texture Limitation。
  2. 直接使用Core Graphic的CGBitmapContextCreate()會變成上下顛倒,要先參考這篇的方法把圖做坐標轉換後再丟給Open GL ES的API
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: