Need Help -- gf_surface_create_layer() failed

I am new to QNX and GUI programming. my requirement is draw 2D graphics using QNX graphics framework (should not use photon).
I am using QNX momentics IDE 30-days evaluation version on windows host and x86platform.

in my program gf_surface_create_layer() was failed to create surface.

gf_surface_t surface;
width = display_info.xres;
height = display_info.yres;

if (gf_surface_create_layer(&surface, &layer, 1, 0,
width, height, layer_format, NULL, 0) == GF_ERR_OK) {
gf_layer_set_surfaces(layer, &surface, 1);
/* draw stuff here */
} else {
printf(“gf_surface_create_layer() failed\n”);

please help me how to resolve this error.