3#include <QOpenGLShaderProgram>
63template<
size_t N = 3,
typename T = GL
float>
64std::array<T, N>
array(QVector3D vect, T value = 1);
131template<
typename VertexType,
typename FieldType>
141#ifndef __JETBRAINS_IDE__
143 #include <xgl/utils.hpp>
Definition DemoRenderer.h:6
_XGL_FUNC QVector3D toQVector3D(const Vector3D &v)
Converts the given sf::Vector3D into a Qt QVector3D.
_XGL_FUNC void toMatrix44(Matrix44 &trg, const QMatrix4x4 &mtx)
Converts the given Qt 4x4 matrix into a sf::Matrix44.
_XGL_FUNC QImage getTransparentImage(const QImage &src_image, int alpha)
Turms the given image into a transparent one.
_XGL_FUNC QMatrix4x4 getPerspectiveMatrix(float fov_y, float aspect, float near_z, float far_z)
createPerspectiveMatrix Generates a perspective projection matrix using QMatrix4x4....
_XGL_FUNC std::pair< GLsizei, std::string_view > getTypeInfo(GLenum type)
Gets the C++ type and GLSL type as a string, and the size in bytes of the given enumeration type.
_XGL_FUNC void toQMatrix4x4(QMatrix4x4 &trg, const Matrix44 &mtx)
Converts the given sf::Matrix44 into a Qt 4x4 matrix.
_XGL_FUNC std::string asString(const QVector3D &v, int digits=0)
Converts the given vector to a std::string.
std::array< T, N > array(QVector3D vect, T value=1)
Template function to get an 'std::array' type from a Vector3D. This function is to pass a 3D vector w...
std::array< GLfloat, 16 > matrix4x4f
Type which corresponds with a GLSL type and used to implement Vertex structures.
Definition Types.h:13
_XGL_FUNC bool checkDrawMode(GLenum mode, size_t vertice_count, const std::string &src)
Checks is the necessary vertices are enough and in range.
_XGL_FUNC matrix4x4f getPerspectiveMatrixF(GLfloat fovY, GLfloat aspect, GLfloat nearZ, GLfloat farZ)
Gets the perspective matrix similar to GLU gluPerspective() function.
void setVertexAttribPointer(QOpenGLShaderProgram *sp, GLuint attr_loc, size_t offset)
Makes a call to glVertexAttribPointer() and to glEnableVertexAttribArray() smartly.
constexpr GLenum getTypeEnum()
Converts the template type into an OpenGL type value like GL_INT, GL_FLOAT, Double.
_XGL_FUNC QMatrix4x4 getRotationMatrix(const QVector3D &v1, const QVector3D &v2)
Gets a 4x4 matrix from to vectors. When the 'v1' vector is mapped using the matrix,...
_MISC_FUNC int digits(double value)
Returns the amount of digits which are significant for the value. When the value is 12300....
#define _XGL_FUNC
Definition xgl/global.h:34