Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Watermark issue  (Read 1014 times)
Mithrandir
Community Member
*
Posts: 325


« on: August 02, 2009, 11:23:44 AM »

Hi,
I have been playing D3DDevice9.setViewport() to restrict some 2D drawing and found something which could be classified as bug.

You can use setViewport to restrict rendering inside your main loop. The funny thing is that if you set the viewport to area that does not cover TV3D logo just before calling RenderToScreen() the logo will disappear.

Code:
// Get full screen viewport
myDevice->GetViewport(pView);
// Set small clipped area
pClip->Width = 1;
pClip->Height = 1;
pClip->X = 0;
pClip->Y = 0;
pTV->Clear(false);
  myDevice->SetViewport(pView);
  pScene->RenderAll(true);
  myDevice->SetViewport(pClip);
pTV->RenderToScreen();

It is quite efficient hack because you can render your scene and then disable watermark using the code above.

Anyway this is not a tip how to get TV without watermark.

I believe it could be fixed by adding one setViewport call to reset viewport to the whole screen before rendering the watermark.


Logged
sybixsus
Customers
Community Member
*****
Posts: 1339


WWW
« Reply #1 on: August 02, 2009, 01:00:45 PM »

Uh no, I don't want TV3D messing with my viewport settings. That would break my code. I agree that the currently setup is unacceptable insomuch as the watermark can be worked around, but the answer to that, surely, would be for TV3D to get the viewport settings and adjust drawing accordingly, not to set the viewport?
« Last Edit: August 02, 2009, 01:09:14 PM by sybixsus » Logged
jviper
Community Member
*
Posts: 2130

Discipline in training


« Reply #2 on: August 05, 2009, 08:56:54 PM »

Sounds simple enough to fix. I'd say simply have it calculate where the bottom of the control is instead of the bottom of the viewport. This way one can't try and hide the watermark in a part of a viewport that is too big for the control.
Logged

JAbstract.....Don't just imagine, make it happen!
ZaPPZion
Moderator
Community Member
*****
Posts: 555


« Reply #3 on: August 06, 2009, 11:19:50 AM »

And this way you render more than necessary i think
Logged

Check out my website: www.bartkuipers.com
SylvainTV
Administrator
Community Member
*****
Posts: 4946


WWW
« Reply #4 on: August 12, 2009, 06:55:17 AM »

Indeed, we will take care of that problem. Thanks for reporting it !
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks