mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Add a way to get access to OpenGL texture index
This commit is contained in:
parent
b71ee446e3
commit
85a9cdd052
@ -95,6 +95,27 @@ reset_data() {
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an implementation-defined handle or pointer that can be used
|
||||
* to interface directly with the underlying API.
|
||||
* Returns 0 if the underlying implementation does not support this.
|
||||
*/
|
||||
uint64_t CLP(TextureContext)::
|
||||
get_native_id() const {
|
||||
return _index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to get_native_id, but some implementations use a separate
|
||||
* identifier for the buffer object associated with buffer textures.
|
||||
* Returns 0 if the underlying implementation does not support this, or
|
||||
* if this is not a buffer texture.
|
||||
*/
|
||||
uint64_t CLP(TextureContext)::
|
||||
get_native_buffer_id() const {
|
||||
return _buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -33,6 +33,9 @@ public:
|
||||
virtual void evict_lru();
|
||||
void reset_data();
|
||||
|
||||
virtual uint64_t get_native_id() const;
|
||||
virtual uint64_t get_native_buffer_id() const;
|
||||
|
||||
#ifndef OPENGLES
|
||||
void make_handle_resident();
|
||||
GLuint64 get_handle();
|
||||
|
@ -15,6 +15,27 @@
|
||||
|
||||
TypeHandle TextureContext::_type_handle;
|
||||
|
||||
/**
|
||||
* Returns an implementation-defined handle or pointer that can be used
|
||||
* to interface directly with the underlying API.
|
||||
* Returns 0 if the underlying implementation does not support this.
|
||||
*/
|
||||
uint64_t TextureContext::
|
||||
get_native_id() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to get_native_id, but some implementations use a separate
|
||||
* identifier for the buffer object associated with buffer textures.
|
||||
* Returns 0 if the underlying implementation does not support this, or
|
||||
* if this is not a buffer texture.
|
||||
*/
|
||||
uint64_t TextureContext::
|
||||
get_native_buffer_id() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -37,6 +37,8 @@ public:
|
||||
PUBLISHED:
|
||||
INLINE Texture *get_texture() const;
|
||||
INLINE int get_view() const;
|
||||
virtual uint64_t get_native_id() const;
|
||||
virtual uint64_t get_native_buffer_id() const;
|
||||
|
||||
INLINE bool was_modified() const;
|
||||
INLINE bool was_properties_modified() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user