Changeset 2277 for trunk/tutorial


Ignore:
Timestamp:
Jan 25, 2013, 4:48:37 PM (8 years ago)
Author:
sam
Message:

build: hide LolFx external declarations behind macros.

Location:
trunk/tutorial
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/01_triangle.cpp

    r2241 r2277  
    1919using namespace lol;
    2020
    21 extern char const *lolfx_01_triangle;
     21LOLFX_RESOURCE_DECLARE(01_triangle);
    2222
    2323class Triangle : public WorldEntity
     
    3838        if (!m_ready)
    3939        {
    40             m_shader = Shader::Create(lolfx_01_triangle);
     40            m_shader = Shader::Create(LOLFX_RESOURCE_NAME(01_triangle));
    4141            m_coord = m_shader->GetAttribLocation("in_Position", VertexUsage::Position, 0);
    4242
  • trunk/tutorial/02_cube.cpp

    r2241 r2277  
    1919using namespace lol;
    2020
    21 extern char const *lolfx_02_cube;
     21LOLFX_RESOURCE_DECLARE(02_cube);
    2222
    2323class Cube : public WorldEntity
     
    7575        if (!m_ready)
    7676        {
    77             m_shader = Shader::Create(lolfx_02_cube);
     77            m_shader = Shader::Create(LOLFX_RESOURCE_NAME(02_cube));
    7878
    7979            m_mvp = m_shader->GetUniformLocation("in_Matrix");
  • trunk/tutorial/03_noise.cpp

    r2241 r2277  
    1919using namespace lol;
    2020
    21 extern char const *lolfx_03_noise;
     21LOLFX_RESOURCE_DECLARE(03_noise);
    2222
    2323class NoiseDemo : public WorldEntity
     
    4545        if (!m_ready)
    4646        {
    47             m_shader = Shader::Create(lolfx_03_noise);
     47            m_shader = Shader::Create(LOLFX_RESOURCE_NAME(03_noise));
    4848            m_coord = m_shader->GetAttribLocation("in_Position", VertexUsage::Position, 0);
    4949            m_time_uni = m_shader->GetUniformLocation("u_Time");
  • trunk/tutorial/04_texture.cpp

    r2237 r2277  
    2121static int const TEXTURE_WIDTH = 256;
    2222
    23 extern char const *lolfx_04_texture;
     23LOLFX_RESOURCE_DECLARE(04_texture);
    2424
    2525class TextureDemo : public WorldEntity
     
    7575            m_texture = new Texture(ivec2(TEXTURE_WIDTH, 1), PixelFormat::A8R8G8B8);
    7676
    77             m_shader = Shader::Create(lolfx_04_texture);
     77            m_shader = Shader::Create(LOLFX_RESOURCE_NAME(04_texture));
    7878            m_coord = m_shader->GetAttribLocation("in_Position", VertexUsage::Position, 0);
    7979
  • trunk/tutorial/08_fbo.cpp

    r2241 r2277  
    1919using namespace lol;
    2020
    21 extern char const *lolfx_08_fbo;
     21LOLFX_RESOURCE_DECLARE(08_fbo);
    2222
    2323class FBO : public WorldEntity
     
    5757        if (!m_ready)
    5858        {
    59             m_shader = Shader::Create(lolfx_08_fbo);
     59            m_shader = Shader::Create(LOLFX_RESOURCE_NAME(08_fbo));
    6060            m_coord = m_shader->GetAttribLocation("in_Position", VertexUsage::Position, 0);
    6161            m_uni_flag = m_shader->GetUniformLocation("in_Flag");
  • trunk/tutorial/11_fractal.cpp

    r2241 r2277  
    2121using namespace lol;
    2222
    23 extern char const *lolfx_11_fractal;
     23LOLFX_RESOURCE_DECLARE(11_fractal);
    2424
    2525class Fractal : public WorldEntity
     
    449449            m_texture->SetData(&m_pixels[0]);
    450450
    451             m_shader = Shader::Create(lolfx_11_fractal);
     451            m_shader = Shader::Create(LOLFX_RESOURCE_NAME(11_fractal));
    452452
    453453            m_vertexattrib = m_shader->GetAttribLocation("a_Vertex", VertexUsage::Position, 0);
Note: See TracChangeset for help on using the changeset viewer.