glRotate before RenderCopy

Hi,

I was looking for some way to rotate a texture, (I know there’s no roattion
API yet); but i was wondering why using a glRotatef berfore SDL_RenderCopy
doesn’t do the trick.
Why is that in GL_RenderCopy there’s no glTranslate and glVertex points the
texture at an absolute position?
Wouldn’t it be easier to add the RenderCopyRotated if glTranslate is being
used and the glVertex is always in relative positions?–
David

Try rotozoom in SDL_gfx ( http://www.ferzkopp.net/joomla/content/view/19/14/ )On 15 May 2010 23:12, David Roguin wrote:

Hi,

I was looking for some way to rotate a texture, (I know there’s no roattion
API yet); but i was wondering why using a glRotatef berfore SDL_RenderCopy
doesn’t do the trick.
Why is that in GL_RenderCopy there’s no glTranslate and glVertex points the
texture at an absolute position?
Wouldn’t it be easier to add the RenderCopyRotated if glTranslate is being
used and the glVertex is always in relative positions?


David

Hi,

I was looking for some way to rotate a texture, (I know there’s no
roattion
API yet); but i was wondering why using a glRotatef berfore
SDL_RenderCopy
doesn’t do the trick.
Why is that in GL_RenderCopy there’s no glTranslate and glVertex points
the
texture at an absolute position?
Wouldn’t it be easier to add the RenderCopyRotated if glTranslate is
being
used and the glVertex is always in relative positions?


David

Try rotozoom in SDL_gfx (
http://www.ferzkopp.net/joomla/content/view/19/14/ )

Rotozoom creates a new SDL_Surface every time, and that’s exactly what I
don’t want.
Thanks for the suggestion, though.On Sun, May 16, 2010 at 1:38 PM, Kenneth Bull wrote:

On 15 May 2010 23:12, David Roguin <@David_Roguin> wrote:


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


David

And that happens using CPU, glRotate would me much faster on GPU…

PavelSent from my iPhone

On 16.5.2010, at 18:51, David Roguin wrote:

On Sun, May 16, 2010 at 1:38 PM, Kenneth Bull wrote:
On 15 May 2010 23:12, David Roguin wrote:

Hi,

I was looking for some way to rotate a texture, (I know there’s no
roattion
API yet); but i was wondering why using a glRotatef berfore
SDL_RenderCopy
doesn’t do the trick.
Why is that in GL_RenderCopy there’s no glTranslate and glVertex
points the
texture at an absolute position?
Wouldn’t it be easier to add the RenderCopyRotated if glTranslate
is being
used and the glVertex is always in relative positions?


David

Try rotozoom in SDL_gfx ( http://www.ferzkopp.net/joomla/content/view/19/14/
)

Rotozoom creates a new SDL_Surface every time, and that’s exactly
what I don’t want.
Thanks for the suggestion, though.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


David


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’m not familiar with the implementation details of the SDL 1.3 OpenGL
backend, but I’d guess the reason is that SDL expects to manage the OpenGL
context on it’s own.

Same basic problem as with glSDL (wrapper and backend implementations alike);
it’s simply not designed to cooperate with application code messing with the
OpenGL context, so if you do that, results are undefined.

Either way, if you’re going to rely on OpenGL anyway, why not just use it
directly, using SDL only to set up the context…?On Sunday 16 May 2010, at 05.12.46, David Roguin wrote:

Hi,

I was looking for some way to rotate a texture, (I know there’s no roattion
API yet); but i was wondering why using a glRotatef berfore SDL_RenderCopy
doesn’t do the trick.


//David Olofson - Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
’---------------------------------------------------------------------’

Hi,

I was looking for some way to rotate a texture, (I know there’s no
roattion
API yet); but i was wondering why using a glRotatef berfore
SDL_RenderCopy
doesn’t do the trick.

I’m not familiar with the implementation details of the SDL 1.3 OpenGL
backend, but I’d guess the reason is that SDL expects to manage the OpenGL
context on it’s own.

Same basic problem as with glSDL (wrapper and backend implementations
alike);
it’s simply not designed to cooperate with application code messing with
the
OpenGL context, so if you do that, results are undefined.

Either way, if you’re going to rely on OpenGL anyway, why not just use it
directly, using SDL only to set up the context…?

I want to use the multiple renderers capabilities of sdl-1.3.On Sun, May 16, 2010 at 4:46 PM, David Olofson wrote:

On Sunday 16 May 2010, at 05.12.46, David Roguin <@David_Roguin> wrote:


//David Olofson - Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
’---------------------------------------------------------------------’


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


David