Jump to content
  • Advertisement
Sign in to follow this  
Iftah

reinstalling video card drivers

This topic is 4857 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

edit: i wrongly blamed SDL for my badly configured computer. i changed subject to more appropriately describe my problem. perhaps need to move this thread to another forum topic (opengl? lounge?) below is the obsolete ([smile]) post: I recently upgraded to SDL 1.2.9 (from 1.2.7 i think) for some reason SDL_SetVideoMode is failing. checking my flags i found out enabling SDL_OPENGLBLIT makes SetVideo fail. checking the changes log i found that SDL_OPENGLBLIT was changed to SDL_OPENGLBLIT_OBSOLETE, but checking the sdl code there is no sign to SDL_OPENGLBLIT_OBSOLETE (dont you hate it when documentation says something that doesnt exist?) the SDL opengl tutorial in the sdl documentation says that you need to use SDL_OPENGLBLIT when using opengl with sdl... so why did it (supposebly) change to obsolete? maybe the tutorial is obsolete... anyone knows how do you use opengl with sdl this days? thanks in advance, Iftah. [Edited by - Iftah on December 2, 2005 12:22:57 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Iftah
the SDL opengl tutorial in the sdl documentation says that you need to use SDL_OPENGLBLIT when using opengl with sdl... so why did it (supposebly) change to obsolete? maybe the tutorial is obsolete...


Yes, that tutorial was written for SDL 1.2.5 I believe and holds true to SDL up to version 1.2.8 SDL 1.2.9 made that flag *officially* obselote because it was always a 'hack' to get it so you can draw SDL_Surfaces onto an OpenGL context. Anymore, you can use pure OpenGL rather and get significant performance improvements as well as functionality and features.

Quote:

for some reason SDL_SetVideoMode is failing.

checking my flags i found out enabling SDL_OPENGLBLIT makes SetVideo fail.

my bad, the SDL tutorial says to use SDL_OPENGL,
but again this makes SetVideo fail.


If OpenGL is failing altogether, what are your parameters sent in to the program? Chances are either a display mode cannot be used, or worse, something is wrong with your computer and OpenGL, perhaps driver related. To be sure though, let's see some code first, and then if nothing can be seen wrong with that you might need to head over to NeHe's site to download a few OpenGL tutorials and see if they can run at all.

Share this post


Link to post
Share on other sites
thank you Drew,

I tried nehe tut number2 and it complains about opengl context also [sad]

I posted another thread about my problem and mentioned there that my computer is fresh after format so it may be driver issues.
i had code working before the format and after the only thing that changed was the sdl version and opengl_blit flag so i blamed sdl...

windows update says i have the most updated driver...
*sigh*

any tips on reinstalling drivers?

Iftah.

Share this post


Link to post
Share on other sites
typed up a quick, simple main.cpp for you in case you'd like to test it. works fine on my system with sdl 1.2.9 and vc2k5 express.


#ifdef WIN32
#pragma comment( lib, "sdl.lib" )
#pragma comment( lib, "sdlmain.lib" )
#pragma comment( lib, "opengl32.lib" )
#include <SDL_opengl.h>
#endif

#include <SDL.h>
#include <GL/gl.h>

#include <cstdlib>
#include <iostream>

int main( int argc, char *argv[] )
{
if( SDL_Init( SDL_INIT_VIDEO ) )
{
std::cout << "failed to init video: " << SDL_GetError() << std::endl;
return EXIT_FAILURE;
}
atexit( SDL_Quit );
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 6 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
if( !SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL ) )
{
std::cout << "failed to set video mode: " << SDL_GetError() << std::endl;
return EXIT_FAILURE;
}
glClearColor( 0.0, 0.0, 0.0, 0.0 );
bool quit = false;
while( !quit )
{
SDL_Event e;
while( SDL_PollEvent( &e ) )
{
switch( e.type )
{
case SDL_QUIT:
quit = true;
break;
case SDL_KEYDOWN:
if( e.key.keysym.sym == SDLK_ESCAPE )
quit = true;
break;
default:
break;
}
}
glClear( GL_COLOR_BUFFER_BIT );
SDL_GL_SwapBuffers();
}
return EXIT_SUCCESS;
}



edit: forgot the doublebuffer [grin]

Share this post


Link to post
Share on other sites
Quote:
Original post by Iftah
thank you Drew,

I tried nehe tut number2 and it complains about opengl context also :(

I posted another thread about my problem and mentioned there that my computer is fresh after format so it may be driver issues..

windows update says i have the most updated driver...
*sigh*

any tips on reinstalling drivers?

Iftah.


it sounds like you need to download a real driver from the hardware vendor. do you know what card or chipset you have?

Share this post


Link to post
Share on other sites
Quote:
Original post by Iftah
any tips on reinstalling drivers?


It depends on if you have a name brand video card, or integrated graphics. If you have a ATI or NVIDIA based card, then you can go to the respective site and download their driver package for the model you have and that should take care of that. Otherwise, you will need to at least find your driver CD for your computer and install those drivers off of there, then update. If you at least can find out what the card/model/version is, you *should* be able to find something with Google.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!