summaryrefslogtreecommitdiffstats
path: root/opengl/system/renderControl_enc/renderControl_enc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/system/renderControl_enc/renderControl_enc.cpp')
-rw-r--r--opengl/system/renderControl_enc/renderControl_enc.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/opengl/system/renderControl_enc/renderControl_enc.cpp b/opengl/system/renderControl_enc/renderControl_enc.cpp
index 41f59d0..a40a501 100644
--- a/opengl/system/renderControl_enc/renderControl_enc.cpp
+++ b/opengl/system/renderControl_enc/renderControl_enc.cpp
@@ -505,6 +505,25 @@ int rcUpdateColorBuffer_enc(void *self , uint32_t colorbuffer, GLint x, GLint y,
return retval;
}
+int rcOpenColorBuffer2_enc(void *self , uint32_t colorbuffer)
+{
+
+ renderControl_encoder_context_t *ctx = (renderControl_encoder_context_t *)self;
+ IOStream *stream = ctx->m_stream;
+
+ unsigned char *ptr;
+ const size_t packetSize = 8 + 4;
+ ptr = stream->alloc(packetSize);
+ int tmp = OP_rcOpenColorBuffer2;memcpy(ptr, &tmp, 4); ptr += 4;
+ memcpy(ptr, &packetSize, 4); ptr += 4;
+
+ memcpy(ptr, &colorbuffer, 4); ptr += 4;
+
+ int retval;
+ stream->readback(&retval, 4);
+ return retval;
+}
+
renderControl_encoder_context_t::renderControl_encoder_context_t(IOStream *stream)
{
m_stream = stream;
@@ -534,5 +553,6 @@ renderControl_encoder_context_t::renderControl_encoder_context_t(IOStream *strea
set_rcColorBufferCacheFlush(rcColorBufferCacheFlush_enc);
set_rcReadColorBuffer(rcReadColorBuffer_enc);
set_rcUpdateColorBuffer(rcUpdateColorBuffer_enc);
+ set_rcOpenColorBuffer2(rcOpenColorBuffer2_enc);
}