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

build: hide LolFx external declarations behind macros.

Location:
trunk/tools/neercs/video
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/render.cpp

    r2182 r2277  
    3333#include "text-render.h"
    3434
    35 extern char const *lolfx_simple;
    36 extern char const *lolfx_blurh;
    37 extern char const *lolfx_blurv;
    38 extern char const *lolfx_glow;
    39 extern char const *lolfx_remanence;
    40 extern char const *lolfx_copper;
    41 extern char const *lolfx_color;
    42 extern char const *lolfx_noise;
    43 extern char const *lolfx_postfx;
    44 extern char const *lolfx_mirror;
    45 extern char const *lolfx_radial;
     35LOLFX_RESOURCE_DECLARE(simple);
     36LOLFX_RESOURCE_DECLARE(blurh);
     37LOLFX_RESOURCE_DECLARE(blurv);
     38LOLFX_RESOURCE_DECLARE(glow);
     39LOLFX_RESOURCE_DECLARE(remanence);
     40LOLFX_RESOURCE_DECLARE(copper);
     41LOLFX_RESOURCE_DECLARE(color);
     42LOLFX_RESOURCE_DECLARE(noise);
     43LOLFX_RESOURCE_DECLARE(postfx);
     44LOLFX_RESOURCE_DECLARE(mirror);
     45LOLFX_RESOURCE_DECLARE(radial);
    4646
    4747#define PID M_PI/180.0f    // pi ratio
     
    883883    fbo_tmp = new FrameBuffer(screen_size);
    884884    // shader simple
    885     shader_simple = Shader::Create(lolfx_simple);
     885    shader_simple = Shader::Create(LOLFX_RESOURCE_NAME(simple));
    886886    shader_simple_texture = shader_simple->GetUniformLocation("texture");
    887887    // shader glow
    888     shader_glow = Shader::Create(lolfx_glow);
     888    shader_glow = Shader::Create(LOLFX_RESOURCE_NAME(glow));
    889889    shader_glow_glow = shader_glow->GetUniformLocation("glow");
    890890    shader_glow_source = shader_glow->GetUniformLocation("source");
    891891    shader_glow_mix = shader_glow->GetUniformLocation("mix");
    892892    // shader blur horizontal
    893     shader_blur_h = Shader::Create(lolfx_blurh);
     893    shader_blur_h = Shader::Create(LOLFX_RESOURCE_NAME(blurh));
    894894    shader_blur_h_texture = shader_blur_h->GetUniformLocation("texture");
    895895    shader_blur_h_radius = shader_blur_h->GetUniformLocation("radius");
    896896    // shader blur vertical
    897     shader_blur_v = Shader::Create(lolfx_blurv);
     897    shader_blur_v = Shader::Create(LOLFX_RESOURCE_NAME(blurv));
    898898    shader_blur_v_texture = shader_blur_v->GetUniformLocation("texture");
    899899    shader_blur_v_radius = shader_blur_v->GetUniformLocation("radius");
    900900    // shader remanence
    901     shader_remanence = Shader::Create(lolfx_remanence);
     901    shader_remanence = Shader::Create(LOLFX_RESOURCE_NAME(remanence));
    902902    shader_remanence_source = shader_remanence->GetUniformLocation("source");
    903903    shader_remanence_buffer = shader_remanence->GetUniformLocation("buffer");
    904904    shader_remanence_mix = shader_remanence->GetUniformLocation("mix");
    905905    // shader copper
    906     shader_copper = Shader::Create(lolfx_copper);
     906    shader_copper = Shader::Create(LOLFX_RESOURCE_NAME(copper));
    907907    shader_copper_texture = shader_copper->GetUniformLocation("texture");
    908908    shader_copper_screen_size = shader_copper->GetUniformLocation("screen_size");
     
    911911    shader_copper_mask_color = shader_copper->GetUniformLocation("mask_color");
    912912    // shader color
    913     shader_color = Shader::Create(lolfx_color);
     913    shader_color = Shader::Create(LOLFX_RESOURCE_NAME(color));
    914914    shader_color_texture = shader_color->GetUniformLocation("texture");
    915915    shader_color_screen_size = shader_color->GetUniformLocation("screen_size");
     
    918918    shader_color_flash = shader_color->GetUniformLocation("flash");
    919919    // shader noise
    920     shader_noise = Shader::Create(lolfx_noise);
     920    shader_noise = Shader::Create(LOLFX_RESOURCE_NAME(noise));
    921921    shader_noise_texture = shader_noise->GetUniformLocation("texture");
    922922    shader_noise_screen_size = shader_noise->GetUniformLocation("screen_size");
     
    926926    shader_noise_retrace = shader_noise->GetUniformLocation("retrace");
    927927    // shader postfx
    928     shader_postfx = Shader::Create(lolfx_postfx);
     928    shader_postfx = Shader::Create(LOLFX_RESOURCE_NAME(postfx));
    929929    shader_postfx_texture = shader_postfx->GetUniformLocation("texture");
    930930    shader_postfx_texture_2d = shader_postfx->GetUniformLocation("texture_2d");
     
    948948    shader_postfx_beat = shader_postfx->GetUniformLocation("beat");
    949949    // shader mirror
    950     shader_mirror = Shader::Create(lolfx_mirror);
     950    shader_mirror = Shader::Create(LOLFX_RESOURCE_NAME(mirror));
    951951    shader_mirror_texture = shader_mirror->GetUniformLocation("texture");
    952952    shader_mirror_screen_size = shader_mirror->GetUniformLocation("screen_size");
    953953    shader_mirror_mirror = shader_mirror->GetUniformLocation("mirror");
    954954    // shader radial blur
    955     shader_radial = Shader::Create(lolfx_radial);
     955    shader_radial = Shader::Create(LOLFX_RESOURCE_NAME(radial));
    956956    shader_radial_texture = shader_radial->GetUniformLocation("texture");
    957957    shader_radial_screen_size = shader_radial->GetUniformLocation("screen_size");
  • trunk/tools/neercs/video/text-render.cpp

    r2242 r2277  
    2323#include "text-render.h"
    2424
    25 extern char const *lolfx_text;
     25LOLFX_RESOURCE_DECLARE(text);
    2626
    2727#define HAVE_SHADER_4 1
     
    4747                         ivec2(256, 256), ivec2(1));
    4848
    49     m_shader = Shader::Create(lolfx_text);
     49    m_shader = Shader::Create(LOLFX_RESOURCE_NAME(text));
    5050    m_color = m_shader->GetAttribLocation("in_Attr",
    5151                                          VertexUsage::Color, 0);
Note: See TracChangeset for help on using the changeset viewer.