Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Equivalent to texture object?

Author
Message
DC Sound System
8
Years of Service
User Offline
Joined: 14th Feb 2016
Location:
Posted: 6th Jan 2020 22:49
Hello,

I'm just getting into AppGameKit and my last TGC product I've used was DarkBasic Classic. In DBC there was a very useful function called "texture object". Is there an equivalent in ADK?

I'm using "SetObjectImage" and it doesn't seem to work the same way. I'm basically just trying to slap a .png file on to a plane. When I texture my .png file to my plane instead of resizing my picture to the size of my plane and texturing it, it just puts the png on the plane with no resizing. Do I need to resize the picture manually? I'd prefer not to...

The author of this post has marked a post as an answer.

Go to answer

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Jan 2020 00:09
https://www.appgamekit.com/documentation/Reference/3D/SetObjectImage.htm
Quote: "instead of resizing my picture to the size of my plane and texturing it, it just puts the png on the plane with no resizing."

The set object image will apply an image to an object and will resize with the object automatically

Texture stage 0 is default
Texture stage 1 if you want full bright

If you are using shaders you may need to set the texture stage differently

but other than that im not sure what your doing perhaps if you showed an example someone may see why its not working for you
MerryChristmas Everyone
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
DC Sound System
8
Years of Service
User Offline
Joined: 14th Feb 2016
Location:
Posted: 7th Jan 2020 03:16 Edited at: 7th Jan 2020 03:31
Actually never mind. It was texturing like you say. I just missed something stupid. Thanks for the info though.

I have another related question though. There doesn't seem to be an equivalent to "TEXTURE BACKDROP" only skybox stuff. Is there an equivalent I'm missing?
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jan 2020 03:45 Edited at: 7th Jan 2020 03:47
This post has been marked by the post author as the answer.
There is no backdrop per-se for 3D without a skybox or similar approach.
However with AppGameKit, as you can mix 3D and 2D in the same scene, you could apply a 2D sprite backdrop at a depth lower than your 3D render layer.

e.g . A sprite set to height and width of screen at depth 11 and your 3D objects at depth 10 (default) will do the job.
If you think of AppGameKit as really rendering sprites as a texture on a plane facing the screen, it helps
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 7th Jan 2020 18:36
Dont 3d objects default to a depth of 100?
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jan 2020 20:14
Probably. Don't know why 10 stuck in my mind - maybe I set it to 10 once
You can of course set the global 3D rendering depth to whatever.
DC Sound System
8
Years of Service
User Offline
Joined: 14th Feb 2016
Location:
Posted: 8th Jan 2020 03:40
Cool. Thanks for the info.

Login to post a reply

Server time is: 2024-04-20 09:29:09
Your offset time is: 2024-04-20 09:29:09