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.

Dark GDK / resources and exe (dgdk)

Author
Message
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 5th Dec 2007 20:16
could anyone tell how to build images in with the exe so i can use the dbloadimage command..
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Dec 2007 20:57 Edited at: 5th Dec 2007 21:04
I wrote some code for that somewhere around 18 months ago. It uses a bitmap, so you'll need to use the same for this code, or get a library from somewhere to convert the image you use to bitmap form in memory.

Anyway, add the bitmap as a resource to your application - the IDE will set up the resource.h file automatically with a define like so:


Make sure that resource.h file is included within the .cpp file you plan to use to create your image in. In this example, I'm just using the main source file:


That's how I did it in the past - what I'd do now is use on of the dbMakeImage commands to create a DX texture and put the data directly into the texture rather than via a memblock.

[EDIT]Quick hack of the code to make sure it works with the latest release

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 6th Dec 2007 04:05
thank you ianm it helped me loads
theplake
16
Years of Service
User Offline
Joined: 30th Nov 2007
Location:
Posted: 26th Dec 2007 19:12
And how it get with .Png files?

Login to post a reply

Server time is: 2024-11-19 20:55:51
Your offset time is: 2024-11-19 20:55:51