Skip to content

Commit f996224

Browse files
committed
Implemented native_handle property in sf.Texture
1 parent b9b70c2 commit f996224

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/Includes/sfml/sfml.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ cdef extern from "SFML/Graphics.hpp" namespace "sf":
417417
bint isSmooth() const
418418
void setRepeated(bint)
419419
bint isRepeated() const
420+
unsigned int getNativeHandle() const
420421

421422
cdef cppclass Glyph:
422423
Glyph()

src/sfml/graphics/graphics.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,10 @@ cdef public class Texture[type PyTextureType, object PyTextureObject]:
795795
def __set__(self, bint repeated):
796796
self.p_this.setRepeated(repeated)
797797

798+
property native_handle:
799+
def __get__(self):
800+
return self.p_this.getNativeHandle()
801+
798802
@classmethod
799803
def get_maximum_size(cls):
800804
return sf.texture.getMaximumSize()

0 commit comments

Comments
 (0)