StelQGLGLSLShader.cpp   StelQGLGLSLShader.cpp 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelQGLGLSLShader.hpp" #include "StelQGLGLSLShader.hpp"
#include "StelQGL2Renderer.hpp" #include "StelQGL2Renderer.hpp"
#include <stdint.h> #include <stdint.h>
#define ALIGN_UNIFORM_SIZE(x) (((x) + (sizeof ((StelQGLGLSLShader *)0)->uni
formStorage[0]-1)) / sizeof ((StelQGLGLSLShader *)0)->uniformStorage[0])
int StelQGLGLSLShader::UNIFORM_SIZES[UniformType_max] = int StelQGLGLSLShader::UNIFORM_SIZES[UniformType_max] =
{0, sizeof(float), sizeof(Vec2f), sizeof(Vec3f), {0,
sizeof(Vec4f), sizeof(Mat4f), sizeof(bool), sizeof(int)}; ALIGN_UNIFORM_SIZE(sizeof(float)),
ALIGN_UNIFORM_SIZE(sizeof(Vec2f)),
ALIGN_UNIFORM_SIZE(sizeof(Vec3f)),
ALIGN_UNIFORM_SIZE(sizeof(Vec4f)),
ALIGN_UNIFORM_SIZE(sizeof(Mat4f)),
ALIGN_UNIFORM_SIZE(sizeof(bool)),
ALIGN_UNIFORM_SIZE(sizeof(int))};
StelQGLGLSLShader::StelQGLGLSLShader(StelQGL2Renderer* renderer, bool inter nal) StelQGLGLSLShader::StelQGLGLSLShader(StelQGL2Renderer* renderer, bool inter nal)
: StelGLSLShader() : StelGLSLShader()
, renderer(renderer) , renderer(renderer)
, program(NULL) , program(NULL)
, state(State_Unlocked) , state(State_Unlocked)
, bound(false) , bound(false)
, useUnprojectedPosition_(false) , useUnprojectedPosition_(false)
, internal(internal) , internal(internal)
, uniformStoragePointer(uniformStorage)
, uniformStorageUsed(0) , uniformStorageUsed(0)
, uniformCount(0) , uniformCount(0)
, uniformStorageStackSize(0) , uniformStorageStackSize(0)
{ {
renderer->getStatistics()[SHADERS_CREATED] += 1.0; renderer->getStatistics()[SHADERS_CREATED] += 1.0;
if(!addVertexShader("DefaultProjector", if(!addVertexShader("DefaultProjector",
"vec4 project(in vec4 v){return v;}\n")) "vec4 project(in vec4 v){return v;}\n"))
{ {
qWarning() << "Failed to add default projection vertex shade r: " << log(); qWarning() << "Failed to add default projection vertex shade r: " << log();
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 11 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/