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)
...
@@ -144,12 +144,12 @@ void Dispatcher::open(QString host, int port)
// 32 bit: RGB888
// 32 bit: RGB888
// 16 bit: RGB444, RGB555, RGB565
// 16 bit: RGB444, RGB555, RGB565
/*
int message = WaitForMessage(m_client, 1000);
int
message
=
WaitForMessage
(
m_client
,
1000
);
if
(
message
<
0
)
{
if
(
message
<
0
)
{
terminate
();
terminate
();
emit
error
();
emit
error
();
return
;
return
;
}
*/
}
refresh
();
refresh
();
}
}
void
Dispatcher
::
refresh
()
void
Dispatcher
::
refresh
()
...
@@ -167,12 +167,9 @@ void Dispatcher::refresh()
...
@@ -167,12 +167,9 @@ void Dispatcher::refresh()
return
;
return
;
}
}
// Don't block uploading!
// Wait until we get something
// Wait until we get something
while
(
message
==
0
)
{
while
(
message
==
0
)
{
QCoreApplication
::
processEvents
();
message
=
WaitForMessage
(
m_client
,
10000
);
message
=
WaitForMessage
(
m_client
,
1000
);
if
(
message
<
0
)
{
if
(
message
<
0
)
{
terminate
();
terminate
();
emit
error
();
emit
error
();
...
...
main.cpp
View file @
bd050424
#define QT_OPENGL_ES_2 1
#include <QGuiApplication>
#include <QGuiApplication>
#include <QtQml>
#include <QtQml>
#include <QQmlApplicationEngine>
#include <QQmlApplicationEngine>
...
@@ -8,6 +6,19 @@
...
@@ -8,6 +6,19 @@
int
main
(
int
argc
,
char
*
argv
[])
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
::
setAttribute
(
Qt
::
AA_UseOpenGLES
,
true
);
QGuiApplication
app
(
argc
,
argv
);
QGuiApplication
app
(
argc
,
argv
);
...
...
vncrenderer.cpp
View file @
bd050424
...
@@ -21,7 +21,7 @@ VncRenderer::VncRenderer(QQuickWindow *window,
...
@@ -21,7 +21,7 @@ VncRenderer::VncRenderer(QQuickWindow *window,
void
VncRenderer
::
render
()
void
VncRenderer
::
render
()
{
{
static
QTime
frameTime
;
static
QTime
frameTime
;
qDebug
()
<<
qRound
(
1000.0
/
frameTime
.
elapsed
());
qDebug
()
<<
qRound
(
1000.0
/
frameTime
.
elapsed
())
<<
m_textures
->
length
()
;
frameTime
.
restart
();
frameTime
.
restart
();
m_program
.
bind
();
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