Hello!
I wanted to do an experiment. I tried realistic lighting effects. Sunlight, shadow, fog.I was curious about what would happen if I used opengl by preparing static elements and then not using any more complicated mathematical operations. Meaning that I would fill the 'space' for opengl and then not deal with anything else, just controlling the camera view. Like a 3d model viewer. So that I wouldn't have to sort data during rendering. I naively thought that this would make opengl 100% faster, reducing the communication time between the opengl programs. In principle, I thought that this would be able to handle hundreds of thousands of polygons, since opengl should be able to handle it on hardware.
But unfortunately it's not good. I've already created several 3d programs with the _maptriangle command, which always rendered smoothly. The more polygons were used, the more I had to gradually lower the image resolution. Here is opengl. I'm full of questions. Although I know opengl, I learned it in other development environments, but here in qb64 it has an unusual use. I'm full of questions that I don't understand. From the game of fellow forum member aadityap0901 Minecraft I grabbed the methods that are needed to use and embed opengl correctly. It was a great help, thank you very much! For example, I don't understand what calls 'SUB _GL'? What's the point of this if I don't control the drawing. What if I don't want to display it statically, but there are also animations? If I ignore the fact that it draws when it wants, the scenes and figures may slip. And if I exit subgl if the scene is not ready yet, then I will lose frames. It would make sense if I could trigger the rendering. '_display' has no effect.
This was one of the problems, and the other one is that _maptriangle works faster than opengl for me. With _maptriangle I could draw about 10000 triangles stably at 30fps. This opengl program thinks twice when there are more than 8000 triangles, and the fps drops to around 10. It could be that I'm missing something. It could be that my computer is outdated. I don't get an answer to these. The program writes out how many triangles it draws in a scene while it's running, and shows how many times SUBGL runs per second. It's interesting that it always writes out 60, even then it stutters. So it could be that my Windows system or my computer is at fault.
I'd like you to try it. It could be that it will run well on a faster computer. It could also be that it won't. And I'm messing something up.
Set mapresX, MapresY . This allows you to set the terrain resolution. It is currently set to 60x60, a 3600 square, which is 7200 triangles. Try it with 200x200, 300x300...
I would like to know how many triangles you can draw while maintaining a stable 60FPS.
'file_mapdeep' - you can enter any image. The terrain will be a grayscale version of that image. You can even use paint to draw roads and hills
I hope that fellow forum member aadityap0901 will have some ideas! Thanks for giving me feedback!
I wanted to do an experiment. I tried realistic lighting effects. Sunlight, shadow, fog.I was curious about what would happen if I used opengl by preparing static elements and then not using any more complicated mathematical operations. Meaning that I would fill the 'space' for opengl and then not deal with anything else, just controlling the camera view. Like a 3d model viewer. So that I wouldn't have to sort data during rendering. I naively thought that this would make opengl 100% faster, reducing the communication time between the opengl programs. In principle, I thought that this would be able to handle hundreds of thousands of polygons, since opengl should be able to handle it on hardware.
But unfortunately it's not good. I've already created several 3d programs with the _maptriangle command, which always rendered smoothly. The more polygons were used, the more I had to gradually lower the image resolution. Here is opengl. I'm full of questions. Although I know opengl, I learned it in other development environments, but here in qb64 it has an unusual use. I'm full of questions that I don't understand. From the game of fellow forum member aadityap0901 Minecraft I grabbed the methods that are needed to use and embed opengl correctly. It was a great help, thank you very much! For example, I don't understand what calls 'SUB _GL'? What's the point of this if I don't control the drawing. What if I don't want to display it statically, but there are also animations? If I ignore the fact that it draws when it wants, the scenes and figures may slip. And if I exit subgl if the scene is not ready yet, then I will lose frames. It would make sense if I could trigger the rendering. '_display' has no effect.
This was one of the problems, and the other one is that _maptriangle works faster than opengl for me. With _maptriangle I could draw about 10000 triangles stably at 30fps. This opengl program thinks twice when there are more than 8000 triangles, and the fps drops to around 10. It could be that I'm missing something. It could be that my computer is outdated. I don't get an answer to these. The program writes out how many triangles it draws in a scene while it's running, and shows how many times SUBGL runs per second. It's interesting that it always writes out 60, even then it stutters. So it could be that my Windows system or my computer is at fault.
I'd like you to try it. It could be that it will run well on a faster computer. It could also be that it won't. And I'm messing something up.
Set mapresX, MapresY . This allows you to set the terrain resolution. It is currently set to 60x60, a 3600 square, which is 7200 triangles. Try it with 200x200, 300x300...
I would like to know how many triangles you can draw while maintaining a stable 60FPS.
'file_mapdeep' - you can enter any image. The terrain will be a grayscale version of that image. You can even use paint to draw roads and hills
I hope that fellow forum member aadityap0901 will have some ideas! Thanks for giving me feedback!




You wrote: "On my laptop, I can render 179867 with 55 fps (x, y => 300) " That's really good!!! Unfortunately for me, XY is maximum 150, and even then only 30fps. ![[Image: 06302025194656.png]](https://i.ibb.co/ZzMbHLJH/06302025194656.png)