Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
a256f626
Commit
a256f626
authored
Jan 30, 2013
by
Robert Menzel
Browse files
Merge branch 'experimental' of
file:///data/git-repository/acgl/libraries/acgl
into experimental
parents
67c4cd79
074f7e39
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Controller/ArrayBufferControl.hh
View file @
a256f626
...
...
@@ -30,6 +30,7 @@ public:
GLenum
type
;
GLint
dimension
;
GLboolean
normalized
;
GLboolean
isInteger
;
};
// ===================================================================================================== \/
...
...
@@ -65,7 +66,14 @@ public:
inline
ArrayBufferControl
&
attribute
(
const
std
::
string
&
_name
,
GLenum
_type
,
GLint
_dimension
,
GLboolean
_normalized
=
GL_FALSE
)
{
AttributeDefine
a
=
{
_name
,
_type
,
_dimension
,
_normalized
};
AttributeDefine
a
=
{
_name
,
_type
,
_dimension
,
_normalized
,
GL_FALSE
};
mAttributeDefines
.
push_back
(
a
);
return
*
this
;
}
inline
ArrayBufferControl
&
integerAttribute
(
const
std
::
string
&
_name
,
GLenum
_type
,
GLint
_dimension
)
{
AttributeDefine
a
=
{
_name
,
_type
,
_dimension
,
GL_FALSE
,
GL_TRUE
};
mAttributeDefines
.
push_back
(
a
);
return
*
this
;
}
...
...
src/ACGL/OpenGL/Controller/ArrayBufferControl.cc
View file @
a256f626
...
...
@@ -16,10 +16,20 @@ SharedArrayBuffer ArrayBufferControl::create(void)
for
(
AttributeDefineVec
::
size_type
i
=
0
;
i
<
mAttributeDefines
.
size
();
i
++
)
{
arrayBuffer
->
defineAttribute
(
mAttributeDefines
[
i
].
name
,
mAttributeDefines
[
i
].
type
,
mAttributeDefines
[
i
].
dimension
,
mAttributeDefines
[
i
].
normalized
);
if
(
mAttributeDefines
[
i
].
isInteger
)
{
arrayBuffer
->
defineIntegerAttribute
(
mAttributeDefines
[
i
].
name
,
mAttributeDefines
[
i
].
type
,
mAttributeDefines
[
i
].
dimension
);
}
else
{
arrayBuffer
->
defineAttribute
(
mAttributeDefines
[
i
].
name
,
mAttributeDefines
[
i
].
type
,
mAttributeDefines
[
i
].
dimension
,
mAttributeDefines
[
i
].
normalized
);
}
}
if
(
mpData
!=
NULL
)
{
...
...
@@ -28,5 +38,3 @@ SharedArrayBuffer ArrayBufferControl::create(void)
}
return
arrayBuffer
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment