Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

110 Neutral

About XGT08

  • Rank
  1. Hello Buckeye,   Yes, that is entirely true. Your are right. The problem is caused by the fact that I am not using the entire portion of the backbuffer for rendering. It has nothing to do with stretching. I was hoping that nobody managed to read my last post :D. I was just about to edit it.   And again, you are right about handling thw window resize. Thanks a lot!   Cheers!
  2. Ok. I discovered what the problem was. I was using a windowed mode device and I was setting the backbuffer dimensions to the screen resolution for a window of 800 by 600. Because the viewport dimensions were being set to the same size and because the backbuffer is much bigger, it makes sense that the backbuffer wasn't being filled properly.   Steps to handle window resize properly: -set Backbuffer dimensions to 0 in the present params struct instance; -reset device   OR check out Buckeye's post below ;)   Cheers!
  3. Hello,   The code is made a little complicated by the fact that I use a device enumeration class which handles device caps enumeration, window creation etc.   But I can tell you that the size of the viewport is determined when I recieve a WM_SIZE message. So the size of the viewport is:        -Width: LOWORD(lParam)        -Height: HIWORD(lParam)   I checked if the D3DVIEWPORT9 struct instance contains the correct values and indeed it does. Anyway, I will dig a little bit more. I am sure there must be something which I am missing. When I find a solution I will post it here. Thanks!
  4. Hello,   It seems that no matter what I do, SetViewport in Direct3D9 doesn't work for me. For example, if I call SetViewport to map the viewport to the entire render area (Left:0, Top:0, Width: viewWidth, Height: viewHeight, MinZ: 0.0f, MaxZ: 1.0f), it will only render to approximately a quarter if the render area.   If I maximize the window, it will render the entire width, but a small gap remains at the bottom. If I resize it again to its original dimensions, it will render again in 1/4 area and the backbuffer is not cleared properly.   I would like to mention that I call SetViewport when the window is resized and, also, after the device has been reset. I tried calling SetViewport between BeginScene and EndScene, but with no success.   Has anybody had the same problem?
  5. XGT08


    Thanks guys!
  6. Hello,   I would like to know whether the DrawPrimitive (and its siblings) function from Direct3D9 returns control back to the caller before completing the draw operation. I always thought that the function is responsible for sending rendering commands to the driver and not perform the actual rendering itself. Is this correct?
  7. Thanks Dave.   That's cool, but if I call this function specifying an ordinal which identifies an adapter installed on my system but which is currently inactive (i.e. it is not currenlty rendering my dekstop), then what is the returned display mode?
  8. Hello,   Thanks for the answer :)   I read the documentation, but from what it says I understand that if the adapter ordinal that you supply is bigger than the GetAdapterCount() - 1, it returns D3DERR_INVALIDCALL..   I would gladly try it, but I am using a laptop. I don't know... Is it possible to have more than one adapter on your laptop? Anyway, I was just hoping somebody would know the answer to this :).   The reason I am asking this question is because I saw this function being called in this way in a device enumeration code module. After the enumeration process, the client code can call a function like FindBestFullscreenMode(DisplaySettings& settings, D3DDISPLAYMODE& matchMode, bool bRequireHAL, bool bRequireREF). This function attempts to find an adapter which matches the requested settings as closely as possible (i.e. has a matching display mode with matchMode, and uses a HAL or REF device, depending on the values of 'requireHAL' and 'requireREF').   Inside the function there is a loop which does somehting like this:   for(UINT adapterIndex = 0; adaperIndex < adapterCount; adapterIndex++) {      D3DDISPLAYMODE displayMode;      direct3D9->GetAdapterDisplayMode(adapters[adapterIndex]->Oridnal, &displayMode);        // The rest of the code... }   ... where 'adapterCount' is the current number of adapters installed on the system and 'adapters' is a std::vector which contains instances of a class which holds adapter information (like the adapter ordinal for example).
  9. Hello,   I am a little confused about how the 'IDirect3D9::GetAdapterDisplayMode' function works when we have multiple adapters on our system.   For example, calling this function and passing it an ordinal of 1 on a system with 2 adapters. If that adapter is not currently active, what will be the display mode returned by the function?   I applogize if the question is silly or weird. It's probably due to the fact that I always had one adapter on my system and I have no idea what are the implications of using multiple adapters .   Thanks a lot!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!