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
2b58beab
Commit
2b58beab
authored
Mar 19, 2012
by
Janis Born
Browse files
add usage parameter for ElementArrayBufferControl
parent
cd888c1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Controller/ElementArrayBufferControl.hh
View file @
2b58beab
...
...
@@ -22,7 +22,8 @@ class ElementArrayBufferControl : public Resource::BasicCreateController<Element
// ========================================================================================================= \/
public:
ElementArrayBufferControl
(
void
)
:
mType
(
GL_UNSIGNED_INT
),
:
mUsage
(
GL_STATIC_DRAW
),
mType
(
GL_UNSIGNED_INT
),
mElements
(
0
),
mpData
(
NULL
)
{}
...
...
@@ -32,7 +33,9 @@ public:
// ============================================================================================ METHODS \/
// ==================================================================================================== \/
public:
inline
ElementArrayBufferControl
&
type
(
GLenum
_type
)
{
mType
=
_type
;
return
*
this
;
}
inline
ElementArrayBufferControl
&
usage
(
GLenum
_usage
)
{
mUsage
=
_usage
;
return
*
this
;
}
inline
ElementArrayBufferControl
&
type
(
GLenum
_type
)
{
mType
=
_type
;
return
*
this
;
}
inline
ElementArrayBufferControl
&
data
(
const
GLvoid
*
_pData
,
GLsizei
_elements
)
{
...
...
@@ -52,7 +55,7 @@ public:
{
elementArrayBuffer
->
bind
();
elementArrayBuffer
->
setDataElements
(
mElements
,
mpData
);
elementArrayBuffer
->
setDataElements
(
mElements
,
mpData
,
mUsage
);
}
return
elementArrayBuffer
;
}
...
...
@@ -61,8 +64,9 @@ public:
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
protected:
GLenum
mType
;
GLsizei
mElements
;
GLenum
mUsage
;
GLenum
mType
;
GLsizei
mElements
;
const
GLvoid
*
mpData
;
};
...
...
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