I guess when you want to go all software, you create what is called a Software renderer, isn’t ?
But then, how do you blit your software surfaces on it ? SDL_BlitSurface only copies data
from a surface to another, not to a renderer.
sdl at lists.libsdl.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
or, via email, send a message with subject or body ‘help’ to
sdl-request at lists.libsdl.org
You can reach the person managing the list at
sdl-owner at lists.libsdl.org
When replying, please edit your Subject line so it is more specific
than “Re: Contents of SDL digest…”
Today’s Topics:
- Re: Touch and Rotation on iOS (Armin Ronacher)
- Re: SDL_RenderSetScissor (Nathaniel J Fries)
- Re: SDL 1.3 and iOS - Returning to an app issue. (eclectocrat)
- Re: SDL 1.3 and iOS - Returning to an app issue. (eclectocrat)
- Blit to the screen in 1.3 (Julien CLEMENT)
- Re: Blit to the screen in 1.3 (eclectocrat)
Message: 1
Date: Sun, 08 May 2011 02:24:32 +0200
From: Armin Ronacher <armin.ronacher at active-4.com>
To: sdl at lists.libsdl.org
Subject: Re: [SDL] Touch and Rotation on iOS
Message-ID: <4DC5E2C0.5050703 at active-4.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
Alright, the problem is definitively the view. SDL does something
horrible there. Things I know so far:
- SDL totally fucks up the view frame. It disables auto resizing but
something still does something in there because the frame of the
window ends up being different to the frame of the view. If the
frame of the view is “fixed” all becomes worse as now the rendering
is equally fucked at that point (right side of screen black).
- Whowever wrote that rotation code in SDL had something in mind that
(no longer?) works as intended. It certainly serves/served a purpose
but without documentation it’s not quite clear what it does.
- Even if it work work as expected, the touch code in SDL would still
be wrong as it never takes rotations into account.
I came up with a horrible hack that fixes this by doing two things
- Ignore boundaries of views and always returns the only view we have
in the hitTest of the window.
- Update the touch internals on rotations.
This is the patch:
http://paste.pocoo.org/show/384923/ [for view]
http://paste.pocoo.org/raw/384923/ [for donwload]
I totally do not recommend to check this in, but at least it’s a
workaround for the moment. I will have to check the history log to see
who came up with the rotation code, maybe something in the log messages
reveals the intent. I certainly must be missing something, because from
looking at that code it does not make a lot of sense. I can’t imaging
that a misaligned UIView is the intention. Right now my idea is that
the badly placed UIView might be an accident and another mistake sortof
fixed that original problem good enough that nobody noticed for a while.
I am quite happy to have a look at that code but I would really need the
input of the original developer to understand why the code is doing
things that way.
Regards,
Armin
Message: 2
Date: Sat, 07 May 2011 18:45:53 -0700
From: “Nathaniel J Fries”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL_RenderSetScissor
Message-ID: <1304819152.m2f.28850 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”
I am having issues with the OpenGL implementation on Windows 7 (64-bit, with 32-bit binaries). I’ve spent about an hour working on it now and need to move on. If someone could look into it, I’d be greatful.
The software renderer seems to be ignoring the clip rect, so I’m switching my focus to that.
EM3 Nathaniel Fries, U.S. Navy
http://natefries.net/
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110507/149852f9/attachment-0001.htm
Message: 3
Date: Sat, 07 May 2011 20:45:19 -0700
From: “eclectocrat”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 1.3 and iOS - Returning to an app issue.
Message-ID: <1304826319.m2f.28851 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”
Hello!
I mucked around with the SDL_render_gles2.c file and managed to make a workaround for the GL program caching infinite loop. It’s not really a fix, because I haven’t addressed the fundamental problem of the linked list being constructed incorrectly.
In the GLES2_CacheProgram change:
Code:
/* Check if we’ve already cached this program */
entry = rdata->program_cache.head;
while (entry)
{
if (entry->vertex_shader == vertex && entry->fragment_shader == fragment)
break;
entry = entry->next;
}
To:
Code:
/* Check if we’ve already cached this program */
entry = rdata->program_cache.head;
while (entry)
{
if (entry->vertex_shader == vertex && entry->fragment_shader == fragment)
break;
/* Quick 'n dirty hack! The linked list is not managed properly. */
if(entry == rdata->program_cache.tail)
{
entry = 0;
break;
}
entry = entry->next;
}
I’m working off an old snapshot and still haven’t learned about patching and diff files [Embarassed], too much of my own work to wrap my head around, but this little tweak has allowed me to minimize and restore to my hearts content. One POSSIBLE side effect (because I don’t know the structure of the malformed linked list), is that duplicate program caching may occur, but it should never get out of hand because further down the same function there is a safeguard to prevent boundless caching.
Once I’ve finished with my project I promise I’ll learn to patch!
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110507/2ea8da62/attachment-0001.htm
Message: 4
Date: Sun, 08 May 2011 00:23:06 -0700
From: “eclectocrat”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 1.3 and iOS - Returning to an app issue.
Message-ID: <1304839386.m2f.28852 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”
AAaaargh!
Nevermind. My program was apparently working fine, but when drawing certain largish images the thing slows to a crawl. My ‘workaround’ as it turned out was being indirectly called by GLES2_RenderCopy zillions of times and for whatever reason couldn’t gracefully handle large images. My guess is that the code I changed made the cache hit rate 0 and so new shaders were being made every draw. I’ll get around to fixing the linked list at some point…
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110508/136ca519/attachment-0001.htm
Message: 5
Date: Sun, 8 May 2011 13:01:26 +0200
From: Julien CLEMENT <@Julien_Clement1>
To: sdl at lists.libsdl.org
Subject: [SDL] Blit to the screen in 1.3
Message-ID: <5F0D494E-8ACC-45A3-A62A-D0F591E2F06D at yahoo.fr>
Content-Type: text/plain; charset=us-ascii
Hello everybody,
I’ve begun to read about the 1.3 version and am trying to understand
how things have changed since 1.2.
For what I’ve understood, SDL_Surface reside now only in software memory
and are used to perform software operations and also as a “bridge” to
build textures.
SDL_Texture reside in video memory only and cannot be blit between each other.
My question is : whenever I want to blit information to the screen, do I necessarily need
to pass through a texture ?
Thanks !
Julien CLEMENT
@Julien_Clement1
Message: 6
Date: Sun, 08 May 2011 07:57:39 -0700
From: “eclectocrat”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] Blit to the screen in 1.3
Message-ID: <1304866659.m2f.28854 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”
You got it! I’m no expert but as I understand it all video will pass through the video card as a texture eventually. But you can go ahead and just use surface interface and let SDL handle the textures behind the scenes. Textures are a lot faster, but 2D stuff on desktop systems should be fine with surfaces (works for me anyways).
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110508/0701f9d4/attachment.htm
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
End of SDL Digest, Vol 53, Issue 23