Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-22-2009, 04:20 PM   #59 (permalink)
mauriceatron
Tutorial Author
 
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 29
mauriceatron is on a distinguished road
Default

Quote:
Originally Posted by kingbombs View Post
Hey,

I was wondering if theres a way to use textures which don't have a size that is a power of 2

I have been looking at quite a few sites, and how to 'pad' out an image so the original image isn't a power of 2 but when it gets loaded into the program to become a texture it is padded out (with what i seem to be reading) with black pixels.
Should be transparent pixels. If allocating memory for a pad space use calloc not malloc for obvious reasons...

Quote:
Originally Posted by kingbombs View Post
What i assume from this is that i must set up the texture co-ordinates to be something like 0.5,0.6, 0.5, 0.8, .... etc not the standard 1,1....0,1 etc
The problem with me taking this route is that i use other textures that require the texture co-ordinates to be 1,1 0,0 0,1 1,0 etc
Look, there really isn't a way around this. That's just one of the things you need to deal with and it's difficult to "force" everything into the one little box or method. If your textures are different, then they need to be handled differently.

I'd definitely re-look at your drawing code and allow for some flexibility for the ST co-ordinates. Even if they were just in an array matching an array of the GL texture indexes, that would be enough.
mauriceatron is offline   Reply With Quote
 

» Advertisements
» Online Users: 567
13 members and 554 guests
chiataytuday, christina2c, Domele, Droverson, Dump3, Fstuff, iamwayne5, jerrasen, kanishadg35, linkmx, Techgirl-52, ThistleCoast, timchen
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 174,552
Threads: 93,727
Posts: 401,266
Top Poster: BrianSlick (7,954)
Welcome to our newest member, christina2c
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:10 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.