Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
4de43d7c
Commit
4de43d7c
authored
Jun 18, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unnecessary functions from VBO_VERTEX.
parent
1fc0113b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
28 deletions
+12
-28
opengl_gal.cpp
common/gal/opengl/opengl_gal.cpp
+11
-11
opengl_gal.h
include/gal/opengl/opengl_gal.h
+1
-1
vbo_item.h
include/gal/opengl/vbo_item.h
+0
-16
No files found.
common/gal/opengl/opengl_gal.cpp
View file @
4de43d7c
...
@@ -1641,17 +1641,17 @@ void OPENGL_GAL::computeUnitCircle()
...
@@ -1641,17 +1641,17 @@ void OPENGL_GAL::computeUnitCircle()
// Insert in a display list and a vector
// Insert in a display list and a vector
for
(
int
i
=
0
;
i
<
CIRCLE_POINTS
;
i
++
)
for
(
int
i
=
0
;
i
<
CIRCLE_POINTS
;
i
++
)
{
{
VBO_VERTEX
v0
(
0.0
f
,
0.0
f
,
0.0
f
)
;
VBO_VERTEX
v0
=
{
0.0
f
,
0.0
f
,
0.0
f
}
;
VBO_VERTEX
v1
(
VBO_VERTEX
v1
=
{
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// x
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// x
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// y
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// y
0.0
f
// z
0.0
f
// z
)
;
}
;
VBO_VERTEX
v2
(
VBO_VERTEX
v2
=
{
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// x
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// x
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// y
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// y
0.0
f
// z
0.0
f
// z
)
;
}
;
glVertex2d
(
0
,
0
);
glVertex2d
(
0
,
0
);
verticesCircle
->
PushVertex
(
&
v0
);
verticesCircle
->
PushVertex
(
&
v0
);
...
@@ -1680,17 +1680,17 @@ void OPENGL_GAL::computeUnitSemiCircle()
...
@@ -1680,17 +1680,17 @@ void OPENGL_GAL::computeUnitSemiCircle()
for
(
int
i
=
0
;
i
<
CIRCLE_POINTS
/
2
;
++
i
)
for
(
int
i
=
0
;
i
<
CIRCLE_POINTS
/
2
;
++
i
)
{
{
VBO_VERTEX
v0
(
0.0
f
,
0.0
f
,
0.0
f
)
;
VBO_VERTEX
v0
=
{
0.0
f
,
0.0
f
,
0.0
f
}
;
VBO_VERTEX
v1
(
VBO_VERTEX
v1
=
{
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// x
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// x
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// y
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
i
),
// y
0.0
f
// z
0.0
f
// z
)
;
}
;
VBO_VERTEX
v2
(
VBO_VERTEX
v2
=
{
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// x
cos
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// x
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// y
sin
(
2.0
*
M_PI
/
CIRCLE_POINTS
*
(
i
+
1
)
),
// y
0.0
f
// z
0.0
f
// z
)
;
}
;
glVertex2d
(
0
,
0
);
glVertex2d
(
0
,
0
);
verticesSemiCircle
->
PushVertex
(
&
v0
);
verticesSemiCircle
->
PushVertex
(
&
v0
);
...
@@ -1749,7 +1749,7 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData )
...
@@ -1749,7 +1749,7 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData )
if
(
vboItem
)
if
(
vboItem
)
{
{
VBO_VERTEX
newVertex
(
vertex
[
0
],
vertex
[
1
],
vertex
[
2
]
)
;
VBO_VERTEX
newVertex
=
{
vertex
[
0
],
vertex
[
1
],
vertex
[
2
]
}
;
vboItem
->
PushVertex
(
&
newVertex
);
vboItem
->
PushVertex
(
&
newVertex
);
}
}
else
else
...
...
include/gal/opengl/opengl_gal.h
View file @
4de43d7c
...
@@ -557,7 +557,7 @@ private:
...
@@ -557,7 +557,7 @@ private:
if
(
isGrouping
)
if
(
isGrouping
)
{
{
// New vertex coordinates for VBO
// New vertex coordinates for VBO
VBO_VERTEX
vertex
(
aX
,
aY
,
aZ
)
;
VBO_VERTEX
vertex
=
{
aX
,
aY
,
aZ
}
;
curVboItem
->
PushVertex
(
&
vertex
);
curVboItem
->
PushVertex
(
&
vertex
);
}
}
else
else
...
...
include/gal/opengl/vbo_item.h
View file @
4de43d7c
...
@@ -44,22 +44,6 @@ typedef struct VBO_VERTEX
...
@@ -44,22 +44,6 @@ typedef struct VBO_VERTEX
GLfloat
r
,
g
,
b
,
a
;
// Color
GLfloat
r
,
g
,
b
,
a
;
// Color
GLfloat
shader
[
4
];
// Shader type & params
GLfloat
shader
[
4
];
// Shader type & params
GLfloat
_padding
;
GLfloat
_padding
;
VBO_VERTEX
()
{}
VBO_VERTEX
(
const
GLfloat
aX
,
const
GLfloat
aY
,
const
GLfloat
aZ
)
:
x
(
aX
),
y
(
aY
),
z
(
aZ
)
{}
VBO_VERTEX
(
const
GLfloat
*
aData
)
:
x
(
aData
[
0
]
),
y
(
aData
[
1
]
),
z
(
aData
[
2
]
)
{}
operator
GLfloat
*
()
{
return
&
x
;
}
}
VBO_VERTEX
;
}
VBO_VERTEX
;
class
VBO_CONTAINER
;
class
VBO_CONTAINER
;
...
...
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