Reputation: 1363
my friend and I are creating a simple Java game using the LWJGL. We are running into a few problems.
We render the whole game with quads and I don't know what we did but now we are having a lot of rendering problems. We have to load our intro before anything else will load and if we don't for some reason all the quads of are invisible. We assume it's an Alpha problem, but were not sure. We also load images on things, so I don't if that is a problem.
Here is our intro: http://pastebin.com/SgDvMvaV
So like I said if we skip that intro nothing at all will load.
When we render fonts their are weird dots and lines around the font when it renders. I have no idea why this would happen. Here is our font class. Here is an image of what it looks like.
Sorry it's kind of hard to see..
Why tried using this, but it breaks all the images, does anyone know what it is supposed to be used for?
If you need anything else just let me know and I will add it. Thanks for all your help.
Upvotes: 1
Views: 65
Reputation: 2863
About the font problem, try a different GL_TEXTURE_WRAP
value when you define your gl texture.
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
you may also try with GL_CLAMP_TO_BORDER
instead of GL_CLAMP_TO_EDGE
.
Upvotes: 0
Reputation: 126
If your drawing textures and quads without textures I think you need to disable textures when not using them, hard to say tho without seeing how you are drawing anything.
Id say your right about the alpha for why nothing is rendering without the intro, Im guessing you are still using private static float alpha = 0;
but not using your intro to up it to 1 so everything stays at alpha 0.
Still not knowing how you are drawing anything makes it hard to say why you are having rendering issues :/
Upvotes: 0