Ignore:
Timestamp:
05/27/14 16:26:53 (11 years ago)
Author:
epyon
Message:
  • gl library wgl support
  • gl context and window adoption
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_device.cc

    r229 r245  
    2020}
    2121
     22window* nv::gl_device::adopt_window( void* sys_w_handle, void* sys_dc )
     23{
     24        return new gl_window( this, sys_w_handle, sys_dc );
     25}
     26
     27
     28
    2229gl_device::gl_device()
    2330{
     
    3946                return; // TODO: Error report
    4047        }
    41 #endif
    42 
    43 //      bpp = m_info->vfmt->BitsPerPixel;
    44 
    45         SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
    46         SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
    47         SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
    48         SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24 );
    49         SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
    50 
    51 //      SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 );
    52 //      SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4 );
    53 
    54 #if NV_SDL_VERSION == NV_SDL_20
    55         SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
    56         SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
    57         SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    58         SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
    5948#endif
    6049
Note: See TracChangeset for help on using the changeset viewer.