Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
Unterteilungsalgorithmen
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
Unterteilungsalgorithmen
Commits
be6417c0
Commit
be6417c0
authored
Jun 27, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add padding to Vertex
parent
188a8f55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
mesh.cpp
QTProject/mesh.cpp
+2
-2
mesh.h
QTProject/mesh.h
+6
-0
No files found.
QTProject/mesh.cpp
View file @
be6417c0
...
...
@@ -370,8 +370,8 @@ void Mesh::renderMesh(QOpenGLShaderProgram *shader, int index)
// Draw Vertex Array
f
->
glBindBuffer
(
GL_ARRAY_BUFFER
,
entries
[
index
].
VB_handle
);
f
->
glVertexAttribPointer
(
positionIndex
,
3
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
Vertex
),
0
);
f
->
glVertexAttribPointer
(
normalIndex
,
3
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
Vertex
),
(
const
GLvoid
*
)
1
2
);
//12
f
->
glVertexAttribPointer
(
uvIndex
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
Vertex
),
(
const
GLvoid
*
)
24
);
// 12+12
f
->
glVertexAttribPointer
(
normalIndex
,
3
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
Vertex
),
(
const
GLvoid
*
)
1
6
);
//3*4+4
f
->
glVertexAttribPointer
(
uvIndex
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
Vertex
),
(
const
GLvoid
*
)
32
);
// 12+4+12+4
f
->
glBindBuffer
(
GL_ELEMENT_ARRAY_BUFFER
,
entries
[
index
].
IB_handle
);
...
...
QTProject/mesh.h
View file @
be6417c0
...
...
@@ -17,8 +17,14 @@
struct
Vertex
{
QVector3D
pos
;
float
padding0
;
QVector3D
normal
;
float
padding1
;
QVector2D
tex
;
QVector2D
padding2
;
Vertex
(){}
...
...
Write
Preview
Markdown
is supported
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