Vega prime FAQs 51 thru 100

FAQs 51 thru 100

square72_blue.gif FAQs 1 thru 50 square72_blue.gif FAQs 51 thru 100 square72_blue.gif  FAQs 101 thru 150 square72_blue.gif FAQs 151 thru 200  square72_blue.gif


    This unofficial Vega Prime FAQ Part 4 ( 151 thru 200) is provided by Gordon Tomlinson , I hope you find the information contained with these FAQ's useful and helpful

 

  1. Why can I only Run One Application/Tool in Vega Prime
  2. Why Can I Not Call Delete  Most Vega Prime Classes
  3. How do I Delete Vega Prime Class Instances
  4. What is Reference Counting
  5. Does Vega Prime Support Smart Pointers
  6. What are Smart Pointers
  7. Why Won't the Bump Isector Work with Ground Clamping
  8. How Can I Change the Color of Light Lobes
  9. Why Does glReadPixels Capture other Windows
  10. How can I Force my Vega  Window on Top
  11. How Can I Stop a Window being Ontop after using &wndTopMost
  12. Integrated Graphics Card Problems & Issues
  13. Why Does my Application only Run at only 1-2hz
  14. What are the Difference between Real-time and Animation
  15. vpMarine cannot find cg.dll
  16. .
  17. .
  18. .
  19. .
  20. .
  21. .
  22. .
  23. .
  24. .
  25. .
  1. .
  2. .
  3. .
  4. .
  5. .
  6. .
  7. .
  8. .
  9. .
  10. .
  11. .
  12. .
  13. .
  14. .
  15. .
  16. .
  17. .
  18. .
  19. .
  20. .
  21. .
  22. .
  23. .
  24. .
  25. .

 

Resources

 

* 151  *  Why can I only Run One Application/Tool in Vega Primetop


    With Vega classic I could run multiple Vega applications and tools concurrently on one machine,

    But with Vega Prime 1.x I can now only run one application or tool that needs a license. Why??

    I used to be able to test my Multi Pipe/Windowed applications on one machine, I could test my DIS/HLA based applications etc now I cannot does this, why can I not do this any more.

    In vega Prime 2.0 you should be able to Run multiple applications on the same machine

     

* 152  * Why Can I Not Call Delete  Most Vega Prime Classes top

     

    The destructor of Vega Prime class instances is not publicly accessible so they cannot be deleted directly by calling delete, this is due to the fact Vega Prime uses reference counting to aid in automatic destruction of calls instances

    See FAQ's 153 and 154 and the Vega Prime Programmers guide fot more details

     

* 153  * How do I Delete Vega Prime Class Instances top


    How do I call delete on a vgClass instance, say is I do

    vpObject *object = new vpObject;

    delelte object;

    I get compilations errors, that mummble about not being able to access the destructor.

    As you have found out you cannot call delete on most Vega Prime class instances. This is a design feature of Vega Prime.

    The destructor of Vega Prime class instances is not publicly accessible so they cannot be deleted directly by calling delete.

    Vega Prime makes use of reference counting. So when the reference count reaches zero the instance will autmatically be destroyed. 

    You can call object->unref() to decrement the count and get the  reference count with object->getRefCount()

     

* 154  *  What is Reference Countingtop

     

    Reference counting is a common method to help ensure that class instance are no being deleted when still being used elsewhere and to provide an automatic method of delete the instances when they are no longer needed

    All Vega Prime class instances are reference counted,

    The initial reference count of all instances is zero after the instance is created.

    When the instance is added as a child to a parent or referenced by another instance, its reference count is then incremented by one.  

    When the instance is unreferenced directly, by calling unref(), or indirectly, by removing the instance from its parent, then the reference count is decremented by one.

    When the reference count is equal to or less than zero, the instance will be deleted automatically by the call to unref().

    The destructor of Vega Prime class instances is not publicly accessible so they cannot be deleted directly by calling delete.

    Explicitly increasing the reference count for all variables that hold the Vega Prime instances will guarantee that they will not be deleted until they are no longer referenced by anyone.

    For example, the vpChannel defined within the ACF is attached to the vpWindow. When the channel is created, its reference count is zero. When the

    attachment is made, the channel's reference count is increased to one.

    If the application were to detach the channel from the window, the channel's reference count would be decremented and because it would now be equal to zero, it would be automatically deleted.

    The proper way to manage the reference count for Vega Prime class instances is to increment the reference count explicitly at the config or creation stage using ref() and decrement the reference count explicitly

    So the Golden rule is if you want to keep the class instance around, you Must call ref() right after you create the instance

    The one of the nasty disadvantages with using reference counting is that you can get left with dangling pointers, that can cause a crash if used after the deletion of the instance. One method that can help he a technique called Smart Pointers

     

* 155  *  Does Vega prime Support Smart Pointerstop

     

    Yes vega Prime supports smart pointers using the template class vuField< class >

    The vuField< class > template is a variation on the smart pointer theme that gives an owner object explicit control over the following aspects of its

     

* 156  * What are Smart Pointers top

     

    In brief Smart Pointers are C++ objects that simulate simple pointers by implementing the  referecene 'operator->' and the unary dereference 'operator*'.

    In addition to supporting pointer syntax and semantics, smart pointers augmente nomral pionters with greater    functionality and   perform useful tasks , such as memory management, reference counting, locking, automatic deletion etc, thus freeing the application from carefully managing the lifetime of pointed to objects.

    Smart pointers are typically implemented as C++ templates in order to make them reusable without compromising the type safety.

    The vuField<class> template is a variation on the smart pointer theme that gives an owner object explicit control over the following aspects of its management of the reference countable pointee:

    Also a quick search on Google for 'Smart Pointer' will throw many good hits for indepth discussion on Smart Pointers including their pros and cons etc.

     

* 157  *  Why Won't the Bump Isector Work with Ground Clampingtop


    Currently with Vega Prime you cannot use a Ground Clamp instance with an instance of vpIsectorBump,

    If you try to do this you should  seeing a warning in your console similar to

    warn -> vpGroundClamp::setIsector: cannot use vpIsector type of isector (myIsector1 0xef7268) for ground clamping

    I'm not aware of a work around to this you will need to use a Z, HAT, instace for the ground clamping
     

* 158  *  How Can I Change the Color of Light Lobestop


    Unfortunately currenlty in Vega Prime  you cannot change the color of the light lobes.

    I'm not aware of any work around that will allow to do this, I was suprised to note that you cannot chnage the color in Vega Prime, as this was requested feature from Vega and there does not seem to be any reason not to provide this feature...

     

* 159  *  Why Does glReadPixels Capture other Windows top


    When I do a glReadPixels and write this out as an image file or to an AVI file, I get other windows captured, why.

    Presuming that when you do the call to glReadPixel you have other windows overlapping the graphics window, then it is likely that you will see the other windows in your capture

    Unfortunately This is not so much a platform issue as it is a consequence of the OpenGL specification.

    Paraphrasing section 4.1.1 "Pixel Ownership Test": ...if a pixel in the frame buffer is not owned by the GL context, the window system decides the fate of the incoming fragment; possible results are discarding the fragment...  Note that no mention is made of whether front or back buffer; it's entirely the window system's call.  Any code depending on a particular implementation's behaviour is very non-portable.

    This seem to be more of a problem for Windows users and not as much on X11 based OS's (although not guaranteed).

    On windows you can force you application to the stay on stop and then glReadPixel will capture just the applications window
     

* 160  * How can I Force my Vega  Window on Top  top


    On Windows this is quite straight forward using the following on your window
     

Code :

--


    RECT wpos;

     

    SetFocus();

     

    BringWindowToTop();

     

    SetWindowPos(  &wndTopMost,

     

                                wpos.left,

     

                                wpos.top,

     

                                wpos.right - wpos.left,

     

                                wpos.bottom - wpos.top,

     

                               SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOSIZE );

     

 

     

* 161  *  How Can I Stop My Vega Window being Ontop after using &wndTopMosttop


    How Can I Stop My Vega Window being Ontop after using &wndTopMost after using FAQ 160

    On Windows this is quite straight forward using the following on your window
     

Code :

--


    RECT wpos;

    SetWindowPos(  &wndNoTopMost,

     

                                wpos.left,

     

                                wpos.top,

     

                                wpos.right - wpos.left,

     

                                wpos.bottom - wpos.top,

     

                               SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOSIZE );

     

 

     

* 162  *  Integrated Graphics Card Problems top

     

    Q: I'm using an Integrated Graphics Card  and I'm having problems with artefacts appearing and my frame rate is very poor.

    This is quite a common problem when using an integrated graphics cards (such as Intel 82845)

    This is quite a common problem, most OpenGL based programs such as Vega, Performer and OSG more than likely will have problems when they are used with an integrated such as the common  Intel 82845 chipset.

    The first thing to do is to visit the manufactures web site or contact their support channels to obtain there latest graphics driver for the card.

    Installing the newest  graphics driver normally help to some extent, make sure you select at least 24bit or 32 bits for the colour,

    Also make sure and allocate as much RAM to the card as possible, you will need at least 64mb  the more they support the better, if you only have 32mb then your performance will not be good

    The performance of the integrated card can will always in most case be a lot worse the a dedicated graphics card as the integrated card in  most case use system ram, which slows it down and also place a lot of the processing of graphics commands on the machines normal CPU.

    To be honest integrated cards are terrible for 3d Real-time graphics, there fine for normal desktop activities but not graphics, the best recommendation I can give is to install a dedicate graphics card, you can get a  very reasonable card these days for say $100 or so which will blow away the integrate card.

     

* 163  *  Why Does my Application only Run at only 1-2hztop

     

    There can be many reasons that your simulation/application can be running at only 1-2 Hz or less.

    Typically this indicates that you may have dropped in to software rendering mode on your graphics card. This can happen when you set-up up Opengl and request your pixel format for the Opengl Window. Normally it means you have asked for a format or a setting that the card cannot support or does not support. I say cannot support as it may be that the resources of that card are limited when you request the pixel format, such as your resolution is too big for a 32bit z buffer, another Opengl has already consumed most of the resources etc. Or your requesting a setting not supported by your graphics card, you can find the formats supported by your cards with the following 

    On Irix you can use findvis on the command line to display the available bit plane configurations supported on the Irix system

    On Windows you can use a program from Nvidia to show the available bit plane configurations

    Then it might be a case you are trying to

    • display too much,
    • too many polygons
    • high screen resolutions
    • too many textures.
    • textures too big ( > 512,x512) ( for real-time try to stick below 512x512
    • Too many state changes
    • You Application is too complication making you CPU bound et
    • Your IO bound
    • Etc

    In this case you have to try and simply your application, reduce the data, reduce the applications work load, get fast machine, maybe use a multi-process machine, get better graphics, reduce your resolution etc

     

* 164  *  What are the Difference between Real-time and Animationtop

     

    Animations are typically used for films, high resolution renderings, images for print, and pre-programmed demonstrations.

    Real-time applications are used in application where responding to user input is part of  the simulation, for example, during flight training and interactive architectural  demonstrations. Both real-time and animation applications simulate real and imaginary worlds with highly detailed models, produce smooth continuous movement, and render at a certain number of frames per second .

    Some of the main differences are: 

    • Real-time application frames are rendered in real time, which means the frames are continuously recalculated and rendered as the user changes direction and chooses where to move through the scene to view
    • Animation frames are pre-rendered, which means the animator sets the order of the frames and chooses the parts of the scene to view. Each frame can take hours to render
    • Real-time applications are highly interactive, and the user controls the movement of objects within the scene; animations do not allow for human interaction, and the user is a passive  participant 
    • The typical emphases of real-time applications are interactivity and purpose. Models in real-time applications typically have less detail than models that are used in animations to increase the rendering speed and shorten the latency period, which is the time delay from user input until the application makes an appropriate response. To achieve realistic real-time simulations, the latency period must be too short for the user to perceive
    • The emphases of animations are almost always non-interactive aesthetics and visual effects. Models in animations usually have much more details; mainly because the use of frames that pre-rendered ( which can take hours or days), the effect on drawing speed can be pre-determined
    • Real-time applications typically are displayed at various frame rates, which range typically require rate off 60 frames per second, this may change depending on application goals and screen complexity
    • While animations based applications usually display at standard 24 frames per second for every pre-rendered sequence of images ( which can take hours per frame compared 16.666 milliseconds for real-time at 60hz)

     

* 165  * vpMarine looking for cg.dll top

* 166  *  top

    .

* 167  *  top

    .

* 168  *  top

    .

* 169  *  top

    .

* 170  *  top

    .

* 171  *  top

    .

* 172  *  top

    .

* 173  *  top

    .

* 174  *  top

    .

* 175  *  top

    .

* 176  *  top

    .

* 177  *  top

     

* 178  *  top

     

* 179  *  top

    .

* 180  *  top

    .

* 181  *  top

    .

* 182  *  top

    .

* 183  *  top

    .

* 184  *  top

    .

* 185  *  top

    .

* 186  *  top

    .

* 187  *  top

    .

* 188  *  top

    .

* 189  *  top

    .

* 190  *  top

    .

* 191  *  top

    .

* 192  *  top

    .

* 193  *  top

    .

* 194  *  top

    .

* 195  *  top

    .

* 196  *  top

    .

* 197  *  top

    .

* 198  *  top

    .

* 199  *  top

    .

* 200  *  top

    .
 
 
 

 

 

© Copyright 2005-2006 Gordon Tomlinson  All Rights Reserved.

All logos, trademarks and copyrights in this site are property of their respective owner.