Changeset 1781


Ignore:
Timestamp:
Aug 20, 2012, 8:15:32 PM (7 years ago)
Author:
sam
Message:

gpu: explicitly create render targets on the Xbox 360.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/vs2010/Lol.sln

    r1778 r1781  
    471471                {1C5B8702-290C-42DA-AA9E-671348F5B747} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
    472472                {6BF81B39-EDC2-4227-9992-C2D8ABEA95AF} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
    473                 {BCEE0132-8E24-49BE-AFEB-96DAD14396BA} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
    474473                {32F3F8CF-D22E-45E4-BEB8-AD909E8C5515} = {33704AA4-F2B5-4138-A40D-E3E77F89ED46}
    475474                {EE203B88-44CF-4859-9D42-7A5F40FECB52} = {8C77EAA8-1077-4EF7-AE53-97C6C60A3601}
  • trunk/src/gpu/framebuffer.cpp

    r1775 r1781  
    6464{
    6565    m_data->m_size = size;
    66 #if defined USE_D3D9 || defined _XBOX
     66#if defined USE_D3D9
    6767    if (FAILED(g_d3ddevice->CreateTexture(size.x, size.y, 1,
    6868                                          D3DUSAGE_RENDERTARGET,
     
    7171        Abort();
    7272    if (FAILED(m_data->m_texture->GetSurfaceLevel(0, &m_data->m_surface)))
     73        Abort();
     74#elif defined _XBOX
     75    if (FAILED(g_d3ddevice->CreateTexture(size.x, size.y, 1, 0,
     76                                          D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT,
     77                                          &m_data->m_texture, NULL)))
     78        Abort();
     79    if (FAILED(g_d3ddevice->CreateRenderTarget(size.x, size.y,
     80                                               D3DFMT_A8R8G8B8,
     81                                               D3DMULTISAMPLE_NONE, 0, 0,
     82                                               &m_data->m_surface, NULL)))
    7383        Abort();
    7484#else
     
    181191void FrameBuffer::Unbind()
    182192{
    183 #if defined USE_D3D9 || defined _XBOX
     193#if defined USE_D3D9
    184194    if (FAILED(g_d3ddevice->SetRenderTarget(0, m_data->m_back_surface)))
    185195        Abort();
     196    m_data->m_back_surface->Release();
     197#elif defined _XBOX
     198    if (FAILED(g_d3ddevice->Resolve(D3DRESOLVE_RENDERTARGET0, NULL,
     199                                    m_data->m_texture, NULL, 0, 0, NULL,
     200                                    0, 0, NULL)))
     201        Abort();
     202    if (FAILED(g_d3ddevice->SetRenderTarget(0, m_data->m_back_surface)))
     203        Abort();
     204    m_data->m_back_surface->Release();
    186205#else
    187206#   if GL_VERSION_1_1 || GL_ES_VERSION_2_0
Note: See TracChangeset for help on using the changeset viewer.