Results 1 to 5 of 5

Thread: tbgl coding challenge

  1. #1
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    tbgl coding challenge

    This is a fun coding challenge for tbgl.

    I wrote this in Delphi 6 using GLScene, all's that I can say is it is an awesome package.
    For those that have Delphi, well any version other than turbo as you need to be able install packages.
    The free turbo versions at the moment don't allow this.
    http://glscene.sourceforge.net/wikka/HomePage

    The challenge is to replicate a similar scene in tbgl. The fps doesn't matter, having the controls to generate the textures and to animate are not needed. The main thing is to make a dynamic texture in memory using no outside files, putting them on the faces of a cube and being able to flip through the dynamically created textures for the animation. I also have 4xHQ anti-aliasing turned on in the code.

    Hope this demo inspires you tbgl geniuses to come up with similar techniques in tbgl


    Attached Files Attached Files
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  2. #2

    Re: tbgl coding challenge

    Kent, I don't know anything in TBGL where you can get access to a texture surface or like you want to, attach a texture (in memory) to a model.
    So how is it possible?

    You seem to know how to do this as you announced this challenge.

  3. #3
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: tbgl coding challenge

    Mike I couldn't figure it out in tbgl. I thought then maybe I could write a dll to do it, but in looking through all the c++ stuff my brain fried. I did find some examples in c++ but I couldn't convert them. But by far the simplest way was with glscene in delphi. I kept it simple compared to a procedural texture if you noticed. As you saw with some of the noise generation procedural code it does take some time as not meant for interpreted languages. SO I kept it to just simple text output to make it doable in thinBasic and tbgl.

    Petr was talking about a new command to allow something like this. I thought this challenge might help motivate him to do it. But if any of you know how to do it with api calls it would be worth seeing the code also!!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732

    Re: tbgl coding challenge

    Hi kryton,

    in current TBGL it is possible just to create bitmap file by script, save it and the load as texture.
    I will put the dynamic texture creation on TBGL wish list.


    Bye,
    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

  5. #5
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: tbgl coding challenge

    Thanks Petr. The reason I am pushing so hard on this is to in the end be able to give programs that are small and can look great. Right now tga and bmp files are just too big and it is tough to make small files and send to everyone.

    I also sent you some links and articles via email about putting in compressed tga, png and jpg without using outside libraries. So either having these file formats or being able to make dynamic textures without saving out as bmp or tga first would be great.

    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Similar Threads

  1. thinBASIC coding challenge #1
    By Petr Schreiber in forum Challenge
    Replies: 29
    Last Post: 10-04-2007, 21:20

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
  •