summaryrefslogtreecommitdiff
path: root/src/VBox/HostServices/SharedOpenGL/unpacker
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/HostServices/SharedOpenGL/unpacker
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/HostServices/SharedOpenGL/unpacker')
-rw-r--r--src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c2
-rw-r--r--src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c11
-rw-r--r--src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c27
-rw-r--r--src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c2
-rw-r--r--src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special1
5 files changed, 35 insertions, 8 deletions
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c
index ca4d82b3..cdf0591b 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_framebuffer.c
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2009 Oracle Corporation
+ * Copyright (C) 2009-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c
index 5c79f909..daf2b839 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c
@@ -74,3 +74,14 @@ void crUnpackExtendGetPixelMapusv(void)
cr_unpackDispatch.GetPixelMapusv( map, values );
}
+
+void crUnpackExtendVBoxTexPresent(void)
+{
+ GLuint texture = READ_DATA( 8, GLuint );
+ GLuint cfg = READ_DATA( 12, GLuint );
+ GLint xPos = READ_DATA( 16, GLint );
+ GLint yPos = READ_DATA( 20, GLint );
+ GLint cRects = READ_DATA( 24, GLint );
+ GLint *pRects = (GLint *)DATA_POINTER( 28, GLvoid );
+ cr_unpackDispatch.VBoxTexPresent( texture, cfg, xPos, yPos, cRects, pRects );
+}
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
index 6b3204ce..2e90b3d5 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2009 Oracle Corporation
+ * Copyright (C) 2009-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -39,8 +39,8 @@ void crUnpackExtendShaderSource(void)
GLsizei count = READ_DATA(12, GLsizei);
GLint hasNonLocalLen = READ_DATA(16, GLsizei);
GLint *pLocalLength = DATA_POINTER(20, GLint);
- const char **ppStrings = NULL;
- GLsizei i;
+ char **ppStrings = NULL;
+ GLsizei i, j, jUpTo;
int pos=20+count*sizeof(*pLocalLength);
if (hasNonLocalLen>0)
@@ -60,9 +60,24 @@ void crUnpackExtendShaderSource(void)
{
pLocalLength[i] -= 1;
}
+
+ Assert(pLocalLength[i] > 0);
+ jUpTo = i == count -1 ? pLocalLength[i] - 1 : pLocalLength[i];
+ for (j = 0; j < jUpTo; ++j)
+ {
+ char *pString = ppStrings[i];
+
+ if (pString[j] == '\0')
+ {
+ Assert(j == jUpTo - 1);
+ pString[j] = '\n';
+ }
+ }
}
- cr_unpackDispatch.ShaderSource(shader, count, ppStrings, length ? length : pLocalLength);
+// cr_unpackDispatch.ShaderSource(shader, count, ppStrings, length ? length : pLocalLength);
+ cr_unpackDispatch.ShaderSource(shader, 1, ppStrings, 0);
+
crFree(ppStrings);
}
@@ -249,7 +264,7 @@ void crUnpackExtendGetAttachedShaders(void)
void crUnpackExtendGetAttachedObjectsARB(void)
{
- GLhandleARB containerObj = READ_DATA(8, GLhandleARB);
+ VBoxGLhandleARB containerObj = READ_DATA(8, VBoxGLhandleARB);
GLsizei maxCount = READ_DATA(12, GLsizei);
SET_RETURN_PTR(16);
SET_WRITEBACK_PTR(24);
@@ -258,7 +273,7 @@ void crUnpackExtendGetAttachedObjectsARB(void)
void crUnpackExtendGetInfoLogARB(void)
{
- GLhandleARB obj = READ_DATA(8, GLhandleARB);
+ VBoxGLhandleARB obj = READ_DATA(8, VBoxGLhandleARB);
GLsizei maxLength = READ_DATA(12, GLsizei);
SET_RETURN_PTR(16);
SET_WRITEBACK_PTR(24);
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c
index 4bae17d1..961f7ac0 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_visibleregion.c
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2008 Oracle Corporation
+ * Copyright (C) 2008-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
diff --git a/src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special b/src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special
index e0f9a743..cd1fc415 100644
--- a/src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special
+++ b/src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special
@@ -180,3 +180,4 @@ UniformMatrix2x4fv
UniformMatrix4x2fv
UniformMatrix3x4fv
UniformMatrix4x3fv
+VBoxTexPresent \ No newline at end of file