~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/blender/nodes/intern/SHD_nodes/SHD_mapping.c

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: SHD_mapping.c 12931 2007-12-17 18:20:48Z theeth $
 
2
 * $Id: SHD_mapping.c 16366 2008-09-04 20:51:28Z blendix $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
69
69
   node->storage= add_mapping();
70
70
}
71
71
 
 
72
static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
 
73
{
 
74
        TexMapping *texmap= node->storage;
 
75
        float domin= (texmap->flag & TEXMAP_CLIP_MIN) != 0;
 
76
        float domax= (texmap->flag & TEXMAP_CLIP_MAX) != 0;
 
77
        GPUNodeLink *tmat = GPU_uniform((float*)texmap->mat);
 
78
        GPUNodeLink *tmin = GPU_uniform(texmap->min);
 
79
        GPUNodeLink *tmax = GPU_uniform(texmap->max);
 
80
        GPUNodeLink *tdomin = GPU_uniform(&domin);
 
81
        GPUNodeLink *tdomax = GPU_uniform(&domax);
 
82
 
 
83
        return GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax);
 
84
}
 
85
 
72
86
bNodeType sh_node_mapping= {
73
87
        /* *next,*prev */       NULL, NULL,
74
88
        /* type code   */       SH_NODE_MAPPING,
83
97
        /* initfunc    */       node_shader_init_mapping,
84
98
        /* freestoragefunc    */        node_free_standard_storage,
85
99
        /* copystoragefunc    */        node_copy_standard_storage,
86
 
        /* id          */       NULL
 
100
        /* id          */       NULL, NULL, NULL,
 
101
        /* gpufunc     */       gpu_shader_mapping
87
102
        
88
103
};
89
104