Solved

Direct3D

Posted on 2011-09-14
4
489 Views
Last Modified: 2013-12-21
OK so pretty much I'm lost with some D3D issues.  I've gotten everything except being able to draw a background.  This is for a GUI and whenever I draw a box for the background it draws all over everything else.  Any suggestions?
0
Comment
Question by:dxanon
  • 2
4 Comments
 
LVL 13

Expert Comment

by:themrrobert
ID: 36538134
draw the background first, you must draw the objects in order
0
 

Author Comment

by:dxanon
ID: 36538196
I see that...to give you a bit of background I'm a programmer for a rather large company and we produce NVR software.  I wish I could post the code here but it would be against our policy.  It's a pretty complex application -- I'm familiar with everything except DirectX -- and it's just killing me.  Where would you at least put the function for drawing a background?
0
 
LVL 13

Accepted Solution

by:
themrrobert earned 500 total points
ID: 36538239
I assume that you have a function/object called updateScreen() or similar somewhere near the top of your main loop.

I haven't working with directX since version 8 so i'm a bit rusty, but you should draw the objects in the z order in which they should appear.

Inside the updateScreen() function should be ALL of the dx drawing  commands. You can use variables to logically choose which objects to draw, but they should all be encapsulated this way to ensure you aren't drawing over yourself.

Hopefully this can help you, we both knows its hard without the original code
0
 
LVL 12

Expert Comment

by:satsumo
ID: 37060339
This question is quite old, are you still looking for an answer?  I could probably help.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question