Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- === modified file 'src/graphic/render/surface_opengl.cc'
- --- src/graphic/render/surface_opengl.cc 2010-06-17 15:32:50 +0000
- +++ src/graphic/render/surface_opengl.cc 2010-08-04 17:51:58 +0000
- @@ -112,7 +112,7 @@
- m_tex_w != static_cast<uint32_t>(surface->w) OR
- m_tex_h != static_cast<uint32_t>(surface->h))
- {
- - //log("SurfaceOpenGL: convert surface for opengl\n");
- + log("SurfaceOpenGL: convert surface for opengl\n");
- surface = SDL_CreateRGBSurface
- (SDL_SWSURFACE, m_tex_w, m_tex_h,
- 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000);
- @@ -127,11 +127,11 @@
- SDL_PixelFormat CONST & fmt = *surface->format;
- Bpp = fmt.BytesPerPixel;
- - /* log
- + log
- ("SurfaceOpenGL::SurfaceOpenGL(SDL_Surface) Size: (%d, %d) %db(%dB) ",
- m_tex_w, m_tex_h,
- fmt.BitsPerPixel, Bpp);
- - log("R:%X, G:%X, B:%X, A:%X", fmt.Rmask, fmt.Gmask, fmt.Bmask, fmt.Amask); */
- + log("R:%X, G:%X, B:%X, A:%X", fmt.Rmask, fmt.Gmask, fmt.Bmask, fmt.Amask);
- glPushAttrib(GL_PIXEL_MODE_BIT);
- bool pushed = NOT (handle_glerror() == GL_STACK_OVERFLOW);
- @@ -144,9 +144,9 @@
- {
- IF (fmt.Amask == 0xff000000)
- {
- - pixels_format = GL_RGBA; //log(" RGBA 8888 ");
- + pixels_format = GL_RGBA; log(" RGBA 8888 ");
- } ELSE {
- - pixels_format = GL_RGBA; //log(" RGB 8880 ");
- + pixels_format = GL_RGBA; log(" RGB 8880 ");
- // Read four bytes per pixel but ignore the alpha value
- glPixelTransferi(GL_ALPHA_SCALE, 0);
- }
- @@ -156,9 +156,9 @@
- {
- IF (fmt.Amask == 0xff000000)
- {
- - pixels_format = GL_BGRA; //log(" BGRA 8888 ");
- + pixels_format = GL_BGRA; log(" BGRA 8888 ");
- } ELSE {
- - pixels_format = GL_BGRA; //log(" BGR 8880 ");
- + pixels_format = GL_BGRA; log(" BGR 8880 ");
- // Read four bytes per pixel but ignore the alpha value
- glPixelTransferi(GL_ALPHA_SCALE, 0);
- }
- @@ -171,12 +171,12 @@
- (fmt.Rmask == 0x000000ff AND fmt.Gmask == 0x0000ff00 AND
- fmt.Bmask == 0x00ff0000)
- {
- - pixels_format = GL_RGB; //log(" RGB 888 ");
- + pixels_format = GL_RGB; log(" RGB 888 ");
- } ELSE IF
- (fmt.Bmask == 0x000000ff AND fmt.Gmask == 0x0000ff00 AND
- fmt.Rmask == 0x00ff0000)
- {
- - pixels_format = GL_BGR; //log(" BGR 888 ");
- + pixels_format = GL_BGR; log(" BGR 888 ");
- } ELSE
- throw wexception("OpenGL: Unknown pixel format");
- pixels_type = GL_UNSIGNED_BYTE;
- @@ -184,17 +184,17 @@
- {
- IF (fmt.Rmask == 0xF800 AND fmt.Gmask == 0x7E0 AND fmt.Bmask == 0x1F)
- {
- - pixels_format = GL_RGB; //log(" RGB 565");
- + pixels_format = GL_RGB; log(" RGB 565");
- } ELSE IF
- (fmt.Bmask == 0xF800 AND fmt.Gmask == 0x7E0 AND fmt.Rmask == 0x1F)
- {
- - pixels_format = GL_BGR; //log(" BGR 565");
- + pixels_format = GL_BGR; log(" BGR 565");
- } ELSE
- assert(false);
- pixels_type = GL_UNSIGNED_SHORT_5_6_5;
- } ELSE
- throw wexception("OpenGL: Unknown pixel format");
- - //log("\n");
- + log("\n");
- // Let OpenGL create a texture object
- glGenTextures(1, &texture);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement