Skip to content

Commit

Permalink
Added class for OpenGLInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdp committed Jan 12, 2024
1 parent f343427 commit 4bd1be3
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Fwk/VizFwk/LibRender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ cvfOpenGL.h
cvfOpenGLCapabilities.h
cvfOpenGLContext.h
cvfOpenGLContextGroup.h
cvfOpenGLInfo.h
cvfOpenGLResourceManager.h
cvfOpenGLTypes.h
cvfOpenGLUtils.h
Expand Down Expand Up @@ -123,6 +124,7 @@ cvfOglRc.cpp
cvfOpenGLCapabilities.cpp
cvfOpenGLContext.cpp
cvfOpenGLContextGroup.cpp
cvfOpenGLInfo.cpp
cvfOpenGLResourceManager.cpp
cvfOpenGLUtils.cpp
cvfOpenGL.cpp
Expand Down
101 changes: 101 additions & 0 deletions Fwk/VizFwk/LibRender/cvfOpenGLInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2018 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################


#include "cvfBase.h"
#include "cvfOpenGLInfo.h"

namespace cvf {


//==================================================================================================
///
/// \class cvf::OpenGLInfo
/// \ingroup Render
///
///
///
//==================================================================================================

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
OpenGLInfo::OpenGLInfo()
{
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
OpenGLInfo::~OpenGLInfo()
{
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
String OpenGLInfo::version() const
{
return m_version;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
String OpenGLInfo::vendor() const
{
return m_vendor;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
String OpenGLInfo::renderer() const
{
return m_renderer;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void OpenGLInfo::setOpenGLStrings(String version, String vendor, String renderer)
{
m_version = version;
m_vendor = vendor;
m_renderer = renderer;
}

} // namespace cvf
68 changes: 68 additions & 0 deletions Fwk/VizFwk/LibRender/cvfOpenGLInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2018 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################


#pragma once

#include "cvfString.h"

namespace cvf {


//==================================================================================================
//
//
//
//==================================================================================================
class OpenGLInfo
{
public:
OpenGLInfo();
~OpenGLInfo();

String version() const;
String vendor() const;
String renderer() const;

void setOpenGLStrings(String version, String vendor, String renderer);

private:
String m_version;
String m_vendor;
String m_renderer;
};

}

0 comments on commit 4bd1be3

Please sign in to comment.