We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1057 - SDL_UpdateTexture broken on iPhone
Summary: SDL_UpdateTexture broken on iPhone
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: iPhone/iPod touch iOS 3
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-21 12:16 UTC by Pavel Kanzelsberger
Modified: 2013-05-21 01:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Kanzelsberger 2010-09-21 12:16:34 UTC
SDL_UpdateTexture seems to work fine with OpenGL renderer on MacOSX, however when I run the very same code on iPhone using OpenGL ES, SDL_UpdateTexture seems to be broken. In fact it won't update the requested area of texture from surface but rather fill with some random pixels. It won't produce any crashes so I'm not able to post any more information from debugger...
Comment 1 Nathaniel J Fries 2011-01-07 22:02:57 UTC
looking at the "SetupTextureUpdate" functions for the two different renderers, I see that the GLES one binds the texture inside the function; the GL one does it after the glEnable call in SDL_UpdateTexture. Both call glPixelStorei. Perhaps glPixelStorei needs to be called BEFORE glEnable (glPixelStorei is called in both versions of SetupTextureUpdate)

I've never used glPixelStorei personally, so I don't know. It's just a difference noted between something that works and something that doesn't.
Comment 2 Sam Lantinga 2011-02-16 03:57:05 UTC
Can you retest with the latest snapshot?  The OpenGL/ES* renderers have gotten a bunch of love (and maybe bugs!) lately. :)
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!