Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
SamplerContext Class Reference

This is a special class object that holds a handle to the sampler state object given by the graphics back-end for a particular combination of texture sampling settings. More...

`#include "samplerContext.h"`

Inheritance diagram for SamplerContext:

## Public Member Functions
| SamplerContext (const SamplerState &sampler)
virtual TypeHandle | force_init_type ()
virtual TypeHandle | get_type () const
virtual void | output (std::ostream &out) const
virtual void | write (std::ostream &out, int indent_level) const
Public Member Functions inherited from TypedObject
| TypedObject (const TypedObject &copy)=default
TypedObject * | as_typed_object ()
| Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObject * | as_typed_object () const
| Returns the object, upcast (if necessary) to a TypedObject pointer.
int | get_best_parent_from_Set (const std::set< int > &) const
int | get_type_index () const
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool | is_exact_type (TypeHandle handle) const
| Returns true if the current object is the indicated type exactly.
bool | is_of_type (TypeHandle handle) const
| Returns true if the current object is or derives from the indicated type.
TypedObject & | operator= (const TypedObject &copy)=default
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)
Public Member Functions inherited from SimpleLruPage
| SimpleLruPage (const SimpleLruPage &copy)
| SimpleLruPage (size_t lru_size)
void | dequeue_lru ()
| Removes the page from its SimpleLru.
void | enqueue_lru (SimpleLru *lru)
| Adds the page to the LRU for the first time, or marks it recently-accessed if it has already been added.
virtual void | evict_lru ()
| Evicts the page from the LRU.
SimpleLru * | get_lru () const
| Returns the LRU that manages this page, or NULL if it is not currently managed by any LRU.
size_t | get_lru_size () const
| Returns the size of this page as reported to the LRU, presumably in bytes.
void | mark_used_lru () const
| To be called when the page is used; this will move it to the tail of the SimpleLru queue it is already on.
void | mark_used_lru (SimpleLru *lru)
| To be called when the page is used; this will move it to the tail of the specified SimpleLru queue.
void | operator= (const SimpleLruPage &copy)
void | set_lru_size (size_t lru_size)
| Specifies the size of this page, presumably in bytes, although any unit is possible.

## Static Public Member Functions
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from SavedContext
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedObject
static TypeHandle | get_class_type ()
static void | init_type ()
| This function is declared non-inline to work around a compiler bug in g++ 2.96.

## Friends
class | PreparedGraphicsObjects

## Additional Inherited Members
Public Attributes inherited from TypedObject
| get_type

## Detailed Description

This is a special class object that holds a handle to the sampler state object given by the graphics back-end for a particular combination of texture sampling settings.

Some graphics back-ends (like OpenGL) use mutable sampler objects, whereas others (Direct3D 10+) use immutable ones. In Panda3D, each unique sampler state has its own SamplerContext, which simplifies the implementation and makes redundant sampler objects impossible.

Definition at line 34 of file samplerContext.h.

## Constructor & Destructor Documentation

## ◆ SamplerContext()

SamplerContext::SamplerContext | ( | const SamplerState & | sampler | ) |
| inline

Definition at line 17 of file samplerContext.I.

## Member Function Documentation

## ◆ force_init_type()

virtual TypeHandle SamplerContext::force_init_type | ( |  | ) |
| inline virtual

Reimplemented from SavedContext.

Definition at line 53 of file samplerContext.h.

## ◆ get_class_type()

static TypeHandle SamplerContext::get_class_type | ( |  | ) |
| inline static

Definition at line 42 of file samplerContext.h.

## ◆ get_type()

virtual TypeHandle SamplerContext::get_type | ( |  | ) | const
| inline virtual

Reimplemented from SavedContext.

Definition at line 50 of file samplerContext.h.

## ◆ init_type()

static void SamplerContext::init_type | ( |  | ) |
| inline static

Definition at line 45 of file samplerContext.h.

## ◆ output()

void SamplerContext::output | ( | std::ostream & | out | ) | const
| virtual

Reimplemented from SavedContext.

Definition at line 21 of file samplerContext.cxx.

## ◆ write()

void SamplerContext::write | ( | std::ostream & | out,
|  | int | indent_level ) const
| virtual

Reimplemented from SavedContext.

Definition at line 29 of file samplerContext.cxx.

## Friends And Related Symbol Documentation

## ◆ PreparedGraphicsObjects

friend class PreparedGraphicsObjects
| friend

Definition at line 58 of file samplerContext.h.

The documentation for this class was generated from the following files:

- panda/src/gobj/samplerContext.h
- panda/src/gobj/samplerContext.cxx
- panda/src/gobj/samplerContext.I