Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Ludmány Balázs
/
thin-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bd050424
authored
Jul 19, 2016
by
Ludmány Balázs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set swap behavior
parent
36bd0aa2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
dispatcher.cpp
+3
-6
main.cpp
+13
-2
vncrenderer.cpp
+1
-1
No files found.
dispatcher.cpp
View file @
bd050424
...
...
@@ -144,12 +144,12 @@ void Dispatcher::open(QString host, int port)
// 32 bit: RGB888
// 16 bit: RGB444, RGB555, RGB565
/*
int message = WaitForMessage(m_client, 1000);
int
message
=
WaitForMessage
(
m_client
,
1000
);
if
(
message
<
0
)
{
terminate
();
emit
error
();
return
;
}
*/
}
refresh
();
}
void
Dispatcher
::
refresh
()
...
...
@@ -167,12 +167,9 @@ void Dispatcher::refresh()
return
;
}
// Don't block uploading!
// Wait until we get something
while
(
message
==
0
)
{
QCoreApplication
::
processEvents
();
message
=
WaitForMessage
(
m_client
,
1000
);
message
=
WaitForMessage
(
m_client
,
10000
);
if
(
message
<
0
)
{
terminate
();
emit
error
();
...
...
main.cpp
View file @
bd050424
#define QT_OPENGL_ES_2 1
#include <QGuiApplication>
#include <QtQml>
#include <QQmlApplicationEngine>
...
...
@@ -8,6 +6,19 @@
int
main
(
int
argc
,
char
*
argv
[])
{
QSurfaceFormat
format
;
format
.
setAlphaBufferSize
(
0
);
format
.
setRedBufferSize
(
8
);
format
.
setGreenBufferSize
(
8
);
format
.
setBlueBufferSize
(
8
);
format
.
setDepthBufferSize
(
0
);
format
.
setStencilBufferSize
(
0
);
format
.
setMajorVersion
(
2
);
format
.
setMinorVersion
(
0
);
format
.
setRenderableType
(
QSurfaceFormat
::
OpenGLES
);
format
.
setSwapBehavior
(
QSurfaceFormat
::
SingleBuffer
);
format
.
setSwapInterval
(
0
);
QSurfaceFormat
::
setDefaultFormat
(
format
);
QGuiApplication
::
setAttribute
(
Qt
::
AA_UseOpenGLES
,
true
);
QGuiApplication
app
(
argc
,
argv
);
...
...
vncrenderer.cpp
View file @
bd050424
...
...
@@ -21,7 +21,7 @@ VncRenderer::VncRenderer(QQuickWindow *window,
void
VncRenderer
::
render
()
{
static
QTime
frameTime
;
qDebug
()
<<
qRound
(
1000.0
/
frameTime
.
elapsed
());
qDebug
()
<<
qRound
(
1000.0
/
frameTime
.
elapsed
())
<<
m_textures
->
length
()
;
frameTime
.
restart
();
m_program
.
bind
();
...
...
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