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
OP_GlobalParam.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: OP_GlobalParam.h ( OP Library, C++)
7
*
8
* COMMENTS: This file contains accessors for global parameters. These
9
* parameters make use of the stamp/param mechanism and allow for
10
* proper propagation of changes.
11
*/
12
13
#ifndef __OP_GlobalParam__
14
#define __OP_GlobalParam__
15
16
#include "
OP_API.h
"
17
#include <
SYS/SYS_Types.h
>
18
#include <
UT/UT_Thread.h
>
19
20
enum
{
21
OP_GLOBAL_PARAM_INSTANCEPOINT
22
};
23
24
class
OP_API
OP_GlobalParam
{
25
public
:
26
static
fpreal
getInstancePoint(
int
thread
,
27
bool
add_dependencies=
true
);
28
static
void
setInstancePoint(
int
ptnum);
29
};
30
31
class
OP_API
OP_GlobalParamPusher
{
32
public
:
33
explicit
OP_GlobalParamPusher
(
int
param
)
34
: myParam(param)
35
{
36
switch
(param)
37
{
38
case
OP_GLOBAL_PARAM_INSTANCEPOINT
:
39
myIValue = (
int
)
OP_GlobalParam::getInstancePoint
(
SYSgetSTID
(),
40
false
);
41
break
;
42
}
43
myChanged =
false
;
44
}
45
~OP_GlobalParamPusher
()
46
{
47
if
(myChanged)
48
{
49
switch
(myParam)
50
{
51
case
OP_GLOBAL_PARAM_INSTANCEPOINT
:
52
OP_GlobalParam::setInstancePoint
(myIValue);
53
break
;
54
}
55
}
56
}
57
void
setIValue
(
int
val
)
58
{
59
switch
(myParam)
60
{
61
case
OP_GLOBAL_PARAM_INSTANCEPOINT
:
62
if
(val != myIValue || myChanged)
63
{
64
OP_GlobalParam::setInstancePoint
(val);
65
myChanged =
true
;
66
}
67
break
;
68
}
69
}
70
int
getIValue
()
const
{
return
myIValue; }
71
private
:
72
int
myParam;
73
int
myIValue;
74
bool
myChanged;
75
};
76
77
#endif
int
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
OP_GLOBAL_PARAM_INSTANCEPOINT
Definition:
OP_GlobalParam.h:21
OP_GlobalParam::setInstancePoint
static void setInstancePoint(int ptnum)
OP_GlobalParam::getInstancePoint
static fpreal getInstancePoint(int thread, bool add_dependencies=true)
OP_GlobalParamPusher::getIValue
int getIValue() const
Definition:
OP_GlobalParam.h:70
OP_API.h
OP_GlobalParamPusher
Definition:
OP_GlobalParam.h:31
SYS_Types.h
OP_GlobalParamPusher::OP_GlobalParamPusher
OP_GlobalParamPusher(int param)
Definition:
OP_GlobalParam.h:33
thread
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
OP_GlobalParamPusher::setIValue
void setIValue(int val)
Definition:
OP_GlobalParam.h:57
param
GLenum GLfloat param
Definition:
glcorearb.h:104
SYSgetSTID
SYS_API int SYSgetSTID()
Definition:
SYS_SequentialThreadIndex.h:54
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
OP_API
#define OP_API
Definition:
OP_API.h:10
val
GLuint GLfloat * val
Definition:
glcorearb.h:1608
OP_GlobalParam
Definition:
OP_GlobalParam.h:24
OP_GlobalParamPusher::~OP_GlobalParamPusher
~OP_GlobalParamPusher()
Definition:
OP_GlobalParam.h:45
UT_Thread.h
OP
OP_GlobalParam.h
Generated on Tue Dec 17 2024 03:40:04 for HDK by
1.8.6