Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
vite
Commits
6ee900b3
Commit
6ee900b3
authored
11 years ago
by
Thibault Soucarre
Browse files
Options
Downloads
Patches
Plain Diff
Whitespaces
parent
ff984ca8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/render/vbo.cpp
+13
-13
13 additions, 13 deletions
src/render/vbo.cpp
src/render/vbo.hpp
+7
-7
7 additions, 7 deletions
src/render/vbo.hpp
with
20 additions
and
20 deletions
src/render/vbo.cpp
+
13
−
13
View file @
6ee900b3
...
...
@@ -6,13 +6,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
...
...
@@ -23,7 +23,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
...
...
@@ -37,7 +37,7 @@
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
*/
/*!
...
...
@@ -94,7 +94,7 @@ Vbo::Vbo(int nb_object, Type object_type){
_nb_verteces_per_object
=
2
;
_object_type
=
GL_LINES
;
}
/* There is _nb_object*(number_of_vertices_per_object) elements. */
_size
=
_nb_coordinates_per_vertex
*
_nb_verteces_per_object
*
_nb_object
;
...
...
@@ -106,9 +106,9 @@ Vbo::Vbo(int nb_object, Type object_type){
glGenBuffers
(
1
,
&
_id
);
/* create the buffer an put its value to _id */
glBindBuffer
(
GL_ARRAY_BUFFER
,
_id
);
/* select our vbo */
glBufferData
(
GL_ARRAY_BUFFER
,
_size
*
sizeof
(
Data_type
),
NULL
,
GL_STREAM_DRAW
);
/* allocate memory space inside graphic card */
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
/* deselect our vbo */
}
...
...
@@ -144,15 +144,15 @@ int Vbo::add(const unsigned int data_size, const Data_type* const data){
*/
if
(
(
_cur
+
data_size
)
<=
_size
){
glBufferSubData
(
GL_ARRAY_BUFFER
,
_cur
*
sizeof
(
Data_type
),
data_size
*
sizeof
(
Data_type
),
data
);
_cur
+=
data_size
;
}
else
{
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
/* deselect our vbo */
return
Vbo
::
VBO_OUT_OF_MEMORY
;
}
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
/* deselect our vbo */
...
...
@@ -192,7 +192,7 @@ void Vbo::display() const{
glVertexPointer
(
_nb_coordinates_per_vertex
,
GL_DOUBLE
,
0
,
VBO_BUFFER_OFFSET
(
0
));
/* give to OpenGL the VBO address */
glEnableClientState
(
_client_state
);
/* glDrawArrays(A, B, C)
*
...
...
@@ -203,9 +203,9 @@ void Vbo::display() const{
* Please take care that a vertex is represented by _nb_coordinates_per_vertex cases of the _cur array.
*/
glDrawArrays
(
_object_type
,
0
,
_cur
/
_nb_coordinates_per_vertex
);
/* RENDERING */
glDisableClientState
(
_client_state
);
glBindBuffer
(
GL_ARRAY_BUFFER
,
0
);
/* deselect our vbo */
}
...
...
This diff is collapsed.
Click to expand it.
src/render/vbo.hpp
+
7
−
7
View file @
6ee900b3
...
...
@@ -6,13 +6,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
...
...
@@ -23,7 +23,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
...
...
@@ -37,7 +37,7 @@
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
*/
/*!
...
...
@@ -95,7 +95,7 @@ protected:
*
* Values can be : GL_VERTEX_ARRAY or GL_COLOR_ARRAY for example.
*/
GLenum
_client_state
;
GLenum
_client_state
;
/*!
...
...
@@ -272,7 +272,7 @@ public:
// /*!
// * \brief VBO uses for triangle arrows.
// * \brief VBO uses for triangle arrows.
// */
// struct Vbo_arrow_triangle : public Vbo{
...
...
@@ -294,7 +294,7 @@ public:
// /*!
// * \brief VBO uses for line arrows.
// * \brief VBO uses for line arrows.
// */
// struct Vbo_arrow_line : public Vbo{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment