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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 01-08-2010, 03:52 AM   #1 (permalink)
Divine avenger
 
Johanovski's Avatar
 
Join Date: Nov 2009
Location: Vic, Catalunya (Spain)
Posts: 320
Default How to take a screen image with OpenGL?

Hi there!

I'm wondering if it's possible to take a screen image and then use it in OpenGL. I want to take a screenshot during the game loading so I can then print only the screenshot and release any other images that were loaded (so user will see the frozen game image but all game data will be released and no bad accesses will be thrown), it is possible? Are there any methods of taking the screenshot and then naming, saving and getting it?

Thanks!
Johanovski is offline   Reply With Quote
Old 01-08-2010, 04:41 AM   #2 (permalink)
Maker of Games
 
Mr Jack's Avatar
 
Join Date: Nov 2009
Location: Coventry, UK
Posts: 395
Default

Why isn't the organizer method of taking a screen shot suitable in this case?

You could use glReadPixels or the Apple get screen shot function I can't remember the name of; but for what you want to do it sounds like it'd be a lot more hassle than just using the organizer.
__________________


Visit Mr Jack Games for my blog and more about my games
Mr Jack is offline   Reply With Quote
Old 01-08-2010, 02:23 PM   #3 (permalink)
Registered Member
 
yarri's Avatar
 
Join Date: Jan 2010
Posts: 4
Default

Quote:
Originally Posted by Johanovski View Post
I'm wondering if it's possible to take a screen image and then use it in OpenGL.
I use something like this to capture the EAGLview screenshot and stuff it into a texture:

UIGraphicsBeginImageContext(myView.bounds.size);
[myView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Texture2D *tex = [[Texture2D alloc] initWithImage:viewImage];


--yarri
yarri is offline   Reply With Quote
Reply

Bookmarks

Tags
image, opengl, screen, screenshot

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: 318
20 members and 298 guests
@sandris, ADY, dacapo, Dani77, djohnson, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

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