Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: A few Texture-Questions

  1. #21
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    OK, thanks. Now that's what I got so far and the answer to lot of questions in this thread:

    (TBGL)-Texture_Handling , to be used as an include-file or can be copied into code.

    Minimal OS: Windows XP Sp2,
    uses TBGL, needs FreeImage.dll

    -handle enumerating -(has to be done exclusively by this script in order to work correctly)
    -load textures from different formats
    -create empty textures
    -delete textures, single or in a range

    works like this:
    myTextureExists = TEXTURE_Exists(ID_to_Check)
    
    TEXTURE_Kill(First_to_Delete [, Last_to_Delete])
    
    
    myNewTextureID = TEXTURE_GetFromFile( 0, "c:\myTexture.dib")
    '                          (where the 0 is can be any value below 1)
    'or
    success = TEXTURE_GetFromFile( %TextureID, "c:\myTexture.png" )
    '                         ( where %TextureID is any number from 1 to 1024)
    myNewTextureID = TEXTURE_GetEmpty( 0, width, height, [R, G, B, A] )
    'or
    success = TEXTURE_GetEmpty( %TextureID, width, height, [R, G, B, A] )
    
    (user also can retrieve unused IDs by TEXTURE_GetNewID)
    Attached Files Attached Files
    Last edited by ReneMiner; 26-11-2012 at 16:50.
    I think there are missing some Forum-sections as beta-testing and support

  2. #22
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    Another small question related to textures:

    Since I use some external texture-loading routines the textures that are not loaded with default TBGL_LoadTexture have no TBGL_GetTextureName to return.

    Can I assign some name directly to the texture-slot that was created through TBGL_MakeTexture or do I have to keep track about this in an additional texturenames-array then?
    I think there are missing some Forum-sections as beta-testing and support

  3. #23
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    nice ideas in this thread. I wish I major window of free time would appear and I could rewrite the texturing stuff from scratch.
    For now, I would recommend to store data using Dictionary (pair of texture slot and its "name").


    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

Page 3 of 3 FirstFirst 123

Similar Threads

  1. TBTIL Texture Image Library
    By D.J.Peters in forum TBTIL Texture Image Library
    Replies: 19
    Last Post: 08-03-2010, 11:17
  2. How to animate a water texture?
    By Michael Hartlef in forum TBGL module by Petr Schreiber
    Replies: 8
    Last Post: 24-10-2008, 19:48
  3. Why is my texture not showing
    By Michael Hartlef in forum TBGL General
    Replies: 11
    Last Post: 02-10-2008, 05:29

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •