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.

Program Announcements / D3DFunc V3.0

Author
Message
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 29th Oct 2009 21:45 Edited at: 29th Oct 2009 21:51
Agent,

Sorry for no looking at this yet

Can you work with this example as it is much simpler. If this doesn't work it's easier to look at.

How does this display?



[EDIT] - Also it does D3D_Text work without using bitmaps?

Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 30th Oct 2009 18:53 Edited at: 30th Oct 2009 19:13
Hi Cloggy,

The sample code you posted here works as expected. If I compile the code exactly as you posted it, this is the output:



If I rearrange the coordinates a bit so you can see the individual lines of text, you get this:



There doesn't seem to be anything wrong with these outputs, but I stress that I never had any problem with the functionality you are sampling in this code. [EDIT]: Argh, it was 4am when I originally typed this. In actuality, this output is obviously very wrong; see next post.

Now, take the following set of circumstances:

* Create bitmap (area for drawing, not an actual image file), and paste a loaded image to this bitmap.
* Create a camera, and point the camera to the image we've pasted to the bitmap, so that the viewport of the camera is filled with the image.
* Set the current bitmap to the negative of the camera number, so that all further output is drawn directly over the image (as opposed to the bitmap it's rendered into). Note that we're modifying a loaded image while it's in memory here.

Now, the relevant factor in reproducing the bug is in the size of the camera viewport. If the camera viewport is fullscreen, the bug does not surface and text appears properly. If the camera viewport is anything other than fullscreen, the drawn text is scaled in proportion with the viewport size, which is not correct function.

I think we should use the following sample code as a baseline, as it clearly demonstrates correct output, as well as bugged output:



Within this code lie two commented lines. Uncomment the first one and view the output, then recomment it and uncomment the second one and observe the clear difference. The relevant command in producing the bug is made plain in this way. The size of the camera viewport is the factor in question.

Can you make sense of this from your point of view?

PS: Yes, D3D_Text functions as expected without bitmaps.
Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 30th Oct 2009 19:10 Edited at: 30th Oct 2009 19:19
Hold on...

It's late and I'm tired and not observing properly right now, forgive me;

The sample code you've posted does in fact seem to be producing a similar bug, so for the time being let's work with your sample.

Looking at it a bit more closely, it seems that using a camera viewport or a bitmap size other than fullscreen will produce the bug. In my sample, I'm altering the viewport size; in your sample, you're altering the bitmap size, and the effects seem to be similar. The size of the output text is affected proportionally to the size of the bitmap/camera viewport as a ratio of the size of the full screen.

It appears to me that, in your sample code, "Standard DBP Text" and "D3D Text Parameter 0" should be displayed identically, while "D3D Text Parameter 1" should be slightly smaller (or bigger? I'm not sure) to account for an intended text size difference.

However, I'm observing a change in displayed text size (as you can see from the screens I pasted above) in "Standard DBP Text" and "D3D Text Parameter 0" which appears to be a result of the bitmap being smaller than fullscreen.

If I adjust your sample code as such:

Replace line:
create bitmap 1, 420, 150
with:
create bitmap 1, screen width(), screen height()

without changing any text output coordinates, I get the following output:



This appears to be correct output.

My conclusion then, is if we're drawing to a bitmap that isn't fullscreen, or to a camera whose viewport isn't fullscreen, the text is being scaled proportionally. This doesn't seem to be intended behaviour, and regardless isn't what I want it to do

What I want is for that text to appear proper fullscreen size, even if the bitmap or viewport we're drawing to isn't fullscreen.

Hopefully these findings will help you sort this out.

Sorry again for the 4am thought process; I'll try to monitor this thread at a more sane hour in future

[EDIT]: In my post above, note that in the first image the text is written over itself, whereas in the image in this post, the text is drawn in the correct positions. Codewise, the text in both images is drawn to the same location; not only is the text size being affected by bitmap/viewport size, but also the coordinates to which the text is being drawn. I've observed this elsewhere in the thread, but I wanted to return it to your attention again now, as it may be relevant.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 31st Oct 2009 00:59
Agent,

Sorry, but I'm struggling to come up with any solution. The problem you are experiencing is the exact one reported to me by other people earlier in this thread.

I have made a change, resetting the viewport to the full screen size when calling D3D_EndText. This appears to have corrected the problem for all the other users apart from yourself.

I'm not really sure where I can go to take this further. Maybe it's a graphics driver problem?

Is there anyone else out there who can reproduce the problem that Agent has?

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 31st Oct 2009 01:33 Edited at: 31st Oct 2009 01:33
Just to chime in on this, I tested Agent's code once with each line commented, and Cloggy's code in the post before that. Not sure what any of these are supposed to look like, but here they are as compiled on my PC.

Attachments

Login to view attachments
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 31st Oct 2009 01:40
GIDustin,

That's exactly how it should look.

Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 31st Oct 2009 15:16
GIDustin's results are inconsistant with mine: his output looks the way I expect the code to produce, but when I compile the same code my output is not the same as his.

It appears I'm the odd one out. Logic dictates that this cannot be a problem with D3D_Func...

Resetting the viewport to fullscreen within D3D_Func itself seems to be the correct way to fix this issue, but if you've already done that and it's working for everyone else, why not for me?

Is this file http://www.dbdepot.co.uk/downloads/D3DFunc%20v3.7.1.zip the most current version of D3D_Func, including the fix you describe? That's the version I'm compiling with.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 1st Nov 2009 21:55
Agent,

There is a newer version in an earlier post.

I attach a compiled version of the code I posted on 29th Oct 2009 at 20:45

It shows the text correctly on my system.

Attachments

Login to view attachments
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 3rd Nov 2009 00:55
@Cloggy:

What is the newest release of your DLL? I see one posted above ( 6th Oct 2009 13:13). Is that a release or is there some debug code left in for Agent's problem?

I am starting a new project and want my DLLs up-to-date before I start. This is one I cannot live without.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 3rd Nov 2009 09:04
GIDustin,

The one posted on 2nd Oct 2009 at 00:50 is the latest without any debug code. I will update my web site when I get a chance, but I have been working on the .Net version recently.

Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 5th Nov 2009 02:52
Do you mean the one posted on 2nd Oct 2009 ad 02:50? I can't find any post at 00:50.
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 5th Nov 2009 05:28
The time displayed is affected by timezones. He must live 2 hours from us. That's the one I used Agent.
Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 8th Nov 2009 13:58
Ok, that's the one I'm currently compiling with, and I am still having the same trouble. Any other ideas, Cloggy or anyone else?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Nov 2009 13:08
Quote: "Any other ideas, Cloggy or anyone else?"


Sorry to jump in at such a late stage. Out of curiousity I thought I'd try to find out what this dll does and stumbled across Agent's posts.

I can confirm that I get exactly the same, virtually invisible, text as Agent has reported - with all the recent DLLs I could find.

I get similar results if I change the screen resolution.

System specs:

Display 1680x1050x32 (or 16 - makes no difference)
Vista Home Premium 64 bit
Intel Core 2 Duo CPU E8600 @ 3.33 GHz
NVIDIA GeForce GTX 285

No idea whether this helps.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 9th Nov 2009 13:40
Agent/Green Gandalf,

The only common ground you seem to share is an Nvidia Graphics card. I have an ATI X1950Pro.

I wonder if any other Nvidia users who run at 1680x1050 can try this?

I'm a bit stumped for ideas at the moment.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Nov 2009 14:04 Edited at: 9th Nov 2009 14:22
OK. I'll test it on my laptop (ATI) and report back.

Is it possible the DirectX files themselves are relevant?

Bugs like this are a pain in the neck.


Edit

Works fine on my laptop (Windows XP, ATI GFX).

Agent's code seems to contain lots of stuff that probably isn't relevant to the bug. Perhaps he could remove everything that isn't essential to show the bug? That might help narrow down the problem.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 9th Nov 2009 15:49 Edited at: 9th Nov 2009 20:02
Green Gandalf,

This code shows the problem in fewer lines



Seems like Nvidia may be the culprit.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Nov 2009 17:35 Edited at: 9th Nov 2009 17:48
Interesting. The problem seems to go away if you use a power of two bitmap (if I've understood correctly ) :



Edit

Some experimenting suggests that making the height of the bitmap larger gradually eventually removes the problem. For example (I've simplified the example even more - get image is irrelevant):



shows no obvious problem, but replace the 600 with 120 does.

2nd Edit

And thanks for introducing me to another useful plug-in - by a rather devious route.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 9th Nov 2009 20:07
That's very interesting. Hopefully Agent will get the same results of you. It still sounds like the Nvidia card/driver causing the problem.

I'll see if I can find out any more.

Glad you like the plugin. Hope you find lots of uses for it.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Nov 2009 21:43
Quote: " It still sounds like the Nvidia card/driver causing the problem. "


While that may be the case it might not be the only explanation. For example, I recently tested a shader demo of mine on a high spec machine at work - everything worked fine except that the background was white rather than black (or the other way round, I forget). Further investigation revealed that I had relied on a variable defaulting to black - which it did on my nVidia machine but not on the ATI one at work. So, yes, it could be a GFX card issue - but, equally, it could be a sign that your code relies on certain default behaviour which isn't always guaranteed across machines (unless it's in the language spec). Once I included suitable initialising code in my shader the problem disappeared.

Just a thought.

Is there some sort of "behind the scenes" default assumption about image/bitmap scaling being made somewhere?
Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 10th Nov 2009 14:50
When I compile Gandalf's code exactly as it is, I get this output:



I'm not sure if this is what we expect to see, but that's what I get.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Nov 2009 19:12 Edited at: 10th Nov 2009 19:21
Quote: "When I compile Gandalf's code exactly as it is, I get this output:"


Which version? I put two versions in the same post.

I've attached the two images I get from those two snippets - whether that's what you're supposed to get I couldn't say. Cloggy will know.

Attachments

Login to view attachments
Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 11th Nov 2009 07:51 Edited at: 11th Nov 2009 07:53
I compiled the 512x512 version that you thought might fix the problem and got the output I posted above. It's already known that adjusting the size of the bitmap/viewport closer to the size of the fullscreen reduces the impact of the problem until you hit no bug at all at fullscreen.

Just by looking at the code, I can't tell if the output I'm experiencing is correct or not. Do you get similar output when you compile the first snippet you posted?

[EDIT]: Oops, missed your attachment. It looks like our results are inconsistant; on each of your screenshots the second line of text output is slightly smaller than the first and third, but when I compile the code I get much smaller text on the second line. Maybe Cloggy can shed some light.
Cloggy
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 11th Nov 2009 09:09
Agent,

Can't think of anything offhand. I'm at work at the moment, but I'll try to check later.

Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 15th Nov 2009 16:35
Hello again Cloggy,

Any ideas? Any tests I can run on my end to help you diagnose?
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 17th Nov 2009 05:32
Quote: "Hey Cloggy, I have a request for you if you don't mind

d3d_gettextwidth(FontID, " ") always returns 0. How can you find out how much room a space will take?

Edit: d3d_gettextwidth(FontID, "A A") - d3d_gettextwidth(FontID, "AA") does what I want, I'll just use that. "


It appears as though I was wrong. In some cases, d3d_gettextwidth(FontID, "A A") - d3d_gettextwidth(FontID, "AA") does not actually return the true width of a space... I am trying to create a RichTextBox GUI control and need to place my cursor at the right spot.

The first way I tried this was using:

x = d3d_gettextwidth(fontid,fast left$(txt$,CursorPos))

Problem was that if the text began or ended in a space the value would be wrong as your getwidth command cuts them off. So then I made an array to hold the exact width of each character and wrote my own function to total up a string of text, and it is much faster. However, to get the width of a space I use d3d_gettextwidth(FontID, "A A") - d3d_gettextwidth(FontID, "AA") and it is not working properly.

Any suggestions?
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th Nov 2009 20:27
@GIDustin
The position of any character depends which character is before it

The best approximation I found is d3d_gettextwidth(FontID, "| |") - d3d_gettextwidth(FontID, "||").

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 19th Nov 2009 05:04
Quote: "The position of any character depends which character is before it"


Why!? That is soo stupid, and hard to code around!

Quote: "The best approximation I found is d3d_gettextwidth(FontID, "| |") - d3d_gettextwidth(FontID, "||")."


Tested that and found your statement to be quite accurate. Much more accurate than using "A"s. Thanks!
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Nov 2009 20:55 Edited at: 20th Nov 2009 20:57
@GIDustin
It's not stupid. Letters would look stupid if kerning (which is what this is called) were disabled:

BRAVE would look like BRA VE

Because the A and V slant the same way, you have to bring them closer together to look normal. However if you made A smaller, then AA would overlap, so you have to use kerning to only bring them together when it is AV.

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 21st Nov 2009 00:15
Is there a way to access the Kerning values of a font?
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Nov 2009 11:38
Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 23rd Nov 2009 05:03
Hi Cloggy,

Has anything come up recently which might help us diagnose the problem?
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 3rd Dec 2009 21:01 Edited at: 3rd Dec 2009 21:01
d3d_init doesn't seem to be working for me anymore It just crashes when I use it, and if I don't, nothing shows up. The only way to fix it is not to change the display mode. I have the latest 7.5 update.

Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 13th Dec 2009 20:14
Cloggy?
Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 5th Jan 2010 00:36
Hello again,

Just wondering whether any progress has been made on the latest experienced issues. Any thoughts?
Oneka
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 11th Feb 2010 04:23
Hey cloggy, any chance that you could add in support for using Unicode? (UTF-8) that would be so awesome if you could, I hate being limited to just ASCII when inputting text and would make it a true addition for GDK usesrs


Making dreams possible, one line at a time...
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 26th Mar 2010 04:43 Edited at: 26th Mar 2010 05:48
Cloggy:

Had to reformat my computer recently to rid it of some bugs I was having. Upon reinstalling DPBro I used the DLL at the beginning of this thread, 3.7 U7.0. After compiling a project which has been working for a very long time, the new project seemed to fail drawing d3d_box's, almost at random. I then downloaded the very last dll you have posted in the thread so far, and the box problem goes away, but now my text is all messed up.



The left side shows the newest DLL, with the text size being messed up and the background d3d_box command working. The right side is the 3.7 U7.0 dll which shows the text perfectly, but the background d3d_box command doesn't seem to be.

I am going to update my video drivers shortly but until then, any suggestions?

Edit: Updated Graphics drivers did nothing.
Edit2: Digging through my archives, I found that 3.7.1.0 works perfectly. 3.7.1.1 however, does not. I will use 3.7.1.0 for now but whatever you did between those versions did not work for me.

Attachments

Login to view attachments
PEH
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: usa
Posted: 8th Apr 2010 23:30 Edited at: 8th Apr 2010 23:38
It seems that your 2d functions do not like the new "multimonitor mode"
When you run this code with the 2d command commented out it works fine but when you un-comment it the 2d only goes halfway across the screen


NOTE: You do not need a second monitor to try this code. I set it up to show the problem without it

Edit: the dbp "circle" command also will not go across the screen but it does not stop the text from going across the screen.
Steele
20
Years of Service
User Offline
Joined: 25th Oct 2003
Location: Somewhere over the rainbow
Posted: 11th Apr 2010 19:42
Hi Cloggy,

I think there is a bug with the D3D_Rounded_Box function. If one uses five parameters (ie.: left, top, right, bottom, radius) the compiler states that there is a missing parameter. If I put the sixth one in for color it ends up with a filled rounded box that's always white.

Has anyone else had this problem? Maybe I'm having some kind of conflicting issue on my end. I've just not been able to get this one function of all the others I've used.

By the way, Cloggy, I love this .dll. The antialiased text is wonderful!!!

Steele

Maybe it's just a bunch of stuff that happens. -- Homer Simpson
Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 24th Apr 2010 23:07 Edited at: 24th Apr 2010 23:16
Hi, when I try to use the D3DFunc header file (and the lib to go with it) in my GDK project i get:

"LINK : fatal error LNK1104: cannot open file 'libcp.lib'".

If someone has a solution to this I'd be greatful. I've made sure the folders were added to the directories settings, it just doesn't seem to want to compile as soon as I include "D3DFunc.h".

EDIT:
Nevermind, fixed it. A quick visit to google helped alot. It turns out libcp.lib is a depreciated library (starting from VS2005). I solved the problem by adding it to the ignored library list so hopefully it doesn't cause any other problems along the way.

JoeOh
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 9th May 2010 18:58
Yo Cloggy, DBPro's "pick object" function will seem to only correctly pick an object's location if the camera is set to normal perspective and not orthogonal. Maybe a new "D3D_PICK_ORTHO_OBJECT" function will do the trick?

Let me know whats up.

Home is where my souped-up computer is...
Oneka
19
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 9th May 2010 22:58
I dont think Cloggy is coming back you guys!


Making dreams possible, one line at a time...
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 11th May 2010 02:31
Quote: "I dont think Cloggy is coming back you guys!"


He comes in and out. Usually it takes a few months, then he comes back and catches up on everyone's questions. Must be a busy guy...

Agent
19
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 14th Jun 2010 03:44
I've been waiting more than seven months now for him to address my question I'm still hoping he'll get back to us eventually, but one of my projects has fallen completely off the rails due to the bug I've found, and simply cannot proceed until he gets to us. I hope he finds his way back here soon!
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 17th Jun 2010 08:16 Edited at: 19th Jun 2010 01:19
Quote: "I've been waiting more than seven months now for him to address my question"


I was curious, and only bad things happen when I am curious. I went to Cloggy's website and downloaded his source code for his latest release. I know nothing about c++ but I thought I would peruse it anyway. I came across this:



Now again, I don't know C++, but I see something in there about viewports. It sets the viewport to 0,0 to dbWindowWidth,dbWindowHeight. That works great if you are printing to the entire screen, but Agent's problem is printing to bitmaps that aren't. Perhaps d3d_starttext should have optional "x,y,w,h" parameters to specify the size of the viewport... I could be pulling this out of my ___ too.

If the weather is nice tomorrow (fat chance, forecast is rain for the next 2 weeks) I plan to paint the house, otherwise I am reinstalling my Visual Studio and seeing what I can accomplish.

Edit: On second thought, maybe we just need a d3d_setviewport x,y,w,h command, and a d3d_resetviewport. Then the viewport created by that can be used by all the d3d commands. This would help alot... I am gonna have a crack at it unless someone with more C++ knowledge would like to try first.

Edit2: Opened the project, made all the changes I thought were necessary, but when I try to build it I get errors saying I am missing some d3d header files...

Edit3: VC++ is not my strong point. I am officially giving up, although I still think a SetViewport command would be awesome.

Edit4: I am nothing if not persistant. I managed to add my own commands to the d3d_func dll (thanks to some serious googling). Below is some source code and the resulting image.





However, after doing so I am starting to think that this won't fix your text size problems. It will fix my problem with making a scrollable text box and not having the top and bottom lines overflow out of the box...

Edit5: Reworked my viewport commands so they affect standard DBPro commands as well, such as paste image.

Attachments

Login to view attachments
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 19th Jun 2010 02:27 Edited at: 19th Jun 2010 02:29
Posting again instead of editing so that you all get e-mail spammed. MUAHAHAHAHHAHA

Agent: The work I just did on the DLL (without knowing any c++ btw) allows you to specify the size of the viewport. I can e-mail you the dll and you can see if anything fixes your problem. If interested, send a message to gidustin2-spamcatcher (at) yahoo.com. I do not want to post the DLL here in case people mistake it for an official release. Not sure what I did, but his 500kb DLL is now 138kb on my machine so I might have broke something....

- GIDustin

GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 28th Jun 2010 03:16 Edited at: 28th Jun 2010 03:25
Quote: "It seems that your 2d functions do not like the new "multimonitor mode""


If you look at the source code for Cloggy's DLL, it sets the viewport (the drawable area) to the dbpro window height/width, not necessarily the drawing target's height and width. It doesn't reset the viewport after the drawing command, which is why it affects all drawing commands afterwards as well. I added a new viewport command to Cloggy's DLL. It is an unofficial release, but I have altered your code to get it to work:



Quote: "I think there is a bug with the D3D_Rounded_Box function. If one uses five parameters (ie.: left, top, right, bottom, radius) the compiler states that there is a missing parameter. If I put the sixth one in for color it ends up with a filled rounded box that's always white."


D3D_Rounded_Box has 6 parameters, with color (the seventh) being optional. You may have caught this already being 2 months have passed since you asked...



Attached is the version of d3d_func that I am using. I call it 3.7.1.2. The commands added are listed below. They will work on all d3d_func drawing commands (except 3d ones) as well as most of DBPro's built in commands, such as paste image, etc.



Also, sorry for the triple post but several days have passed between each of them and no one else is talking so....

Anyone wanting other changes just let me know and I will see what I can do.

Attachments

Login to view attachments
PEH
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: usa
Posted: 28th Jun 2010 08:18
Nice work! I will have to check it out soon. Thanks loads for taking a look at this I didn't think that it would get addressed.
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 9th Jul 2010 00:37
I've also just run into JoeOh's problem - Pick Object doesn't work with Orthogonal view.
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 9th Jul 2010 01:04
Quote: "I've also just run into JoeOh's problem - Pick Object doesn't work with Orthogonal view. "


I would need to see the code for "pick object" to see if there is any easy way to add a new command for Ortho view. Unfortunately I cannot find the CPP file over at the Google Code site... If IanM is watching, maybe he can help

Login to post a reply

Server time is: 2024-04-24 01:36:57
Your offset time is: 2024-04-24 01:36:57