We must wait for Joshy to know the true reason,
my theory is that the NewRGBTextureFromFile loads the texture and lets it bound with glBindTexture internally.
Petr
Btw Petr, why is this sample code working? I see no BindTexture command there.
We must wait for Joshy to know the true reason,
my theory is that the NewRGBTextureFromFile loads the texture and lets it bound with glBindTexture internally.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Yes, that makes sence.
This lib is incompatible with TBGL's own texture handling.
I have few suggestions for Joshy,
but as I see this thread, he has already lot to answer
If he will agree for new forum, I will post suggestion for one command there, which will make it even more TBGL usable.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
be cool friends the topic is "Experimental" modules or library interface
the zip file is now up to date (see first post)
The lib in it's curent state has nothing to do with TBGL
but to use a texture i used TBGL of course
there is a new example test02 in the zip file
ist use custom alpha channel
if you put your tricky codes in a thinBasic SDK lib only thinBASIC users can use it
but as a "normal" dll all windows OpenGL coder can use it for free and in comerical products too.
TBGL users needs:
Dim Handle as Long
Handle = NewTextureXXX(FileName)
TextureSlot = TBGL_CreateTextureSlotFromHandle(Handle)
...
or
...
TextureSlot = TBGL_CreateTextureSlotFromHandle(NewTextureXXX(FileName))
...
Joshy
(Sorry about my bad English.)
this isn't a bad idea.Originally Posted by Eros Olmi
Joshy
(Sorry about my bad English.)
what makes this lib as a special lib ?
this isn't only a other fast and free image loading lib
it's more some parts are realy tricky.
for example if you use a other lib loads a png or what ever
and sets any mask color as alpha channel
in most cases it will work as you will acept.
but if you enable mipmapping the result is often not good
comapre this three pics
the texture is from *.bmp file without any alpha channel
then pink RGB(255,0,255) is defined as new alphachannel
the third picture is from the library i wrote last night.
Joshy
(Sorry about my bad English.)
Added:
textnum = NewAlphaTextureFromCombinedFiles(ImageFile, AlphaFile)
get it from first post see test03.tbasic
happy cooding
Joshy
(the first file must be the image the alphachannel will be calculated from the second file)
(Sorry about my bad English.)
Created dedicated forum for TBCDL
Joshy, you are moderator in this area.
The best would be to have a post marked as "Sticky" where to have the latest version of your lib always updated and have different posts for specific discussions. This will simplify a lot searching and keeping things organized.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Bookmarks