- On Windoze,
I think people will take you more seriously if you spell names correctly,
regardless of what you think of them
Sorry about that.
- SDL_image functions as well as the SDL_LoadBMP( ) function,
all return images in top-to-bottom scanline order. This is a
GOOD thing, but should be mentioned somewhere - for example,
TGA and BMPs are stored the other way round, so my texture
coordinates went for a toss when I shifted from native
functions to SDL functions…
That’s your problem. I’m not going to add “SDL_LoadBMP() does not load
your image upside-down” to the docs. sorry. Nor “SDL_Init does not
play ‘God Save the Queen’ when invoked at tea-time”.
I’m sorry, but the two do not compare! An OpenGL newbie is not
going to realise out of the blue that the texture coordinates
given in examples from Nate Robins’s and NeHe’s tutorials work
because of the formats and the loaders they use - you might find
it “DUH!”, but this “Aha!” experience is not likely to strike
most mortals immediately.
- On Windoze, SDL automatically overrides my main( ) method
IIRC, it overrides WinMain, not main. This is done in the interests of
portability since everyone ELSE uses main.
(NOTE: Refer to the sources for SDL 1.2.3 for the following.)
“SDL_main.h” #defines main to SDL_main( ).
In console mode, main( ) is the entry point into the app, while
it is WinMain( ) for windowed applications.
SDL_main.c produces a “real” main( ) only for MSVC on
Windows - therefore, GCC/MinGW is not able to find a
main( ) for console apps.
For console apps, the console_main( ) function does some initialisations,
including calling SDL_Init( ) and then
calls the original main( ).
My point is this: if in any case I must call SDL_Init( ) before
using SDL functions, this function can do all the
initialisations it wants and leave my main( ) alone. If I happen
to compile with -mwindows (on MinGW), the WinMain( ) from SDL_main
can do all Win32-specific stuff and then call the main( ) in my
program. In either cases, my main( ) can be left alone. At least
from the SDL_main.c sources and header files, it appears that
the simpler scheme will also achieve pretty much the same
Again, read the sources. SDL does know the difference between console and
GUI apps under win32. SDL will not redirect STDIO if you compile as a
RTFS! It does it only for WinCE.
- Rather than having to #define NO_SDL_GLEXT (I get errors
otherwise), the default should be the other way - I should
explicitly #define SDL_GLEXT for SDL to correctly load “glext.h”.
Read include/SDL_opengl.h starting with the comments around line 307.
Huh? For SDL 1.2.3, 307 is the last line of SDL_opengl.h and doesn’t
have much info.
Anyways, thanks a lot for your help and comments.
Ranjit.>From: Mattias Engdeg
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.