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

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

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-11-2011, 02:49 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: London
Posts: 13
Simo++ is on a distinguished road
Post OpenGL Texture Loader Help Needed

Ok basically I'm making an OpenGL game and having a bit of trouble loading textures.

I have followed a few tutorials and created a game engine with a resource manager. This resource manager can simply create, buffer and draw textures by using a call like this:

Code:
[[g_ResManager getTexture:@"testImage.png"] drawAtPoint:CGPointMake(10, 10)];
My problem is that I really want to use this setup (manager) to load textures that I can bind and use in a more typical OpenGL way.

e.g.
Code:
glBindTexture(GL_TEXTURE_2D, cubeTexture[0]);
I have this so far:

Code:
Cube.h

GLTexture *testTexture[1];
GLuint cubeTexture[1];
Code:
Cube.m

testTexture[0] = [g_ResManager getTexture:@"testImage.png"];

//How do I get the texture from here (above) to this (below)?

glBindTexture(GL_TEXTURE_2D, cubeTexture[0]);
So I would very much appreciate it if anyone could give me advice / an example of how to do this.

I have written a standard texture loader before, but would really like to use the resource manager I have.

Thanks
Simo++ is offline   Reply With Quote
Old 02-11-2011, 04:36 PM   #2 (permalink)
Registered Member
 
Chobie's Avatar
 
Join Date: Feb 2011
Location: UK
Posts: 115
Chobie is on a distinguished road
Default

Have you considered using a game engine instead?

Cocos2d is extremely feature full and free.
__________________
Chobie is offline   Reply With Quote
Reply

Bookmarks

Tags
gl_texture, opengl, texture

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 376
15 members and 361 guests
blasterbr, buggen, Clouds, dre, EvilElf, jeroenkeij, jimmyon122, LEARN2MAKE, Mah6447, n00b, nyoe, pungs, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:51 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0