Odilitime 4 years ago
parent
commit
3d1b0360bf

+ 3
- 3
src/graphics/components/DocumentComponent.cpp View File

@@ -247,9 +247,9 @@ DocumentComponent::DocumentComponent(const float rawX, const float rawY, const f
};
}

void DocumentComponent::scrollY(int y) {
this->transformMatrix[13] -= y;
this->textureTransformMatrix[13] -= y;
void DocumentComponent::scrollY(int py) {
this->transformMatrix[13] -= py;
this->textureTransformMatrix[13] -= py;
//std::cout << "transformMatrix : " << this->transformMatrix[13] << std::endl;
//std::cout << "textureTransformMatrix: " << this->textureTransformMatrix[13] << std::endl;
// check bounds

+ 3
- 3
src/graphics/components/MultiComponent.cpp View File

@@ -239,12 +239,12 @@ void MultiComponent::render() {
// if we flip, we can't put tab labels on top of the tab
fontShader->bind();
if (!boundToPage) {
GLint transformLocation = fontShader->uniform("transform");
GLenum glErr=glGetError();
GLint transformLocation2 = fontShader->uniform("transform");
glErr=glGetError();
if(glErr != GL_NO_ERROR) {
std::cout << "MultiComponent::render - glGetUniformLocation not ok: " << glErr << std::endl;
}
glUniformMatrix4fv(transformLocation, 1, GL_FALSE, win->transformMatrix);
glUniformMatrix4fv(transformLocation2, 1, GL_FALSE, win->transformMatrix);
glErr=glGetError();
if(glErr != GL_NO_ERROR) {
std::cout << "MultiComponent::render - glUniformMatrix4fv not ok: " << glErr << std::endl;

+ 7
- 6
src/graphics/elements/INPUTElement.cpp View File

@@ -4,6 +4,7 @@
#include "../components/DocumentComponent.h"
#include "../../Log.h"
#include "../../html/HTMLParser.h"
#include <ctime>

INPUTElement::INPUTElement() {
isInline = true;
@@ -146,17 +147,17 @@ std::unique_ptr<Component> INPUTElement::renderer(const ElementRenderRequest &re
std::unique_ptr<InputComponent> inputComponent = std::make_unique<InputComponent>(0, 0, 125.0f, 13.0f, request.parentComponent->win->windowWidth, request.parentComponent->win->windowHeight);
inputComponent->node = tagNode;
inputComponent->name = "textInput";
auto propIter = tagNode->properties.find("value");
if (propIter != tagNode->properties.end()) {
inputComponent->value = propIter->second;
auto propIter2 = tagNode->properties.find("value");
if (propIter2 != tagNode->properties.end()) {
inputComponent->value = propIter2->second;
}
return std::move(inputComponent);
} else if (type == "submit") {
//std::cout << "Creating submit" << std::endl;
std::unique_ptr<ButtonComponent> butComponent = std::make_unique<ButtonComponent>(0, 0, 62.0f, 13.0f, request.parentComponent->win->windowWidth, request.parentComponent->win->windowHeight);
auto propIter = tagNode->properties.find("value");
if (propIter != tagNode->properties.end()) {
butComponent->value = propIter->second;
auto propIter3 = tagNode->properties.find("value");
if (propIter3 != tagNode->properties.end()) {
butComponent->value = propIter3->second;
} else {
butComponent->value = "submit";
}

+ 2
- 2
src/graphics/opengl/Window.cpp View File

@@ -781,12 +781,12 @@ void Window::render() {
// maybe we don't need too
if (transformMatrixDirty) {
//const std::clock_t begin = clock();
GLint transformLocation = fontShader->uniform("transform");
GLint transformLocation2 = fontShader->uniform("transform");
glErr=glGetError();
if(glErr != GL_NO_ERROR) {
std::cout << "window::render - glGetUniformLocation - not ok: " << glErr << std::endl;
}
glUniformMatrix4fv(transformLocation, 1, GL_FALSE, transformMatrix);
glUniformMatrix4fv(transformLocation2, 1, GL_FALSE, transformMatrix);
glErr=glGetError();
if(glErr != GL_NO_ERROR) {
std::cout << "window::render - glUniformMatrix4fv - not ok: " << glErr << std::endl;

Loading…
Cancel
Save