Various work on osgViewer library, including warp point and graphics window resize support

This commit is contained in:
Robert Osfield
2007-01-01 18:20:10 +00:00
parent 88fc4ee986
commit 7155f7d1b0
36 changed files with 1624 additions and 1030 deletions

View File

@@ -50,13 +50,27 @@ Camera::Camera(const Camera& camera,const CopyOp& copyop):
_bufferAttachmentMap(camera._bufferAttachmentMap),
_postDrawCallback(camera._postDrawCallback)
{
// need to copy/share graphics context?
}
Camera::~Camera()
{
if (_graphicsContext.valid()) _graphicsContext->removeCamera(this);
}
void Camera::setGraphicsContext(GraphicsContext* context)
{
if (_graphicsContext == context) return;
if (_graphicsContext.valid()) _graphicsContext->removeCamera(this);
_graphicsContext = context;
if (_graphicsContext.valid()) _graphicsContext->addCamera(this);
}
bool Camera::isRenderToTextureCamera() const
{
return (!_bufferAttachmentMap.empty());