Post by shadow008 on Jan 28, 2014 16:49:55 GMT -5
Since my last post in "perlin noise" thread www.basic4gl.proboards.com/thread/3538/perlin-noise , I've been working on learning freebasic. More specifically, using it to port some existing code from basic4gl to freebasic for some speed increases. Aside from that, if DJLinux would give a quick example of how he's compiling his DLL's written in freebasic, I'd really like to bring a few functions from the opengl 3.3 specs to the openGLplugin, because there's something to be said about vertex attributes 
Here's the project thus far:
dl.dropboxusercontent.com/u/5319168/InfiniteTerrain.zip
Features:
-"infinite terrain"
-Basic multithreading
-Completely opengl 3.3 compliant: Uses no depreciated functions (that I'm aware of)
-Easily modifiable LOD. In fact nearly every aspect of the terrain generation is modifiable.
-Bare bones example of a GLSL 1.50 shader in use.
-EXE fits in under 300kb
-Spaghetti code.
Plan to add:
-Un-spaghettied code.
-Lighting and texturing (texturing done on the gfx card)
-Camera view frustum culling (Currently only supports camera frustum sphere culling)
-Terrain Generation Controller: Using macros to reconfigure how the noise is generated per step.
-Procedurally generated stuff like rocks and foliage (maybe multithread that because I can)
-Maybe delve more into x86 assembly and see if I can get the noise generating even faster (Because you can never be "too fast") Also note that the terrain, as it's rendered in the .exe as it sits, is pushing 41*41*64*64+overspill or about 7,000,000 points total (in just under 6 sec on my desktop).
-Skirting the heightmap. It has to happen... It's just going to be a pain with indexing everything correctly.
-Fix the glitch related to multithreading where sometimes a sections Vertex Array Object(VAO) will be generated while the vertex data is being modified, resulting in missing sections. Reloading that area fixes it, but it's still annoying. It happens when the camera is moving wayyy to fast.
-Fix the glitch where going too fast with the camera completely destroys the terrain update process. (Maybe just reset everything when that's caught... I dunno right now)
-Implement a physics engine: Been looking at DJLinux's PhysX wrapper, and it seems to be exactly what I think will work.
-More things later when I get something that looks cool.
There's also an example of 2d simplex noise that I got working, and should port to b4gl because it's more than twice as fast as standard perlin noise with the same (better?) results.
If you wanna run the test with something like FRAPS or Dxtory or something to view the framerate and report that (or blatantly obvious visual errors), that'd be appreciated.
If anyone want's in on this, I'm more than determined to keep it up.
Anyways, happy coding \(^^\)(/^^)/

Here's the project thus far:
dl.dropboxusercontent.com/u/5319168/InfiniteTerrain.zip
Features:
-"infinite terrain"
-Basic multithreading
-Completely opengl 3.3 compliant: Uses no depreciated functions (that I'm aware of)
-Easily modifiable LOD. In fact nearly every aspect of the terrain generation is modifiable.
-Bare bones example of a GLSL 1.50 shader in use.
-EXE fits in under 300kb
-Spaghetti code.
Plan to add:
-Un-spaghettied code.
-Lighting and texturing (texturing done on the gfx card)
-Camera view frustum culling (Currently only supports camera frustum sphere culling)
-Terrain Generation Controller: Using macros to reconfigure how the noise is generated per step.
-Procedurally generated stuff like rocks and foliage (maybe multithread that because I can)
-Maybe delve more into x86 assembly and see if I can get the noise generating even faster (Because you can never be "too fast") Also note that the terrain, as it's rendered in the .exe as it sits, is pushing 41*41*64*64+overspill or about 7,000,000 points total (in just under 6 sec on my desktop).
-Skirting the heightmap. It has to happen... It's just going to be a pain with indexing everything correctly.
-Fix the glitch related to multithreading where sometimes a sections Vertex Array Object(VAO) will be generated while the vertex data is being modified, resulting in missing sections. Reloading that area fixes it, but it's still annoying. It happens when the camera is moving wayyy to fast.
-Fix the glitch where going too fast with the camera completely destroys the terrain update process. (Maybe just reset everything when that's caught... I dunno right now)
-Implement a physics engine: Been looking at DJLinux's PhysX wrapper, and it seems to be exactly what I think will work.
-More things later when I get something that looks cool.
There's also an example of 2d simplex noise that I got working, and should port to b4gl because it's more than twice as fast as standard perlin noise with the same (better?) results.
If you wanna run the test with something like FRAPS or Dxtory or something to view the framerate and report that (or blatantly obvious visual errors), that'd be appreciated.
If anyone want's in on this, I'm more than determined to keep it up.
Anyways, happy coding \(^^\)(/^^)/