Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Kid A

SDL_GL_GetProcAddress()

This topic is 6028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am having problems using SDL_GL_GetProcAddress() to get function addresses of opengl extensions. The sample on libsdl.org crashes when i try it. It says to do something like
    
typedef void (*glActiveTextureARB_Func)(unsigned int);
.
.
.
glActiveTextureARB_Func glActiveTextureARB_ptr =
    (glActiveTextureARB_Func)SDL_GL_GetProcAddress("glActiveTextureARB");
    
Trying to use the function pointer now creates an exception ... I don't really get how this should work, cos in glExt.h glActiveTextureARB() is defined as __stdcall but this declare doesnt have that so of course it's going to fail when it attempts to call it? Currently my drawing code that uses standard gl functions works fine ... so I have a console but no game map polygons :-( Would appreciate any help from someone who has got this working, Thanks, EDIT: formatting Edited by - Kid A on February 18, 2002 5:20:26 PM

Share this post


Link to post
Share on other sites
Advertisement
Hmm I have the extensions being called now, added __stdcall if on win32 and its happy.... but it still doesnt work.

As far as I can tell SDL is initialising fine ... the window shows up and drawing my console and fonts works fine, its only the code that draws the main level that doesnt display anything ... and it''s the only code that uses extensions. No OpenGL calls I''m making return any sort of error value ... and the rendering code in question worked before I started to port to SDL and it hasn''t been touched, only window creation and the main loop ... so its annoying (yes the rendering code is being reached), I think I''ll have to stop using extensions and make sure the basic drawing works, then add the use of extensions ... *sigh*

I need an SDL guru :-(

Oh and where can I get OpenGL 1.3 libraries for msvc++? cos I have a bad feeling its something to do with having OpenGL 1.1 libraries or something and mapping extension functions which have become part of the spec in 1.3 ...... probably just me though

Also I may try using SDL_GL_LoadLibrary() and mapping every function with SDL_GL_GetProcAddress(), that maaay help but who knows

Thanks for any help,

Share this post


Link to post
Share on other sites
quote:
Original post by Kid A
Oh and where can I get OpenGL 1.3 libraries for msvc++? cos I have a bad feeling its something to do with having OpenGL 1.1 libraries or something and mapping extension functions which have become part of the spec in 1.3 ...... probably just me though

You can''t get 1.3 libraries for MSVC. The most recent version available is 1.1. OpenGL 1.2 and 1.3 features are available through the extension mechanism.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!