Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GraPa
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
GraPa
Commits
656aab6e
Commit
656aab6e
authored
Jan 17, 2016
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL Version 2.1
parent
227f8ace
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
mainwidget.cpp
A5/Animation/mainwidget.cpp
+7
-1
mainwidget.h
A5/Animation/mainwidget.h
+2
-2
No files found.
A5/Animation/mainwidget.cpp
View file @
656aab6e
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
MainWidget
::
MainWidget
()
MainWidget
::
MainWidget
()
{
{
QSurfaceFormat
format
;
format
.
setDepthBufferSize
(
24
);
format
.
setStencilBufferSize
(
8
);
format
.
setVersion
(
2
,
1
);
format
.
setProfile
(
QSurfaceFormat
::
CoreProfile
);
setFormat
(
format
);
}
}
QSize
MainWidget
::
minimumSizeHint
()
const
QSize
MainWidget
::
minimumSizeHint
()
const
...
@@ -107,6 +112,7 @@ QOpenGLShaderProgram* MainWidget::initShader(QString fragSource, QString vertSou
...
@@ -107,6 +112,7 @@ QOpenGLShaderProgram* MainWidget::initShader(QString fragSource, QString vertSou
void
MainWidget
::
paintGL
(){
void
MainWidget
::
paintGL
(){
glViewport
(
0
,
0
,
width
(),
height
());
glViewport
(
0
,
0
,
width
(),
height
());
qDebug
()
<<
"Format"
<<
this
->
format
().
version
();
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
...
...
A5/Animation/mainwidget.h
View file @
656aab6e
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
#include <QObject>
#include <QObject>
#include <QtOpenGL>
#include <QtOpenGL>
#include <QOpenGLWidget>
#include <QOpenGLWidget>
#include <QOpenGLFunctions_
3_3_Core
>
#include <QOpenGLFunctions_
2_1
>
#include <QOpenGLShaderProgram>
#include <QOpenGLShaderProgram>
class
MainWidget
:
public
QOpenGLWidget
,
public
QOpenGLFunctions_
3_3_Core
class
MainWidget
:
public
QOpenGLWidget
,
public
QOpenGLFunctions_
2_1
{
{
Q_OBJECT
Q_OBJECT
public
:
public
:
...
...
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