|
| _XGL_FUNC QMatrix4x4 | sf::xgl::getPerspectiveMatrix (float fov_y, float aspect, float near_z, float far_z) |
| | createPerspectiveMatrix Generates a perspective projection matrix using QMatrix4x4. This function calculates the perspective projection matrix, which is used to transform 3D coordinates into 2D clip space. This transformation is essential for rendering 3D scenes correctly on a 2D screen. The matrix is designed to simulate the effect of perspective, where objects appear smaller the farther away they are.
|
| |
| _XGL_FUNC matrix4x4f | sf::xgl::getPerspectiveMatrixF (GLfloat fovY, GLfloat aspect, GLfloat nearZ, GLfloat farZ) |
| | Gets the perspective matrix similar to GLU gluPerspective() function.
|
| |
| _XGL_FUNC std::pair< GLsizei, std::string_view > | sf::xgl::getTypeInfo (GLenum type) |
| | Gets the C++ type and GLSL type as a string, and the size in bytes of the given enumeration type.
|
| |
| template<typename T > |
| constexpr GLenum | sf::xgl::getTypeEnum () |
| | Converts the template type into an OpenGL type value like GL_INT, GL_FLOAT, Double.
|
| |
| template<size_t N = 3, typename T = GLfloat> |
| std::array< T, N > | sf::xgl::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 where 4 or more values are required in an OpenGL function.
|
| |
| _XGL_FUNC QMatrix4x4 | sf::xgl::getRotationMatrix (const QVector3D &v1, const QVector3D &v2) |
| | Gets a 4x4 matrix from to vectors. When the 'v1' vector is mapped using the matrix, the 'v2' vector is retrieved.
|
| |
| _XGL_FUNC std::string | sf::xgl::asString (const QVector3D &v, int digits=0) |
| | Converts the given vector to a std::string.
|
| |
| _XGL_FUNC std::string | sf::xgl::asString (const QMatrix4x4 &mtx, int digits=0) |
| | Converts the given matrix to a std::string.
|
| |
| _XGL_FUNC void | sf::xgl::toMatrix44 (Matrix44 &trg, const QMatrix4x4 &mtx) |
| | Converts the given Qt 4x4 matrix into a sf::Matrix44.
|
| |
| _XGL_FUNC Matrix44 | sf::xgl::toMatrix44 (const QMatrix4x4 &mtx) |
| | Converts the given Qt 4x4 matrix into a sf::Matrix44.
|
| |
| _XGL_FUNC void | sf::xgl::toQMatrix4x4 (QMatrix4x4 &trg, const Matrix44 &mtx) |
| | Converts the given sf::Matrix44 into a Qt 4x4 matrix.
|
| |
| _XGL_FUNC QMatrix4x4 | sf::xgl::toQMatrix4x4 (const Matrix44 &mtx) |
| | Converts the given sf::Matrix44 into a Qt 4x4 matrix.
|
| |
| _XGL_FUNC QVector3D | sf::xgl::toQVector3D (const Vector3D &v) |
| | Converts the given sf::Vector3D into a Qt QVector3D.
|
| |
| _XGL_FUNC QImage | sf::xgl::getTransparentImage (const QImage &src_image, int alpha) |
| | Turms the given image into a transparent one.
|
| |
| template<typename VertexType , typename FieldType > |
| void | sf::xgl::setVertexAttribPointer (QOpenGLShaderProgram *sp, GLuint attr_loc, size_t offset) |
| | Makes a call to glVertexAttribPointer() and to glEnableVertexAttribArray() smartly.
|
| |
| _XGL_FUNC bool | sf::xgl::checkDrawMode (GLenum mode, size_t vertice_count, const std::string &src) |
| | Checks is the necessary vertices are enough and in range.
|
| |