Ignore:
Timestamp:
Aug 18, 2012, 9:26:03 PM (10 years ago)
Author:
sam
Message:

gpu: create the ShaderTexture class, replace Shader::SetTexture with a
Shader::SetUniform override, and implement most of the FBO code for
the Direct3D backend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/shader.cpp

    r1690 r1773  
    537537}
    538538
    539 void Shader::SetTexture(ShaderUniform const &uni, int id, int index)
    540 {
    541 #if defined USE_D3D9 || defined _XBOX
    542     /* FIXME: unimplemented */
     539void Shader::SetUniform(ShaderUniform const &uni, ShaderTexture tex, int index)
     540{
     541#if defined USE_D3D9 || defined _XBOX
     542    g_d3ddevice->SetTexture(index, (LPDIRECT3DTEXTURE9)tex.m_flags);
    543543#elif !defined __CELLOS_LV2__
    544544    glActiveTexture(GL_TEXTURE0 + index);
    545545    //glEnable(GL_TEXTURE_2D);
    546     glBindTexture(GL_TEXTURE_2D, id);
     546    glBindTexture(GL_TEXTURE_2D, (int)tex.m_flags);
    547547    SetUniform(uni, index);
    548548#else
Note: See TracChangeset for help on using the changeset viewer.