Please see it

How to draw a line in QNX nuetrino if i use the c/c++ perspective at qnx IDE and where i get the output .can i get it at target
i am a new user in qnx .please help me

read about PgDrawLine and other Pg*

thanx for ur response.
I have seen it.but if i use it in my programm at qnx ide and add ph library also.The output is showing only in console window and the printf() part not the drawline part.u please explain me how to write it in program using the draw line and get the required output like a line or rectangle.and where i get the output.can u tell me where i can get some examples regarding this

You need to set up a Widget to draw into. There should be an example for a PtRaw Widget. Use this and try drawing in there :slight_smile:

debasis_bhadra,

you have to write a Photon application. Please read the Programmer’s Guide for Photon microGUI for QNX Neutrino 6.3.

You will not see any outputs of a Photon application in the IDE’s console view - this is only a redirection of standard input/output and it’s for text only. On Windows you can use Phindows as a “graphical” Terminal. Maybe it’s easier for you to start the application directly on your QNX target under Photon.

  • Peter

thanx for your response.
I get it what i requred.
can u tell me one thing.photon graphics driver takes the starting Video ram address for qnx neutrino and the graphics drives use the API (name)for the OS layer to draw

There is no question in your statement :slight_smile:

can u tell me one thing that the starting address of VRAM that photon graphics driver takes for qnx neutrino to draw something and name of the API which photon graphics driver call to the os layer to draw a image???

Now its bold :slight_smile:

But i think i get the point. This should be system-depend, so there is no ultimative address. What are you trying to accomplish?

I know the VRAM address is hardware dependent .actually i am going to port some thing in qnx on a particular board.but I think the starting VRAM address is needed because the photon graphics driver initializes it to display some window on QNX neutrino. and the API is also needed which is QNX OS specific and the driver calls the API to OS to display a window.

You could try get your Video Cards memory address with pci* functions

You cannot and should write to video ram at the same time as Photon, result will be undefined.

Photon doesn’t really care about the address of the video ram ( to some extent) . It’s the video driver that care of that.

Why do you need the vram address?

i am going to port some thing in qnx In my application VRAM address is needed
IS there any such function in qnx by which i can get the VRAM base address of my system.
how i will use that function and what will be the value of the argument of that function

Writing in bold won´t change the fact u should take a look at pci* functions.
See the docs.

Especially look for pci_dev_info structure

sir, i have read that doc .and also looked pci_dev_info structure.it has different members which can hold value for address,device id etc.I have tried …
but i am unable to write a program in the qnx IDE c/c++ perspective by which i can get some address value at console end.i think we have to use some function calls and supply some arguments also.i have also seen the display.h,disputil.h file for related function call.
sir i am a new user in it and it is a little bit difficult to understand the graphics doc of qnx.
If you have no problem please write a c prog for me with pci* using which i can get vram addresses from the IDE console end at c/c++ perspective.

thanks & regards :slight_smile:

You may want also have a look at chatper “Writing a Graphics Driver” and the “disp_adapter_t” structure

how to use(by which function) disp_adapter_t and disp_surface_t to get values for all the member of both structure.I think in code if i take
disp_adapter_t *adapter;
i need to initialize adapter and to use adapter in certain function that it can get all the values of its member(as it is a structure)
same like disp_surface_t. …

How should i write the code

can u tell me that if i execute qnx nutrino through cd(not installed in the hard disk)can i able draw a pixel or line by calling driver related API :laughing: