(02-18-2026, 04:31 AM)Unseen Machine Wrote: Getting there mate and the interface looks much more professional!Thanks! My program works similarly to what you described. Yes, I first ran into the error that too many glbindtextures slow down performance.
As for the terrain, use two maps one for the terrain and one for the road and then SPLAT (thats whats the method is actually called!) the road onto the terrain.
Create one master texture for the entire map and then you dont need to have repeated calls to glbindtexture for each vertex.
And as your making huge environments, try breaking it down into sections, say 64 * 64 and then create a gllist for each section and with frustum culling you then only render whats actually visible.
Those 3 tips will get you back to 120 fps easy!
I'd give you my latest work on terrain but its c++ so not sure itd be helpful.
Keep up the good work though!
Unseen
What happens is that, at the beginning of the program:
MapDat(0) = 1900 'this determines the 'world size' of the terrain. The size of the car is the default size. The entire terrain can be made as small as a speck of dust on the screen, or so large that it takes 2 hours to drive across.
MapDat(1) = 2000 'this is the resolution of the terrain. The resolution of one side of the terrain. The entire terrain in this case is 2000x2000 height value. It is recommended to create the depth-texture relief image file accordingly. In this case it is 2000x2000 pixels, and each pixel will be 1 height point.
MapDat(2) = 2 'this determines how many textures I use. currently 2. grass, or asphalt.
MapDat(3) = 100 'height relative to the world size (mapdat0). This is important for calculating normals. (It has nothing to do with collision checking, that is done differently)
MapDat(4) = 10 'divides the terrain into this many different blocks. currently 10. so 10x10.
And then here comes what you say. Based on the example, the program creates 10x10x2 gllists. Each block is created as many times as there are different textures. In this case, 2. This way I avoided many glbindtextures. The data of the blocks (vertex, normal, texture coordinates) is saved in files. Separately for grass and separately for asphalt. So what you said: 1 texture = 1 gllist. It creates 10x10x2 files (about 1 minute), which is almost 1Gbyte at this resolution. The next time it starts, it only loads these (about 10 seconds)
And the blocks are drawn like this: Where you are: "A"
Code: (Select All)
JKLMN
YBCDO
XIAEP
WHGFQ
VUTSR
The size of the rear cutting edge is about 2 blocks, so everything is visible in the given situation.How can it be 120Fps? It can do a maximum of 60fps for me under qb64.
I'm interested in what you're doing, but based on the c code I'm not sure I'd understand it.

