X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbloom.cpp;h=76460b993885cb7f71162d22fe32b306ad650495;hb=e4638ccfdcdb58f81740fe707ec93b1be3208d2c;hp=0c2dccec04d3a04bb7fc3aec1adc400213358e41;hpb=5172d32d67595ea0b70184fadcfcb8e023cccbc8;p=libs%2Fgl.git diff --git a/source/bloom.cpp b/source/bloom.cpp index 0c2dccec..76460b99 100644 --- a/source/bloom.cpp +++ b/source/bloom.cpp @@ -1,12 +1,5 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2009-2011 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include -#include +#include #include "blend.h" #include "bloom.h" #include "meshbuilder.h" @@ -102,7 +95,7 @@ Bloom::Bloom(unsigned w, unsigned h): void Bloom::set_radius(float r) { if(r<=0.0f) - throw InvalidParameterValue("Radius must be positive"); + throw out_of_range("Bloom::set_radius"); int size = min(static_cast(r*3.0f), 9); blur_shdata_common.uniform("size", size); @@ -120,7 +113,7 @@ void Bloom::set_radius(float r) void Bloom::set_strength(float s) { if(s<0.0f || s>1.0f) - throw InvalidParameterValue("Strength must be in the range [0.0, 1.0]"); + throw out_of_range("Bloom::set_strength"); combine_shdata.uniform("strength", s); }