Good suggestion.? But I double-checked it and the function declaration I have for SDL_CreateWindow is correct.
Mason________________________________
From: Vittorio Giovara <vitto.giova at yahoo.it>
Subject: Re: [SDL] Strange error on SDL_CreateRenderer
as a shot in the dark, are you sure that the delphi bindings are
correct? We’ve had a lot of troubles (up to stack corruption) because
of wrong bindings in freepascal, so that might apply to you as well.
We used the SDL_Renderer as a hidden pointer, with type “pointer” and
it worked fine.
Vittorio
On Mon, Nov 28, 2011 at 5:08 PM, Mason Wheeler <@Mason_Wheeler> wrote:
I’m using Delphi both times.? The essential difference here is between
SDL_CreateWindow and SDL_CreateWindowFrom.? (And it’s the
SDL_CreateWindowFrom version, the one that’s supposed to be experimental and
not well-tested, that works right!)
From: Alex Barry <alex.barry at gmail.com>
Subject: Re: [SDL] Strange error on SDL_CreateRenderer
Well, I wouldn’t think this is a graphics card error, as Mason said he has
the same code working with some sort of delphi bindings. ?The issue here is
either the delphi->c translation or an SDL issue. ?Mason, are you able to
provide some code snippets from both your delphi and c versions of the code?
-Alex
On Mon, Nov 28, 2011 at 10:32 AM, Jeremy Jurksztowicz wrote:
I tried a few search engines but could not come up with anything. I think
you should get an award for finding a new kind of bug.
Seriously, I’m just offering moral support. Have you thought of e-mailing
the developers of your graphics card drivers? They probably know more than
anyone else. You might also try to reproduce the bug without SDL, maybe by
copying the code SDL uses to instantiate the weird error.
On Mon, Nov 28, 2011 at 11:21 PM, Mason Wheeler <@Mason_Wheeler> wrote:
…anybody?
From: Mason Wheeler <@Mason_Wheeler>
Subject: [SDL] Strange error on SDL_CreateRenderer
When I use my Delphi component to embed a SDL_Window on a form, everything
works fine.? But now I’m trying to work with SDL’s own window creation, and
things aren’t going so well.
I can create the window with SDL_CreateWindow, attach an OpenGL rendering
context, and everything seems like it’ll be fine, right up? until I call
SDL_CreateTextureFromSurface.? It fails with the message ‘glTexImage2D():
GL_INVALID_ENUM’.
That’s not very informative, so I ran it through gDEBugger, and the first
sign that something went wrong was when it calls wglMakeCurrent as part of
SDL_CreateRenderer.? It reports a very strange OpenGL error that I can’t
find any useful information on in Google:
Error Code: AP_USING_SOFTWARE_RENDERER_ERROR
Error Description: Context 2 is rendered using a software renderer (Vendor:
, Renderer: )
After this point, trying to create a texture results in a storm of
GL_INVALID_ENUM errors on glTexParameteri, glTexImage2D and glTexSubImage2D
calls, and the SDL_CreateTextureFromSurface call fails.? Anyone have any
idea what’s going on here?
Mason
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org