Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - gf_layer_attach() fails.: (3 Items)
   
gf_layer_attach() fails.  
Hello everyone,

I`m having a problem with example program that draws rectangle. The code is
from topic
http://community.qnx.com/sf/discussion/do/listPosts/projects.graphics/discussion.advanced_graphics.topc8189?_pagenum=1,
but I enclose copy of source without long comments so it is easier to look
through.

As mentioned in topic of this message there is problem with
gf_layer_attach() function that fails. The output of the running program is:

Number of displays: 1
Display 0: 1280X1024, refresh = 60Hz
Number of layers: 1
gf_layer_attach() failed

I`m sending sloginfo and pidin outputs and my display.conf.

I have no idea why gf_layer_attach fails, hope you will help me.

Generally I`m working in Momentics IDE, so if I run this program as QNX
C/C++ App will I see any "drawn rectangles" or should I run the program
directly under QNX? Maybe this question is silly but I`m just a beginner.
Attachment: Text qnx_example.cc 3.59 KB Text sloginfo 4.24 KB Text pidin_out 8.15 KB Text display.conf 2.71 KB
RE: gf_layer_attach() fails.  
Hi, 

I don't immediately see a reason for failure, either. You should examine
the return value of gf_layer_attach() more closely to see what the error
was. Perhaps another instance of your application was already running?
In that case, you'd get an GF_ERR_INUSE.

You will not see any rectangles drawn on your Windows/Linux development
host; QNX executables simple will not run there. They can only execute
on systems running the QNX Neutrino OS. 

To run your program from the Momentics IDE, you'll want to use a "C/C++
QNX QConn (IP)" launch configuration; this will automatically transfer
your program to the defined target and run it there. As well, you could
transfer the binary to your target and run it there directly.

Hope this helps,
Thomas 

-----Original Message-----
From: Hieronim Fet [mailto:community-noreply@qnx.com] 
Sent: Mittwoch, 10. August 2011 00:49
To: advanced-graphics
Subject: gf_layer_attach() fails.

Hello everyone,

I`m having a problem with example program that draws rectangle. The code
is from topic
http://community.qnx.com/sf/discussion/do/listPosts/projects.graphics/di
scussion.advanced_graphics.topc8189?_pagenum=1,
but I enclose copy of source without long comments so it is easier to
look through.

As mentioned in topic of this message there is problem with
gf_layer_attach() function that fails. The output of the running program
is:

Number of displays: 1
Display 0: 1280X1024, refresh = 60Hz
Number of layers: 1
gf_layer_attach() failed

I`m sending sloginfo and pidin outputs and my display.conf.

I have no idea why gf_layer_attach fails, hope you will help me.

Generally I`m working in Momentics IDE, so if I run this program as QNX
C/C++ App will I see any "drawn rectangles" or should I run the program
directly under QNX? Maybe this question is silly but I`m just a
beginner.




_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post87952
RE: gf_layer_attach() fails.  
Photon (and io-graphics) is running and there's only 1 layer on the
system so your app fails to attach to the layer.



-----Original Message-----
From: Hieronim Fet [mailto:community-noreply@qnx.com] 
Sent: August-09-11 6:49 PM
To: advanced-graphics
Subject: gf_layer_attach() fails.

Hello everyone,

I`m having a problem with example program that draws rectangle. The code
is from topic
http://community.qnx.com/sf/discussion/do/listPosts/projects.graphics/di
scussion.advanced_graphics.topc8189?_pagenum=1,
but I enclose copy of source without long comments so it is easier to
look through.

As mentioned in topic of this message there is problem with
gf_layer_attach() function that fails. The output of the running program
is:

Number of displays: 1
Display 0: 1280X1024, refresh = 60Hz
Number of layers: 1
gf_layer_attach() failed

I`m sending sloginfo and pidin outputs and my display.conf.

I have no idea why gf_layer_attach fails, hope you will help me.

Generally I`m working in Momentics IDE, so if I run this program as QNX
C/C++ App will I see any "drawn rectangles" or should I run the program
directly under QNX? Maybe this question is silly but I`m just a
beginner.




_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post87952