-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGLConvenience.cpp
More file actions
39 lines (34 loc) · 930 Bytes
/
Copy pathGLConvenience.cpp
File metadata and controls
39 lines (34 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// Some convenience functions for OpenGL-/Qt-conversions
//
// (c) Georg Umlauf, 2021
//
#include "GLConvenience.h"
void glVertex3f(const QVector3D& vector)
{
glVertex3f(vector.x(),vector.y(),vector.z());
}
void glVertex3f(const QVector4D& vector)
{
glVertex3f(vector.x(),vector.y(),vector.z());
}
void glColor3f (const QColor& color)
{
glColor3f (float(color.red ())/255.0f,
float(color.green())/255.0f,
float(color.blue ())/255.0f );
}
void glColor4f (const QColor& color)
{
glColor4f (float(color.red ())/255.0f,
float(color.green())/255.0f,
float(color.blue ())/255.0f,
float(color.alpha())/255.0f);
}
void glColor4f (const QColor& color, float transpareny)
{
glColor4f (float(color.red ())/255.0f,
float(color.green())/255.0f,
float(color.blue ())/255.0f,
transpareny);
}