Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
DIV 2.97 KB | None | 0 0
  1. === modified file 'src/graphic/render/surface_opengl.cc'
  2. --- src/graphic/render/surface_opengl.cc    2010-06-17 15:32:50 +0000
  3. +++ src/graphic/render/surface_opengl.cc    2010-08-04 17:51:58 +0000
  4. @@ -112,7 +112,7 @@
  5.          m_tex_w != static_cast<uint32_t>(surface->w) OR
  6.          m_tex_h != static_cast<uint32_t>(surface->h))
  7.     {
  8. -       //log("SurfaceOpenGL: convert surface for opengl\n");
  9. +       log("SurfaceOpenGL: convert surface for opengl\n");
  10.         surface = SDL_CreateRGBSurface
  11.             (SDL_SWSURFACE, m_tex_w, m_tex_h,
  12.              32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000);
  13. @@ -127,11 +127,11 @@
  14.     SDL_PixelFormat CONST & fmt = *surface->format;
  15.     Bpp = fmt.BytesPerPixel;
  16.  
  17. -   /* log
  18. +    log
  19.         ("SurfaceOpenGL::SurfaceOpenGL(SDL_Surface) Size: (%d, %d) %db(%dB) ",
  20.          m_tex_w, m_tex_h,
  21.          fmt.BitsPerPixel, Bpp);
  22. -   log("R:%X, G:%X, B:%X, A:%X", fmt.Rmask, fmt.Gmask, fmt.Bmask, fmt.Amask); */
  23. +   log("R:%X, G:%X, B:%X, A:%X", fmt.Rmask, fmt.Gmask, fmt.Bmask, fmt.Amask);
  24.  
  25.     glPushAttrib(GL_PIXEL_MODE_BIT);
  26.     bool pushed = NOT (handle_glerror() == GL_STACK_OVERFLOW);
  27. @@ -144,9 +144,9 @@
  28.         {
  29.             IF (fmt.Amask == 0xff000000)
  30.             {
  31. -               pixels_format = GL_RGBA; //log(" RGBA 8888 ");
  32. +               pixels_format = GL_RGBA; log(" RGBA 8888 ");
  33.             } ELSE {
  34. -               pixels_format = GL_RGBA; //log(" RGB 8880 ");
  35. +               pixels_format = GL_RGBA; log(" RGB 8880 ");
  36.                 // Read four bytes per pixel but ignore the alpha value
  37.                 glPixelTransferi(GL_ALPHA_SCALE, 0);
  38.             }
  39. @@ -156,9 +156,9 @@
  40.         {
  41.             IF (fmt.Amask == 0xff000000)
  42.             {
  43. -               pixels_format = GL_BGRA; //log(" BGRA 8888 ");
  44. +               pixels_format = GL_BGRA; log(" BGRA 8888 ");
  45.             } ELSE {
  46. -               pixels_format = GL_BGRA; //log(" BGR 8880 ");
  47. +               pixels_format = GL_BGRA; log(" BGR 8880 ");
  48.                 // Read four bytes per pixel but ignore the alpha value
  49.                 glPixelTransferi(GL_ALPHA_SCALE, 0);
  50.             }
  51. @@ -171,12 +171,12 @@
  52.             (fmt.Rmask == 0x000000ff AND fmt.Gmask == 0x0000ff00 AND
  53.              fmt.Bmask == 0x00ff0000)
  54.         {
  55. -           pixels_format = GL_RGB; //log(" RGB 888 ");
  56. +           pixels_format = GL_RGB; log(" RGB 888 ");
  57.         } ELSE IF
  58.             (fmt.Bmask == 0x000000ff AND fmt.Gmask == 0x0000ff00 AND
  59.              fmt.Rmask == 0x00ff0000)
  60.         {
  61. -           pixels_format = GL_BGR; //log(" BGR 888 ");
  62. +           pixels_format = GL_BGR; log(" BGR 888 ");
  63.         } ELSE
  64.             throw wexception("OpenGL: Unknown pixel format");
  65.         pixels_type = GL_UNSIGNED_BYTE;
  66. @@ -184,17 +184,17 @@
  67.     {
  68.         IF (fmt.Rmask == 0xF800 AND fmt.Gmask == 0x7E0 AND fmt.Bmask == 0x1F)
  69.         {
  70. -           pixels_format = GL_RGB; //log(" RGB 565");
  71. +           pixels_format = GL_RGB; log(" RGB 565");
  72.         } ELSE IF
  73.             (fmt.Bmask == 0xF800 AND fmt.Gmask == 0x7E0 AND fmt.Rmask == 0x1F)
  74.         {
  75. -           pixels_format = GL_BGR; //log(" BGR 565");
  76. +           pixels_format = GL_BGR; log(" BGR 565");
  77.         } ELSE
  78.             assert(false);
  79.         pixels_type = GL_UNSIGNED_SHORT_5_6_5;
  80.     } ELSE
  81.         throw wexception("OpenGL: Unknown pixel format");
  82. -   //log("\n");
  83. +   log("\n");
  84.  
  85.     // Let OpenGL create a texture object
  86.     glGenTextures(1, &texture);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement