[SDL] OpenGL and pixel access

Olof Bjarnason objarni at dd.chalmers.se
Mon May 24 07:37:38 PDT 2004


Yup, but it is driver specific. Use glGetInteger* to find out
how much your driver supports..

/Olof

### jorgefm at cirsa.com: "Re: [SDL] OpenGL and pixel access" (2004-05-24...
#
#>> I have tried this modifications but now i get a white screen, no
#>> bitmap is displayed.
#>
#>Sounds like you failed to load or upload the texture, or to activate
#>texturing... (Most drivers give you a white default texture in such
#>cases.)
#>
#>> Something else to try ??
#>
#>Check the OpenGL error status after each call, especially the ones
#>involved in uploading the texture, and activating texturing. Also
#>check that you're actually performing all the steps necessary, of
#>course.
#>
#
#Yes, it's a texture loading problem. My bmp is 1024x768. Then i have
#resized it to 1024x1024 but i can't load it. Then i have used other bmp
#with a 256x256 texture and i have this texture displayed as the background.
#Is there any size limit to the texture you can load ?
#
#Thanks,
#Jorge
#
#
#
#
#
#|---------+---------------------------------------->
#|         |           David Olofson                |
#|         |           <david at olofson.net>          |
#|         |           Enviado por:                 |
#|         |           sdl-bounces+jorgefm=cirsa.com|
#|         |           @libsdl.org                  |
#|         |                                        |
#|         |                                        |
#|         |           24/05/2004 13:06             |
#|         |           Por favor, responda a "A list|
#|         |           for developers using the SDL |
#|         |           library. \(includes          |
#|         |           SDL-announce\)"              |
#|---------+---------------------------------------->
#  >--------------------------------------------------------------------------------------------------|
#  |                                                                                                  |
#  |     Para:     "A list for developers using the SDL library. \(includes SDL-announce\)"           |
#  |        <sdl at libsdl.org>                                                                          |
#  |     cc:                                                                                          |
#  |     Asunto:   Re: [SDL] OpenGL and pixel access                                                  |
#  >--------------------------------------------------------------------------------------------------|
#
#
#
#
#On Monday 24 May 2004 12.31, jorgefm at cirsa.com wrote:
#> >Here's some rewritten code for you, assuming that you want your
#> > picture to take up the whole screen, and not just a few pixels in
#> > one of the corners:
#> >
#> >glBegin(GL_QUADS);
#> >glNormal3f( 0.0f, 0.0f, 1.0f);
#> >glTexCoord2f(0.0f, 1.0f); glVertex3f( 0.0f,   Height, 0.0f);
#> >glTexCoord2f(1.0f, 1.0f); glVertex3f( Width,  Height, 0.0f);
#> >glTexCoord2f(1.0f, 0.0f); glVertex3f( Width,  0.0f,   0.0f);
#> >glTexCoord2f(0.0f, 0.0f); glVertex3f( 0.0f,   0.0f,   0.0f);
#> >glEnd();
#> >
#> >here, if Width and Height aren't floats, be sure to typecast them
#> > as such "(float)Width" -- I've also seen something like this
#> > "Width.f", does this do the same sort of thing?
#>
#> Hi,
#>
#>
#> I have tried this modifications but now i get a white screen, no
#> bitmap is displayed.
#
#Sounds like you failed to load or upload the texture, or to activate
#texturing... (Most drivers give you a white default texture in such
#cases.)
#
#
#> Something else to try ??
#
#Check the OpenGL error status after each call, especially the ones
#involved in uploading the texture, and activating texturing. Also
#check that you're actually performing all the steps necessary, of
#course.
#
#
#//David Olofson - Programmer, Composer, Open Source Advocate
#
#.- Audiality -----------------------------------------------.
#|  Free/Open Source audio engine for games and multimedia.  |
#| MIDI, modular synthesis, real time effects, scripting,... |
#`-----------------------------------> http://audiality.org -'
#   --- http://olofson.net --- http://www.reologica.se ---
#
#
#_______________________________________________
#SDL mailing list
#SDL at libsdl.org
#http://www.libsdl.org/mailman/listinfo/sdl
#
#
#
#
#
#_______________________________________________
#SDL mailing list
#SDL at libsdl.org
#http://www.libsdl.org/mailman/listinfo/sdl
#




More information about the SDL mailing list