mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 06:11:46 +00:00
[client] allow texture stretch when in GL buffer mode
This commit is contained in:
parent
c0507f5a15
commit
cae4fa3aa6
1 changed files with 7 additions and 4 deletions
|
@ -293,6 +293,9 @@ int renderThread(void * unused)
|
|||
SDL_RenderClear(state.renderer);
|
||||
if (state.hasBufferStorage)
|
||||
{
|
||||
int w, h;
|
||||
SDL_GetWindowSize(state.window, &w, &h);
|
||||
|
||||
// copy the buffer to the texture and let the guest advance
|
||||
memcpySSE(texPixels[texIndex], pixels + state.shm->dataPos, texSize);
|
||||
ivshmem_kick_irq(state.shm->guestID, 0);
|
||||
|
@ -314,10 +317,10 @@ int renderThread(void * unused)
|
|||
|
||||
// draw the screen
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glTexCoord2f(0.0f, 0.0f); glVertex2f(0.0f , 0.0f );
|
||||
glTexCoord2f(1.0f, 0.0f); glVertex2f(state.shm->width, 0.0f );
|
||||
glTexCoord2f(0.0f, 1.0f); glVertex2f(0.0f , state.shm->height);
|
||||
glTexCoord2f(1.0f, 1.0f); glVertex2f(state.shm->width, state.shm->height);
|
||||
glTexCoord2f(0.0f, 0.0f); glVertex2i(0, 0);
|
||||
glTexCoord2f(1.0f, 0.0f); glVertex2i(w, 0);
|
||||
glTexCoord2f(0.0f, 1.0f); glVertex2i(0, h);
|
||||
glTexCoord2f(1.0f, 1.0f); glVertex2i(w, h);
|
||||
glEnd();
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
|
Loading…
Reference in a new issue