aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-21 15:25:22 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-21 15:25:22 +0200
commitd952c3025341fafb4141375ecd2ba3ee9687275d (patch)
tree7ae46774a6c496e4ce71e74028e6e36b03172596 /src
parent3240fa7024ca762c8fdd7efeed1705fdea0b2b09 (diff)
Temporary revert text vertexbuffer code because of sfml bug
Diffstat (limited to 'src')
-rw-r--r--src/Text.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Text.cpp b/src/Text.cpp
index 5668cf8..cac485d 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -49,10 +49,10 @@ namespace QuickMedia
vertices[0].setPrimitiveType(sf::PrimitiveType::Triangles);
vertices[1].setPrimitiveType(sf::PrimitiveType::Triangles);
vertices[2].setPrimitiveType(sf::PrimitiveType::Triangles);
- for(int i = 0; i < 3; ++i) {
+ /*for(int i = 0; i < 3; ++i) {
vertex_buffers[i] = sf::VertexBuffer(sf::PrimitiveType::Triangles, sf::VertexBuffer::Static);
vertex_buffers[i].create(0);
- }
+ }*/
setString(std::move(_str));
}
@@ -589,9 +589,9 @@ namespace QuickMedia
}
boundingBox.height = num_lines * line_height;
- for(int i = 0; i < 3; ++i) {
+ /*for(int i = 0; i < 3; ++i) {
vertex_buffers[i].update(&vertices[i][0], vertices[i].getVertexCount(), 0);
- }
+ }*/
//url_ranges.clear();
if(!editable)
@@ -907,14 +907,16 @@ namespace QuickMedia
sf::RenderStates states;
states.transform.translate(pos);
states.texture = &font->getTexture(characterSize);
- target.draw(vertex_buffers[i], states);
+ //target.draw(vertex_buffers[i], states);
+ target.draw(vertices[i], states);
}
if(vertices[2].getVertexCount() > 0) {
sf::RenderStates states;
states.transform.translate(pos);
states.texture = TextureLoader::get_texture("images/emoji.png");
- target.draw(vertex_buffers[2], states);
+ //target.draw(vertex_buffers[2], states);
+ target.draw(vertices[2], states);
}
if(!editable) return true;