Panda3D
Functions
antialiasAttrib.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "antialiasAttrib.h"
#include "config_pgraph.h"
#include "graphicsStateGuardianBase.h"
#include "dcast.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"

Go to the source code of this file.

Functions

 CPT (RenderAttrib) AntialiasAttrib
 Constructs a new AntialiasAttrib object. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2005-01-26

Definition in file antialiasAttrib.cxx.

Function Documentation

◆ CPT()

CPT ( RenderAttrib  )

Constructs a new AntialiasAttrib object.

Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

The mode should be either M_none, M_auto, or a union of any or all of M_point, M_line, M_polygon, and M_multisample. Also, in addition to the above choices, it may include either of M_better of M_faster to specify a performance/quality tradeoff hint.

If M_none is specified, no antialiasing is performed.

If M_multisample is specified, it means to use the special framebuffer multisample bits for antialiasing, if it is available. If so, the M_point, M_line, and M_polygon modes are ignored. This advanced antialiasing mode is only available on certain graphics hardware. If it is not available, the M_multisample bit is ignored (and the other modes may be used instead, if specified).

M_point, M_line, and/or M_polygon specify per-primitive smoothing. When enabled, M_point and M_line may force transparency on. M_polygon requires a frame buffer that includes an alpha channel, and it works best if the primitives are sorted front-to-back.

If M_auto is specified, M_multisample is selected if it is available, otherwise M_polygon is selected, unless drawing lines or points, in which case M_line or M_point is selected (these two generally produce better results than M_multisample)

This should return the result of applying the other RenderAttrib to a node in the scene graph below this RenderAttrib, which was already applied. In most cases, the result is the same as the other RenderAttrib (that is, a subsequent RenderAttrib completely replaces the preceding one). On the other hand, some kinds of RenderAttrib (for instance, ColorTransformAttrib) might combine in meaningful ways. Tells the BamReader how to create objects of type AntialiasAttrib.

Definition at line 53 of file antialiasAttrib.cxx.