[Next] [Previous] [Contents]

Q15. When I run Femgv on my PC using OpenGL the graphics area is black and I can't see my model?

A:

The way OpenGL draws to the screen is influenced by the choice of "pixel format". A pixel format specifies several properties such as:

- Whether the pixel buffer is single- or double-buffered.

- Whether the pixel data colour representation is in RGBA or colour-index form.

- The number of bits used to store colour data.

- The number of bits used for the depth (z-axis) buffer.

Pixel formats are synonymous with visual classes in the Motif environment.

FEMGV attempts to select the best pixel format but sometimes, because of deficiencies in the underlying graphics system, it needs some user intervention.

In order to select a pixel format:

1. Run FEMGV from a DOS box and redirect standard output to a file (i.e., femgv6 > log)



2. Look at the output file log, you should see something like this



C:\fgv-work>type log

cb:rb gb bb:zb

1 DW OGL ACC+ RGB 16: 5/ 5/ 5: 0

2 DW OGL ACC+ DB RGB 16: 5/ 5/ 5: 0

3 DW OGL ACC+ RGB 16: 5/ 5/ 5:16

4 DW OGL ACC+ DB RGB 16: 5/ 5/ 5:16

5 DW OGL ACC+ RGB 16: 5/ 5/ 5:32

6 DW OGL ACC+ DB RGB 16: 5/ 5/ 5:32

7 DW OGL ACC- RGB 16: 5/ 5/ 5:32

8 DW OGL ACC- RGB 16: 5/ 5/ 5:16

9 DW OGL ACC- DB RGB 16: 5/ 5/ 5:32

10 DW OGL ACC- DB RGB 16: 5/ 5/ 5:16

11 DW OGL ACC- CI 16: 5/ 5/ 5:32

12 DW OGL ACC- CI 16: 5/ 5/ 5:16

13 DW OGL ACC- DB CI 16: 5/ 5/ 5:32

14 DW OGL ACC- DB CI 16: 5/ 5/ 5:16

15 OGL ACC- RGB 24: 8/ 8/ 8:32

16 OGL ACC- RGB 24: 8/ 8/ 8:16

17 OGL ACC- CI 24: 8/ 8/ 8:32

18 OGL ACC- CI 24: 8/ 8/ 8:16

19 OGL ACC- RGB 32: 8/ 8/ 8:32

20 OGL ACC- RGB 32: 8/ 8/ 8:16

21 OGL ACC- CI 32: 8/ 8/ 8:32

22 OGL ACC- CI 32: 8/ 8/ 8:16

23 OGL ACC- RGB 8: 3/ 3/ 2:32

24 OGL ACC- RGB 8: 3/ 3/ 2:16

25 OGL ACC- CI 8: 3/ 3/ 2:32

26 OGL ACC- CI 8: 3/ 3/ 2:16

27 OGL ACC- RGB 4: 1/ 1/ 1:32

28 OGL ACC- RGB 4: 1/ 1/ 1:16

29 OGL ACC- CI 4: 1/ 1/ 1:32

30 OGL ACC- CI 4: 1/ 1/ 1:16

Using PixelFormat : 9



This is a list of ALL of the pixel formats available with your graphics card.



3. FEMGV has particular requirements and so we can narrow down the choice of candidate formats.

FEMGV requires:

- DW and OGL

- DB to give double buffering

- a Z-buffer (zb) of at least 16 bits

- a colour buffer of at least 16 bits



4. The most usual cause of screen blackness is trying to use an RGB pixel format when the graphics card can only cope with colour index (CI). So, say for example that pixel format 9

9 DW OGL ACC- DB RGB 16: 5/ 5/ 5:32

did not work on my machine, the chances are that number 13 would work

13 DW OGL ACC- DB CI 16: 5/ 5/ 5:32

Note that the only difference between 9 and 13 is that 9 is RGB and 13 is CI



5. To test a different pixel format rerun FEMGV like this

femgv6 -DefaultVisual 13 > log



Have a look at a model to see if the this new format has worked. If it is no better then check the log file. If you have selected an inappropriate format there will be a message telling why it is not suitable. You may need to try several formats!

Both the display resolution and the number of colours can affect the pixel formats available from your particular graphics card, if you cannot find a suitable format try changing the display properties of your screen.



6. Once you have found a pixel format that works you can either change the shortcut associated with Femgv so that it runs 'femgv6 -DefaultVisual nn' or you can set the resource DefaultVisual in the femsys.ini file.

Femsys.*.OpenGL.DefaultVisual : nn