It is now possible to share the OpenGL state:

With

renderLoop.setOpenGLContextToThread

you can claim the context and release it with:

renderLoop.freeOpenGLContextFromThread

The renderloop omits any OpenGL calls if the context is not active.

Actual Screenshot

actual

Because of the polling and sync mechanism of /dev/input devices, there is a small latency in the gamepad control. Here is an example of the YAogl gamepad library for Linux:

In contrast to ugly while(forever) constructs, which are mostly entangled in the render-loop, my library uses lightweight threads for each connected device. Callbacks for device-change-events are also missing, therefore gamepads under Linux can only be detected at startup.

300FPS
You can also start the game multiple times:
multipleWindows
I’m still struggling with OpenAL but I hope to finish this port in a few days. As I stated in an earlier post, this isn’t a simple x-compilation but an adaption to the the native os. The render-loop is completely rewritten. The new OpenGL 4+ features are factored-out to allow to play the game on older (2009+) hardware.

C.O.O.L The Game Version 1.3

Previously known as B.I.S (Working Title: Business in Space) was uploaded to the Itunes store.  Version 1.3 is a Bugfix Release:

  • Shader Updates: The Shader Library (the program library which runs on your GPU) was tested against two additional Chipsets.
  • MD5 Checksum removed: The internal build management and versioning  system was deactivated and is now continued with Version 2.0 of YAogl

YAogl Version 2.0 430 core

All proprietary libraries were removed. YAogl now runs on all major mobile and desktop systems with support for OpenGL, OpenGL ES, OpenAL and Vorbis. With OpenGL 4.3 a great part of the render-loop now runs on the GPU.

terrain

I’m loosing a lot of performance with this shader. Instead of a sampler2Darray a lot of uniforms are depleted by c(like)-arrays:

   uniform sampler2D textureMap[4];
...
   lowp vec4 texColorA = texture2D(textureMap[0], texPos);
   lowp vec4 texColorB = texture2D(textureMap[1], texPos);
   lowp vec4 texColorC = texture2D(textureMap[2], texPos);
   lowp vec4 texColorD = texture2D(textureMap[3], texPos);
...
    lowp vec4 colorMix = vsTextureMix.x * texColorA + 
                         vsTextureMix.y * texColorB + 
                         vsTextureMix.z * texColorC + 
                         vsTextureMix.w * texColorD;
...

The textures thereby have to be bound individually:

        [[terrainTextures objectAtIndex:0] bind: GL_TEXTURE0];
        [[terrainTextures objectAtIndex:1] bind: GL_TEXTURE1];
        [[terrainTextures objectAtIndex:2] bind: GL_TEXTURE2];
        [[terrainTextures objectAtIndex:3] bind: GL_TEXTURE3]; // precious texture units!
        
        GLuint loc = shader.locTextureMap; // the mirrored GL State-Machine
        if(loc != -1) {
            int txs[] = {0,1,2,3};
            glUniform1iv(loc, 4, txs);
        }

The terrain textures are mipmaps with repeating texture-wraps and accordingly can’t be arranged in an atlas.

Also the OpenGL ES statement-evaluation differs from the desktop specification.
For Example the branch-avoiding statement:

// Instead of If (x <= y) e; else 0;
example *= float(x <= y); 

doesn't work with several ES systems until you use an unequal inversion:

example *= float(x > y); 

Deferred (HDR) Lighting, texture mapping (normal map, mipmap… ) are now working in the IOS version of YAOGL:

scrIpad

 

During the port i found a (unnoticeable) shader-error  in the desktop version which will be corrected in the next version of BIS (Version 1.2).

Bugfix Release:

  • Revised World – Score Results
  • New Mountains are  sometimes created at occupied plots
  • Sometimes ropes don’t follow stars.
  • Sometimes wrong player colors are shown in scoreboard
  • Fab-Build: Building should not start “full size”
  • Bots should always try to utilize  empty spots.
  • Add minimum  play time, even without any food resources.
  • New Audio for global fortunes added.
  • Game Freeze in Round 4.
  • Improved gamepad steering (altitude can now also be changed with shoulder buttons)
  • Players are sometimes invisible in the Shop- and Auction-Scene.
  • The Camel sometimes flickers.