Jump to content

  • Log In with Google      Sign In   
  • Create Account


increase 2D map size


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 FGFS   Members   -  Reputation: 196

Like
0Likes
Like

Posted 11 April 2014 - 08:38 AM

Hi

I do:

    for (int x=0; x<256; x+=2) {
...
        for (int z=0; z<256; z+=2) {

...

how to draw?

It looks stretched. Previously I did:

 

    for (int x=0; x<128; x++) {
...
        for (int z=0; z<128; z++) {

glVertex3f(terrainMap[x][z][0], terrainMap[x][z][1], terrainMap[x][z][2]);

...

with +1 draws ok.

I can't simply go to 256 as the FPS drop heavily. I want to go 256 or better even 512 size.

Thanks

 

 

 



Sponsor:

#2 Hodgman   Moderators   -  Reputation: 29568

Like
0Likes
Like

Posted 11 April 2014 - 08:40 AM

Instead of glVertex3f (AKA OpenGL1 immediate mode rendering), use VBOs.



#3 FGFS   Members   -  Reputation: 196

Like
0Likes
Like

Posted 11 April 2014 - 08:50 AM

Yes, but for now I want to keep it simple and quick if possible.



#4 Hodgman   Moderators   -  Reputation: 29568

Like
0Likes
Like

Posted 11 April 2014 - 09:33 AM

What is your FPS before and after? You're making 4x more GL calls when you go from 128 to 256, so I'd expect your seconds-per-frame number to be maybe about 4x larger...



#5 FGFS   Members   -  Reputation: 196

Like
0Likes
Like

Posted 11 April 2014 - 09:53 AM

Oops found my error...not my day, thanks.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS