Currently, I'm working on updating my model editor for my custom format for my game. I have a feature, where you can select faces of a 3D model by clicking them, or dragging a rectangle over the ones you want. This is all accomplished by drawing the model twice a frame. Once with all faces drawn as different colors, and then drawn as what the user sees. This allows me to use the get color function under the mouse (or every pixel in the rectangle) to see what faces are selected. The problem with this, is that the bigger the rectangle is, the longer it takes, because it checks every pixel in it (sometimes taking up to one whole minute, or longer). A single mouse click, or small rectangle works pretty much instantly though. I want to know if there is a better way to accomplish this, mainly just for speed improvements. Programs like Anim8or do it instantly
|