I've attached the latest player that should fix a few bugs and now supports GetImage and other image manipulation commands.
Quote: "Swap chain is out of date in main.agc at line 95"
That's fine, it is just saying that the window resized and it needed to update the swap chain to match.
Quote: "Easy fix if there is a way to check if we are in Vulkan or OpenGL renderer"
There will be three new commands you can use to query the current renderer
int IsInvertedDepth() returns 0 on OpenGL and 1 on Vulkan
int GetClipSpaceMode() returns 0 if the clip space is -1 to 1 (OpenGL) or 1 if the clip space is 0 to 1 (Vulkan) this is needed for custom projection matrix creation
int IsTopLeftOrigin() returns 0 on OpenGL and 1 on Vulkan, normally shouldn't need to know as its effects are hidden by AppGameKit by using the agk_invert uniform
Quote: "Also Is the Depth buffer smaller now ? cause we store the red channel only ?"
In OpenGL it just copied the single channel data into all 4 channels, so you had the same value 4 times. Vulkan didn't do this by default so only the red channel contained the data. The version I've attached now copies OpenGL and copies the same value to all 4 channels.
Quote: "I'm getting an error message along the lines of vec 4 colorVarying or UVVarying does not exist in the vertex shader"
The default sprite shader is as follows
attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
varying vec2 uvVarying;
varying vec4 colorVarying;
uniform mat4 agk_Ortho;
void main() {
gl_Position = agk_Ortho * vec4(position,1.0);
uvVarying = uv;
colorVarying = color;
}
The varyings in the vertex and pixel shader must match exactly, case, spacing, everything. Order of varyings used to matter in previous Vulkan players but is no longer required.