Java, SDL, and OSX

Greets, just wondered whether anybody could point out if there is, and
where to obtain, a Java wrapper for SDL (for OS X 10.1); I’ve a just
started to try to use Java for serious dev, and haven’t even touched the
JNI section yet, but I’m assuming a wrapper would be something similar
to an SDL class with SDL_Surface-esque members, SDL_FreeSurface()-esque
methods?

Thanks for any info,

Mark--

“Doubt is not a pleasant condition, but certainty is an absurd one.”
~Voltaire

Mark Bishop wrote:

Greets, just wondered whether anybody could point out if there is, and
where to obtain, a Java wrapper for SDL (for OS X 10.1); I’ve a just
started to try to use Java for serious dev, and haven’t even touched
the JNI section yet, but I’m assuming a wrapper would be something
similar to an SDL class with SDL_Surface-esque members,
SDL_FreeSurface()-esque methods?

Thanks for any info,

Mark


“Doubt is not a pleasant condition, but certainty is an absurd one.”
~Voltaire


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

http://jsdl.sourceforge.net/ maybe?

No updates since late 2002, so looks like it’s been abandoned, and
probably will be out of sync with the current SDL version.
Oh well, C it is for now, and I’ll investigate JOGL when I upgrade my
decrepit OS X box…

Thanks,

Mark

“Doubt is not a pleasant condition, but certainty is an absurd one.”
~VoltaireOn Thursday, March 4, 2004, at 07:54 pm, Dirk wrote:

http://jsdl.sourceforge.net/ maybe?

Hi
I just downloaded the SDL_opengl.h from CVS, as that one is newer than
the one released with 1.2.7. Anyway - there are some extensions in there
I need, like the GL_ARB_vertex_program extensions.

Now my question:
I included the SDL_opengl and defined the GL_GLEXT_PROTOTYPES
preprocessor variable. If I haven’t missed anything in the SDL_opengl.h
functions like glBindProgramARB should be available now, but my compiler
still says no.

So did I miss anything or do I still have to get all those function
pointers with SDL_GL_GetProcAddress?

BR
Arne

did you just install the header file? you need to
install the library associated with that header to use
all the features described in it.

— Arne Claus wrote:> Hi

I just downloaded the SDL_opengl.h from CVS, as that
one is newer than
the one released with 1.2.7. Anyway - there are some
extensions in there
I need, like the GL_ARB_vertex_program extensions.

Now my question:
I included the SDL_opengl and defined the
GL_GLEXT_PROTOTYPES
preprocessor variable. If I haven’t missed anything
in the SDL_opengl.h
functions like glBindProgramARB should be available
now, but my compiler
still says no.

So did I miss anything or do I still have to get
all those function
pointers with SDL_GL_GetProcAddress?

BR
Arne


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th

Hi
I just downloaded the SDL_opengl.h from CVS, as that
one is newer than
the one released with 1.2.7. Anyway - there are some
extensions in there
I need, like the GL_ARB_vertex_program extensions.

Now my question:
I included the SDL_opengl and defined the
GL_GLEXT_PROTOTYPES
preprocessor variable. If I haven’t missed anything
in the SDL_opengl.h
functions like glBindProgramARB should be available
now, but my compiler
still says no.

So did I miss anything or do I still have to get
all those function
pointers with SDL_GL_GetProcAddress?

steve geinitz wrote:

did you just install the header file? you need to
install the library associated with that header to use
all the features described in it.

Maybe I see this wrong, but a missing library would produce linking
errors and not compiler errors, wouldn’t it?
My problem is, that the compiler doesn’t even accept the function
prototypes - and - I don’t think you need a library for that header
because (tell me wrong if not so) all that functions are driver or
something else depenendent, that’s why I have to do all this “get
function pointer” stuff normally (at last I never figured that out
correctly - that’s just what I am comfortable to think of =).

I thought those opengl extension headers do that SDL_GL_GetProcAddress
stuff in another fancy way for me so I don’t need that anymore and thus
I can use the functions directly …?

BR
Arne

Arne Claus wrote:

Maybe I see this wrong, but a missing library would produce linking
errors and not compiler errors, wouldn’t it?
My problem is, that the compiler doesn’t even accept the function
prototypes - and - I don’t think you need a library for that header
because (tell me wrong if not so) all that functions are driver or
something else depenendent, that’s why I have to do all this “get
function pointer” stuff normally (at last I never figured that out
correctly - that’s just what I am comfortable to think of =).

I thought those opengl extension headers do that SDL_GL_GetProcAddress
stuff in another fancy way for me so I don’t need that anymore and
thus I can use the functions directly …?

No, they don’t do that. These headers just provide you with prototypes
for some of the function pointers (so that you can declare your function
pointers easily). You still have to call SDL_GL_GetProcAddress to get
the function pointer values before you use them.

The reason you have to do that is that on different OpenGL
implementations, you might have different extensions available. So if
you link to these functions dynamically, that would fail at run-time.
Also, if you want to dynamically choose your opengl library (for example
if you have multiple opengl libs with different functionalities), you
also have to resort to SDL_GL_GetProcAddress.

Also, note that pointer function loading inside SDL is, at the very
least, very complicated to do ; and even if that was done, should SDL
forget to load one extension (because this is a new extension for
example), you’d still have to load the remaining pointers by yourself.
Not to mention the mess to distinguish between what SDL loads and what
you have load yourself.
Plus you’d have to check the function pointer values anyway to act
accordingly (have a different code path as a fallback, for example).
So yes, using extensions under OpenGL will take a little effort on your
part (nothing compared to the windows programmers that have to get the
pointers for any function above OpenGL 1.1 themselves :wink:

Oh, and in case you need a bleeding-edge extension that’s not in
SDL_opengl.h, you can still resort to glext.h. That file (available from
the sgi website) holds a complete up-to-date list of opengl extensions
(same thing with this file, you have to declare GL_GLEXT_PROTOTYPES).

Stephane