Skip to main content
gamedev.net
🔒 Locked 🎮 Unity

Viewports?

Started by Spy90 1 reply 800+ views
Original Post
Spy90
Spy90
I am trying to put a border around my viewport.. however doing so is proving to be a big tough. I basically have a class that controls it's own viewport, now that class can access it's size and x/y (via getviewport object) but using these as the coords for the boundary isn't correct because those are screen coords not viewport coords. I tried zeroing the VIEW transform matrix, but that didn't work. Anyone have any hints? thanks!
Demirug
Demirug
You can use pretransformed vertex positions. They are in screen coordinates like your viewport cords.
Spy90
Spy90
THANK YOU!!!!

and for those wondering how to tell directx you are giving it coords in pretransformed, SetFVF(D3DFVF_XYZRHW) worked for me!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.