HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SimpleWindow.h
Go to the documentation of this file.
1
//
2
// Copyright Contributors to the MaterialX Project
3
// SPDX-License-Identifier: Apache-2.0
4
//
5
6
#ifndef MATERIALX_SIMPLEWINDOW_H
7
#define MATERIALX_SIMPLEWINDOW_H
8
9
#include <
MaterialXCore/Library.h
>
10
11
#include <
MaterialXRenderHw/Export.h
>
12
#include <
MaterialXRenderHw/WindowWrapper.h
>
13
14
MATERIALX_NAMESPACE_BEGIN
15
16
/// SimpleWindow shared pointer
17
using
SimpleWindowPtr
= std::shared_ptr<class SimpleWindow>;
18
19
/// @class SimpleWindow
20
/// A platform-independent window class.
21
///
22
/// Plaform-specific resources are encapsulated by a WindowWrapper instance.
23
class
MX_RENDERHW_API
SimpleWindow
24
{
25
public
:
26
/// Static instance create function
27
static
SimpleWindowPtr
create
() {
return
SimpleWindowPtr
(
new
SimpleWindow
); }
28
29
/// Default destructor
30
virtual
~
SimpleWindow
();
31
32
/// Window initialization
33
bool
initialize
(
const
char
* title,
unsigned
int
width
,
unsigned
int
height
,
void
* applicationShell);
34
35
/// Return our platform-specific resource wrapper
36
WindowWrapperPtr
getWindowWrapper
()
37
{
38
return
_windowWrapper;
39
}
40
41
/// Return width of window
42
unsigned
int
width
()
const
43
{
44
return
_width;
45
}
46
47
/// Return height of window
48
unsigned
int
height
()
const
49
{
50
return
_height;
51
}
52
53
/// Check for validity
54
bool
isValid
()
const
55
{
56
return
_windowWrapper && _windowWrapper->isValid();
57
}
58
59
protected
:
60
// Default constructor
61
SimpleWindow
();
62
63
// Wrapper for platform specific window resources
64
WindowWrapperPtr
_windowWrapper
;
65
66
// Window dimensions
67
unsigned
int
_width
;
68
unsigned
int
_height
;
69
70
// Unique window identifier generated dynamically at creation time.
71
unsigned
int
_id
;
72
73
#if defined(_WIN32)
74
// Window class name for window generated at creation time.
75
char
_windowClassName[128];
76
#endif
77
};
78
79
MATERIALX_NAMESPACE_END
80
81
#endif
SimpleWindow::_width
unsigned int _width
Definition:
SimpleWindow.h:67
MATERIALX_NAMESPACE_BEGIN
#define MATERIALX_NAMESPACE_BEGIN
Definition:
Generated.h:25
Export.h
SimpleWindow::_windowWrapper
WindowWrapperPtr _windowWrapper
Definition:
SimpleWindow.h:64
height
GLint GLsizei GLsizei height
Definition:
glcorearb.h:103
WindowWrapperPtr
std::shared_ptr< class WindowWrapper > WindowWrapperPtr
WindowWrapper shared pointer.
Definition:
WindowWrapper.h:55
SimpleWindowPtr
std::shared_ptr< class SimpleWindow > SimpleWindowPtr
SimpleWindow shared pointer.
Definition:
GLContext.h:34
SimpleWindow::create
static SimpleWindowPtr create()
Static instance create function.
Definition:
SimpleWindow.h:27
SimpleWindow::width
unsigned int width() const
Return width of window.
Definition:
SimpleWindow.h:42
openvdb::OPENVDB_VERSION_NAME::initialize
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition:
logging.h:294
WindowWrapper.h
SimpleWindow::height
unsigned int height() const
Return height of window.
Definition:
SimpleWindow.h:48
SimpleWindow::isValid
bool isValid() const
Check for validity.
Definition:
SimpleWindow.h:54
width
GLint GLsizei width
Definition:
glcorearb.h:103
Library.h
SimpleWindow::_height
unsigned int _height
Definition:
SimpleWindow.h:68
MATERIALX_NAMESPACE_END
#define MATERIALX_NAMESPACE_END
Definition:
Generated.h:26
SimpleWindowPtr
std::shared_ptr< class SimpleWindow > SimpleWindowPtr
SimpleWindow shared pointer.
Definition:
SimpleWindow.h:17
SimpleWindow
Definition:
SimpleWindow.h:23
MX_RENDERHW_API
#define MX_RENDERHW_API
Definition:
Export.h:18
SimpleWindow::getWindowWrapper
WindowWrapperPtr getWindowWrapper()
Return our platform-specific resource wrapper.
Definition:
SimpleWindow.h:36
SimpleWindow::_id
unsigned int _id
Definition:
SimpleWindow.h:71
MaterialXRenderHw
SimpleWindow.h
Generated on Sat May 10 2025 02:47:26 for HDK by
1.8.6