No capability to take a screenshot on iphone.
by Bret Patterson · in iTorque 2D · 08/20/2009 (11:04 pm) · 9 replies
Just curious if there is a reason why the screenshot capability was disabled on the iPhone? Does it not work or was there another reason?
I'm curious because I was loosely planning to take a screenshot of the current game when saving the game to show on the load saved game menu.
Taken from demoGame.cc
I'm curious because I was loosely planning to take a screenshot of the current game when saving the game to show on the load saved game menu.
Taken from demoGame.cc
ConsoleFunction(screenShot, void, 3, 3, "(string file, string format)"
"Take a screenshot.nn"
"@param format One of JPEG or PNG.")
{
#ifndef TORQUE_OS_IPHONE
// PUAP -Mat no screenshots on iPhone can do it from XcodeAbout the author
#2
08/21/2009 (3:23 am)
^^ what he said ^^
#3
Bret, I am sure it wouldn't be too difficult to fix that code to work properly on the iPhone, assuming that glReadBuffer() / glReadPixels() is even supported by the iPhone hardware?
08/21/2009 (4:45 am)
I don't think that's what Bret had in mind guys as he wants to use frame buffer as a texture to put with the saved game that his users create.Bret, I am sure it wouldn't be too difficult to fix that code to work properly on the iPhone, assuming that glReadBuffer() / glReadPixels() is even supported by the iPhone hardware?
#4
08/21/2009 (6:18 am)
glReadPixels() is definitely supported - check out the OpenGL ES guide on ADC for any issues with that.
#5
08/21/2009 (10:34 am)
lol amazing how many people reply before reading what my post. It still compiles after uncommenting that block so I guess I'll just have to test it and see if it actually works.
#6
08/21/2009 (3:25 pm)
two people is amazing?
#7
08/21/2009 (3:55 pm)
2 out of 3 replies is a lot, especially the first two.
#8
http://getsetgames.com/2009/07/30/5-ways-to-take-screenshots-of-your-iphone-app/
Seems to be mostly the same as the code in iTGB, except it's passing GL_RGBA as format to glReadPixels(). I guess the only change the existing code needs is a check for screen format (16 or 32-bit).
08/21/2009 (4:08 pm)
Look at this:http://getsetgames.com/2009/07/30/5-ways-to-take-screenshots-of-your-iphone-app/
Seems to be mostly the same as the code in iTGB, except it's passing GL_RGBA as format to glReadPixels(). I guess the only change the existing code needs is a check for screen format (16 or 32-bit).
#9
05/04/2010 (11:18 pm)
Has anyone figured how to take a screenshot using xcode and torque script?
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders