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.

Newcomers DBPro Corner / How to Load an image from computer?

Author
Message
Humilde
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location:
Posted: 16th Jun 2010 10:40
Hi, this is my first post.

I alread serch in forum and google forum search, but i dont found anything.

How I load an image from computer and pastle into a texturized cube?

Thank you
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 16th Jun 2010 13:08 Edited at: 16th Jun 2010 13:09
To load an image you need to use a command like this:



and to use it to texture a 3D object, you would use lines like these:



the 1,1 after the texture object command referring first to the object number and second to the image number, both set in the previous two lines.

Hope this helps.
Humilde
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location:
Posted: 16th Jun 2010 18:36
Thank you Lucas Tiridath

Helps a lot the second part

But i think that i do not made a clean question.

To laod a image form computer is this:
1. I have a image in computer
2. I want to my aplication apears an Open and Save dialog box, and take this image from a computer location
3. Them when this picture is loaded into aplication, Put into a texturized cube.

NOT I put the picture in code. But I can choose which picture I put fromn an open and save dialog.

Thank you
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 16th Jun 2010 18:56
BBB plugin can make this pretty easy but i`m not sure you can manage to do it just by downloading and looking at examples in it.I`m just not sure how experienced you are with coding and how good you are at understanding it.You can try it i`m sure it`s capable of doing just what you ask for.If you it`s hard for you then ask again or there could be other way to do this.I`ll do some example for you when i have free time.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Humilde
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location:
Posted: 16th Jun 2010 19:05
Thank you luskos
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 16th Jun 2010 21:41
Depending on how ambitious you're feeling and how smooth you want the process to be, you could try making your own dialog with the DBP file manipulation commands such as:

drivelist - prints drives on machine to screen
get dir$() - gets the current directory
set dir$() - sets the current directory
dir - prints the contents of the current directory to the screen
find first - find the first file in the directory
find next - finds the next file in the directory
get file name$() - gets the current file's name
get file type() - gets the current file's type

However I don't think I would recommend this, especially if you want an easy life unless you want to try it just for the challenge. The plugin is probably much simpler.
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 17th Jun 2010 01:17
Vert striped example you can figure out how to continue working with this.It loads any image you want, it`s very very basic.I`m tired, try it and complain tomorow.

It uses BBB plugin.



Where there is a will, there is a way.
I often edit my posts, that`s who i am
AJAtom
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 17th Jun 2010 03:42
Isn't there one of Darkside's DLLs floating around that does exactly this?

3d makes the gaming blockbusters of the year
but 2d changes gaming forever

Login to post a reply

Server time is: 2024-09-28 18:30:15
Your offset time is: 2024-09-28 18:30:15