Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualnicolausYes

Posted 14 November 2012 - 04:59 AM

Erik Rufelt, I've just tried on Microsoft's sample, still doesn't work( Vsync is working, but I can steel see image tearing.

[source lang="cpp"]#pragma comment( lib, "ddraw.lib " )#pragma comment( lib, "dxguid.lib" )#include <ddraw.h>// ...HRESULT InitDevice(){ // ... // Create DirectDraw device hr = DirectDrawCreateEx( NULL, (LPVOID*) &amp;amp;amp;g_pDevice7, IID_IDirectDraw7, NULL ); hr = g_pDevice7->SetCooperativeLevel( g_hWnd, DDSCL_NORMAL ); // ...}//...void Render(){ // ... // Do vsync g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKEND, NULL); g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL); g_pSwapChain->Present( 0, 0 );}[/source]

I want also to notice, that I'm creating a window with flag WS_POPUP in order to hide title bar (it has to be hidden). Image tearing appears in different places. It's always in the top of a screen, but it can be on 20 px, and can be on 50 px. So, while creating window with title bar, image tearing sometimes can be simply not visible with the top part of image. And when I' m creating window without title bar, I can always see image tearing.
[source lang="cpp"]g_hWnd = CreateWindow( L"TutorialWindowClass", L"Direct3D 10 Tutorial 7", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL );[/source]

#3nicolausYes

Posted 14 November 2012 - 04:58 AM

Erik Rufelt, I've just tried on Microsoft's sample, this way don't seem work( Vsync is working, but I can steel see image tearing.

[source lang="cpp"]#pragma comment( lib, "ddraw.lib " )#pragma comment( lib, "dxguid.lib" )#include <ddraw.h>// ...HRESULT InitDevice(){ // ... // Create DirectDraw device hr = DirectDrawCreateEx( NULL, (LPVOID*) &amp;amp;g_pDevice7, IID_IDirectDraw7, NULL ); hr = g_pDevice7->SetCooperativeLevel( g_hWnd, DDSCL_NORMAL ); // ...}//...void Render(){ // ... // Do vsync g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKEND, NULL); g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL); g_pSwapChain->Present( 0, 0 );}[/source]

I want also to notice, that I'm creating a window with flag WS_POPUP in order to hide title bar (it has to be hidden). Image tearing appears in different places. It's always in the top of a screen, but it can be on 20 px, and can be on 50 px. So, while creating window with title bar, image tearing sometimes can be simply not visible with the top part of image. And when I' m creating window without title bar, I can always see image tearing.
[source lang="cpp"]g_hWnd = CreateWindow( L"TutorialWindowClass", L"Direct3D 10 Tutorial 7", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL );[/source]

#2nicolausYes

Posted 14 November 2012 - 04:50 AM

Erik Rufelt, I've just tried on Microsoft's sample, this way don't seem work( Vsync is working, but I can steel see image tearing.

[source lang="cpp"]#pragma comment( lib, "ddraw.lib " )#pragma comment( lib, "dxguid.lib" )#include <ddraw.h>// ...HRESULT InitDevice(){ // ... // Create DirectDraw device hr = DirectDrawCreateEx( NULL, (LPVOID*) &amp;g_pDevice7, IID_IDirectDraw7, NULL ); hr = g_pDevice7->SetCooperativeLevel( g_hWnd, DDSCL_NORMAL ); // ...}//...void Render(){ // ... // Do vsync g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKEND, NULL); g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL); g_pSwapChain->Present( 0, 0 );}[/source]

I want also to notice, that I'm creating a window with flag WS_POPUP in order to hide title bar (it has to be hidden). So, if I create window with title bar, image tearing simply not visible with the top part of image. And when I' m creating window without title bar, I can steel see image tearing.
[source lang="cpp"]g_hWnd = CreateWindow( L"TutorialWindowClass", L"Direct3D 10 Tutorial 7", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL );[/source]

#1nicolausYes

Posted 14 November 2012 - 04:48 AM

Erik Rufelt, I've just tried on Microsoft's sample, this way don't seem work( Vsync is working, but I can steel see image tearing.

[source lang="cpp"]#pragma comment( lib, "ddraw.lib " )#pragma comment( lib, "dxguid.lib" )#include <ddraw.h>// ...HRESULT InitDevice(){ // ... // Create DirectDraw device hr = DirectDrawCreateEx( NULL, (LPVOID*) &g_pDevice7, IID_IDirectDraw7, NULL ); hr = g_pDevice7->SetCooperativeLevel( g_hWnd, DDSCL_NORMAL ); // ...}//...void Render(){ // ... // Do vsync g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKEND, NULL); g_pDevice7->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL); g_pSwapChain->Present( 0, 0 );}[/source]

I want also to notice, that I'm creating a window with flag WS_POPUP in order to hide title bar (it's needed). So, if I create window with title bar, image tearing simply not visible with the top part of image. And when I' m creating window without title bar, I can steel see image tearing.
[source lang="cpp"]g_hWnd = CreateWindow( L"TutorialWindowClass", L"Direct3D 10 Tutorial 7", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL );[/source]

PARTNERS