Explore tens of thousands of sets crafted by our community.
Graphics Design Patterns
12
Flashcards
0/12
Composite Pattern
Composes objects into tree structures to represent part-whole hierarchies. In graphics, it is used to build a scene graph, where each node can be a leaf or a composite of other nodes.
Singleton Pattern
Ensures a class has only one instance and provides a global point of access to it. Used in graphics settings management where a single graphics configuration is shared across the application.
Command Pattern
Turns a request into a stand-alone object containing all information about the request. Commonly used in graphics programming to encapsulate drawing operations, allowing for command queueing, undo operations, and more.
Bridge Pattern
Decouples an abstraction from its implementation so that the two can vary independently. Useful in graphics for separating a rendering API (abstraction) from its concrete implementation on different devices (implementation).
Decorator Pattern
Adds new functionality to an object without altering its structure. This pattern can be applied for adding effects like motion blur or ambient occlusion to a rendered scene.
Prototype Pattern
Used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. Facilitates the copying of complex graphics objects, like textures or mesh data with varying attributes.
Proxy Pattern
Provides a placeholder for another object to control access to it. Can be used to defer the loading of a high-resolution texture in a graphics application until it is needed.
Abstract Factory Pattern
Provides an interface for creating families of related or dependent objects without specifying their concrete classes. In graphics, it can be used to create a suite of objects needed for a rendering engine.
Builder Pattern
Separates the construction of a complex object from its representation, allowing the same construction process to create various representations. Applied for complex scene graph construction.
Factory Method Pattern
Defines an interface for creating an object, but lets subclasses alter the type of objects that will be created. Useful for creating different types of renderers (OpenGL, DirectX) based on the runtime environment.
Flyweight Pattern
Reduces the cost of creating and manipulating a large number of similar objects. Often used in graphics to manage large numbers of shared mesh or texture objects to save memory.
Adapter Pattern
Allows incompatible interfaces to work together by wrapping its own interface around that of an already existing class. Useful for integrating libraries for physics engines with graphics renderers.
© Hypatia.Tech. 2024 All rights reserved.