it's just an idea, maybe can be done somehow but I dunno how because I have no idea what format is used to store graphics on clipboard.
thinCore allows only to capture a text from clipboard - but thinCore is not a graphics-module.
My idea is to have a TBGL-function that creates a texture from some image-data currently to find on clipboard, very simple, perhaps alike this
Function TBGL_TextureFromClipboard(
Byval texID as Long,
Byval TBGL_TEX_Quality as Long,
Optional Byval lWidth as Long,
Byval lHeight as Long
) As Long
' return ID of texture on success
' return 0 if no data found on clipboard/ if function failed
' ---
' maybe:
%Size_POT = -1 ' size automatic to the nearest power-of-two
%Size_None = 0 ' leave size as is
TBGL_TextureFromClipboard( texID, %TBGL_TEX_CRISPANISO, %Size_POT, %Size_POT )
' --
' perhaps also have a reverse operation:
Function TBGL_TextureToClipboard( texID ) As Long
' return True if success
' return False if slot texID was empty
so basically one passes just the texture-slot, desired width & height and desired quality to create a texture from image-data on clipboard.
If Width and Height are passed and are above 0 then this would be the desired texure-size,
else the function should use either the next matching POT for Width, Height or both if below 0 and fill the leftover pixels with black on %TBGL_Data_RGB (24bit) or transparent on %TBGL_Data... that contains an alpha (32bit) or just leave the size unchanged if 0/None passed.
Bookmarks