git-svn-id: svn://db.shs.com.ru/libs@606 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -89,6 +89,10 @@ void glDrawQuad(QOpenGLShaderProgram * prog, QVector4D * corner_dirs, GLfloat x,
|
||||
glFuncs->glEnableVertexAttribArray(locc);
|
||||
glFuncs->glVertexAttribPointer(locc, 3, GL_FLOAT, 0, 0, vcs);
|
||||
glFuncs->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
glFuncs->glDisableVertexAttribArray(loc);
|
||||
glFuncs->glDisableVertexAttribArray(locv);
|
||||
glFuncs->glDisableVertexAttribArray(loct);
|
||||
glFuncs->glDisableVertexAttribArray(locc);
|
||||
} else {
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glColor4f(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -604,8 +604,8 @@ void QGLView::checkCaps() {
|
||||
|
||||
void QGLView::reloadThisShaders() {
|
||||
if (!shaders_supported) return;
|
||||
loadShaders(shader_select, "selection", "shaders");
|
||||
loadShaders(shader_halo, "selection_halo", "shaders");
|
||||
loadShaders(shader_select, "selection", ":/shaders");
|
||||
loadShaders(shader_halo, "selection_halo", ":/shaders");
|
||||
//loadShaders(shader_rope, "rope", "://shaders");
|
||||
}
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ void RendererDeferredShading::reloadShaders() {
|
||||
for (int i = 0; i < shaders.size(); ++i) {
|
||||
QOpenGLShaderProgram * p(*(shaders[i].second));
|
||||
if (!p) p = new QOpenGLShaderProgram(view.context());
|
||||
loadShaders(p, shaders[i].first, "shaders");
|
||||
loadShaders(p, shaders[i].first, ":/shaders");
|
||||
*(shaders[i].second) = p;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user