Closed GoogleCodeExporter closed 8 years ago
I just went through the code and it looks like the texture sizes are 640x480,
any easy way to pad the texture to make it 1024x512 and use the range of 0 to
.625, 0 to .9375? I would do it myself but I do not want to go through
downloading all this stuff and setting it up to make one little fix. plus I do
not know what Mat* actually is to see if it could be expanded on.
The code that would be fixed is located at common\glwidget2d in function painGL
if(color)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image.cols, image.rows, 0, GL_RGB, GL_UNSIGNED_BYTE, image.data);
else
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, image.cols, image.rows, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, image.data);
would end up being
paddedimage = image with padding to make it 1024x512
if(color)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, paddedimage.cols, paddedimage.rows, 0, GL_RGB, GL_UNSIGNED_BYTE, paddedimage.data);
else
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, paddedimage.cols, paddedimage.rows, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, paddedimage.data);
Original comment by knight0f...@gmail.com
on 5 Nov 2012 at 11:18
glBegin(GL_QUADS);
// upper left
glTexCoord2f(0, 0);
glVertex2f(-1.0, 1.0);
// upper right
glTexCoord2f(0.625f, 0);
glVertex2f(1.0, 1.0);
// bottom right
glTexCoord2f(0.625f, 0,9375f);
glVertex2f(1.0, -1.0);
// bottom left
glTexCoord2f(0, 0,9375f);
glVertex2f(-1.0, -1.0);
glEnd();
}
Original comment by knight0f...@gmail.com
on 5 Nov 2012 at 11:20
The new version has a fix to work with opengl versions less than 2.0. It also
has the posibility to save the calibration and autostart. We havent had the
time to finalize this version but soon we will. The fix for opengl is on the
same direction as yours. We also had a couple of issues with the whole screen
point calibration widget so we made it regular qwidget (non opengl). As soon
as we get a little time we will upload the project. Thanks for your comments.
Cheers!
Original comment by nzalaqu...@gmail.com
on 7 Nov 2012 at 11:42
Fixed on version 0.1.1
Original comment by nzalaqu...@gmail.com
on 22 Nov 2012 at 9:08
Original issue reported on code.google.com by
knight0f...@gmail.com
on 30 Oct 2012 at 2:41