void renderFBO()
	{
		static int SamplesPositionsIndex = 0;
		++SamplesPositionsIndex;
		SamplesPositionsIndex %= 2;

		{
			glm::mat4 Perspective = glm::perspective(glm::pi<float>() * 0.25f, float(FRAMEBUFFER_SIZE.x) / FRAMEBUFFER_SIZE.y, 0.1f, 100.0f);
			glm::mat4 Model = glm::mat4(1.0f);
			glm::mat4 MVP = Perspective * this->view() * Model;

			glBindBuffer(GL_UNIFORM_BUFFER, BufferName[buffer::TRANSFORM]);
			glm::mat4* Pointer = (glm::mat4*)glMapBufferRange(GL_UNIFORM_BUFFER, 0, sizeof(MVP), GL_MAP_WRITE_BIT);
			*Pointer = MVP;
			glUnmapBuffer(GL_UNIFORM_BUFFER);
		}

		glViewportIndexedfv(0, &glm::vec4(0, 0, FRAMEBUFFER_SIZE.x, FRAMEBUFFER_SIZE.y)[0]);
		glBindFramebuffer(GL_FRAMEBUFFER, FramebufferRenderName);

		glm::vec2 SamplesPositions[2][4] =
		{
			{
				glm::vec2(0.75f, 0.25f),
				glm::vec2(1.00f, 0.75f),
				glm::vec2(0.25f, 1.00f),
				glm::vec2(0.00f, 0.25f)
			},
			{
				glm::vec2(0.25f, 0.25f),
				glm::vec2(1.00f, 0.25f),
				glm::vec2(0.75f, 1.00f),
				glm::vec2(0.00f, 0.75f)
			}
		};

		glSetMultisamplefvAMD(GL_SAMPLE_POSITION, 0, &SamplesPositions[SamplesPositionsIndex][0][0]);
		glSetMultisamplefvAMD(GL_SAMPLE_POSITION, 1, &SamplesPositions[SamplesPositionsIndex][1][0]);
		glSetMultisamplefvAMD(GL_SAMPLE_POSITION, 2, &SamplesPositions[SamplesPositionsIndex][2][0]);
		glSetMultisamplefvAMD(GL_SAMPLE_POSITION, 3, &SamplesPositions[SamplesPositionsIndex][3][0]);

		glClearBufferfv(GL_COLOR, 0, &glm::vec4(0.0f, 0.5f, 1.0f, 1.0f)[0]);

		glBindTextures(0, 1, &TextureName);
		glBindVertexArray(VertexArrayName);

		glDrawElementsInstancedBaseVertex(GL_TRIANGLES, ElementCount, GL_UNSIGNED_SHORT, NULL, 1, 0);
	}
EXTERN_C_ENTER

JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSamplePositions_nglSetMultisamplefvAMD__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong valAddress) {
    glSetMultisamplefvAMDPROC glSetMultisamplefvAMD = (glSetMultisamplefvAMDPROC)tlsGetFunction(1069);
    intptr_t val = (intptr_t)valAddress;
    UNUSED_PARAM(clazz)
    glSetMultisamplefvAMD(pname, index, val);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSamplePositions_nglSetMultisamplefvAMD(JNIEnv *env, jclass clazz, jint pname, jint index, jlong val, jlong function_pointer) {
	const GLfloat *val_address = (const GLfloat *)(intptr_t)val;
	glSetMultisamplefvAMDPROC glSetMultisamplefvAMD = (glSetMultisamplefvAMDPROC)((intptr_t)function_pointer);
	glSetMultisamplefvAMD(pname, index, val_address);
}