Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

increase 2D map size

4: Adsense

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   

345
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

 

 

 



#2 Hodgman   Moderators   

50632
Like
0Likes
Like

Posted 11 April 2014 - 08:40 AM

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



#3 FGFS   Members   

345
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   

50632
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   

345
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.