~ubuntu-branches/debian/wheezy/gource/wheezy

« back to all changes in this revision

Viewing changes to src/bloom.cpp

  • Committer: Package Import Robot
  • Author(s): Andrew Caudwell
  • Date: 2012-04-24 11:25:45 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20120424112545-18fbnycu9xrsl4s5
Tags: 0.38-1
* New upstream release (closes: #667189)
* New build dependencies on libglm-dev and libboost-filesystem-dev. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    vertex_count = 0;
54
54
}
55
55
 
 
56
void bloombuf::unload() {
 
57
    if(bufferid !=0) glDeleteBuffers(1, &bufferid);
 
58
    bufferid = 0;
 
59
    buffer_size = 0;
 
60
}
 
61
 
56
62
size_t bloombuf::vertices() {
57
63
    return vertex_count;
58
64
}
61
67
    return data_size;
62
68
}
63
69
 
64
 
void bloombuf::add(GLuint textureid, const vec2f& pos, const vec2f& dims, const vec4f& colour, const vec4f& texcoord) {
 
70
void bloombuf::add(GLuint textureid, const vec2& pos, const vec2& dims, const vec4& colour, const vec4& texcoord) {
65
71
 
66
72
    bloom_vertex v1(pos,                       colour, texcoord);
67
 
    bloom_vertex v2(pos + vec2f(dims.x, 0.0f), colour, texcoord);
 
73
    bloom_vertex v2(pos + vec2(dims.x, 0.0f), colour, texcoord);
68
74
    bloom_vertex v3(pos + dims,                colour, texcoord);
69
 
    bloom_vertex v4(pos + vec2f(0.0f, dims.y), colour, texcoord);
 
75
    bloom_vertex v4(pos + vec2(0.0f, dims.y), colour, texcoord);
70
76
 
71
77
    int i = vertex_count;
72
78