Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Hey guys I need some help with my game rendering engine from someone with a bit more experience than I currently have as I cannot get my models to load properly.

The game is coded in OpenGL and Java and uses GLSL 130 for shader support. What happens is when I load one single object it will render properly and have lighting and ambient lighting and everything else works great. I can load up 1000+ of the same model onto my screen and they all render properly. But if I load a second model, the second model that is rendered will come up properly but the first model will be distorted. I cannot switch to a higher GLSL version so I am currently using #version 130.

The game is using lwjgl (latest version 2, legacy) and slicktools.

Here is a screen shot of my problem to see what I mean for you guys:

Since my terrain is the final shader to run, it loads properly and all the other models are distored from that point on. Hopefully someone can help me work out this rendering issue.

Here is the source code for my game so far (from eclipse):
http://www.megafileupload.com/9j6k/Redwall_Source_-_v1.rar (2.48 MB)

share|improve this question

closed as off-topic by Anko, Krom Stern, MrCranky, Seth Battin, Blue Oct 6 at 11:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Anko, Krom Stern, MrCranky, Seth Battin, Blue
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
It's difficult to tell what the intended result is supposed to look like, but from the sound of it, it seems likely you're overwriting a uniform (MVP matrix?) or some other global or shared state. – bcrist Sep 10 at 3:54
    
The ferns are loading random vertexs, it should be a 8 leaf plant. The player character does the same, it should look like a minecraft character (temporary model). Both models render properly if I only load player and no terrain or no player but just ferns. As you can see in the image it distorts all the models points for some reason. But if it's only loading one model you can load an infinite amount of that SAME model without issue. – Kaboom Sep 10 at 7:03
    
It might be an issue with my gpu? Do the models load properly for you or anyone else? – Kaboom Sep 10 at 18:41
    
Can you include your drawing code in the question, rather than linking to the entire source? The most important part being the difference between the 1-model and 2-model code. – Seth Battin Sep 15 at 12:49
    
Sure thing, when I get on my computer I will post my shader, my renderer, and draw method – Kaboom Sep 15 at 16:02

Browse other questions tagged or ask your own question.