Results 1 to 5 of 5

Thread: Displaying the model into 3d space more than once after loading it once.

  1. #1

    Displaying the model into 3d space more than once after loading it once.

    Does anyone think that TBGL has the capability to display the model more than one time?

    For an example, projectiles using an M15 model. Where more than one is drawn on the screen when being fired out by the player.

    For more understanding:

    Code:
    Load a 3DModel

    For T=1 to 5
    Draw a 3DModel at X*25,0,100
    Next T

    the result would be 5 models being drawn on to the screen.

    possible?

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

    Re: Displaying the model into 3d space more than once after loading it once.

    Sure this is possible!

    I will again show you version using entity system.
    You simply create 5 models, nick name them with equate (%eModel1 to %eModel5) and you can control them later.

    Please download the attached script, models are art by Michael Hartlef.

    Attached Images Attached Images
    Attached Files Attached Files
    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

  3. #3

    Re: Displaying the model into 3d space more than once after loading it once.

    i somehow looked at the code that somewhat looked interesting.

    is there any way those object models can be initialized using with the for loop method or arrays instead of using %model1, %model2, %model3 and so on?

    if not, i probably have another way of doing this.

  4. #4
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Displaying the model into 3d space more than once after loading it once.

    simple answer YES.

    %model1 is a number so just replace %model1 with your T variable( as per your example)

    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

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

    Re: Displaying the model into 3d space more than once after loading it once.

    Michaels advice is perfectly valid,

    you can use it that way of course.
    You can also retrieve unused IDs for entities using TBGL_EntityGetFreeID.
    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

Similar Threads

  1. Replies: 4
    Last Post: 07-07-2007, 10:28

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
  •