What's causing this weird sporadic blur? (Text rendered through VBO)

Started by majikchicken, April 28, 2016, 03:37:41

Previous topic - Next topic

majikchicken

I literally just got my font/text rendering system to render text through a VBO, but I get this odd blur seemingly at random. It often obscures the text. What's causing this? I'm using LWJGL 3, so if you ask for code be prepared to read Java.

My VBO is interleaved, following the format : { r1, g1, b1, tx1, ty1, x1, y1, z1, r2, g2, b2, tx2, ty2, x2, y2, z2, ... } where 'r, g, b' are color codes (in floats), 'tx, ty' are texture coordinates (in floats), and 'x, y, z' are position vertices (in floats).

Here's an imgur album with screenshots of what's happening: http://imgur.com/a/BS9qH


Please help me diagnose the issue. Thanks!

Cornix

Looks to me like you upload your data incorrectly. It seems like some vertices for the triangles are in the wrong order.

Alternatively:
I had a similar problem once with strange artifacts appearing on screen. It turned out to be a driver bug that was triggered by me uploading an incorrect number of vertices. I uploaded some additional garbage data with my original data and had the size and whatnot set incorrectly. (I cant remember in detail anymore)
The driver bug was that it should have generated an openGL error. Instead it didnt give any errors but produced this corrupt output.

majikchicken

Quote from: Cornix on April 28, 2016, 09:17:14
Looks to me like you upload your data incorrectly. It seems like some vertices for the triangles are in the wrong order.

I'm using GL_QUADS instead of GL_TRIANGLES just to make my math easier.  Could this be the result of me using a deprecated function?

string111

If you are using LWJGL3, GL_QUADS are depreciated, this may cause your problem. Just define two GL_TRIANGELS. Be sure to update your set of vertices.

SilverTiger

Quote from: string111 on June 29, 2016, 00:06:59
If you are using LWJGL3, GL_QUADS are depreciated, this may cause your problem. Just define two GL_TRIANGELS. Be sure to update your set of vertices.

Yes, GL_QUADS is deprecated, but that has nothing to do with LWJGL3.
You can use GL_QUADS if you are using a legacy OpenGL context like version 2.1.