No, the new stuff is mostly internal.
But the one Kadete's talking about is just a slider than folds out to reveal two more. You can have the exact same functionality with three sliders, minus the folding part.
Hi Joris could you give me quick example.Joris wrote:1088 is the size of the texture used by the GPU, because GPUs like working with multiples of 16.
1080 is the last row of pixels containing any actual data. The other 8 rows are just filled with black.
Which pixels contain data is retrievable via GetMaxGLTexCoords. In your case, you'll need to multiply any texture coordinates by the maximum texture coordinates of 0.9926470588 (1080/1088). To be safe, that needs to happen on both the x and y axes (of course using different values for x and y!)
Joris wrote:Btw, maxCoords.t will be a fractional value (Height / HardwareHeight), not the actual value in pixels.
Code: Select all
glBegin(GL_QUADS);
//lower left
glMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
glVertex2f(-1.0f, -1.0f);
//upper left
glMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.99264705882);
glVertex2f(-1.0f, 1.0f);
//upper right
glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, 0.99264705882);
glVertex2f(1.0f, 1.0f);
//lower right
glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, 0.0f);
glVertex2f(1.0f, -1.0f);
glEnd();
Code: Select all
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
float color[] = { 0.0F, 0.0F, 0.0F, 0.0F };
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, color);
if (m_MIS9) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
}
If you look in the function, this is exactly what GetMaxGLTexCoords does for you. Except it does it the right way round (height/hardwareheight).float tHeight = Texture.HardwareHeight / Texture.Height;
Didn't see the formatted textJoris wrote:I formatted your text and removed the commented lines to make things easier to read.
So what are you expecting to see and what are you actually seeing? "Nothing" can mean so many things. Which is kind of ironic when you think about it.
Code: Select all
//draw the quad that will be painted by the shader/textures
//note that we are sending texture coordinates to texture unit 1..
//the vertex shader and fragment shader refer to this when querying for
//texture coordinates of the inputTexure
glBegin(GL_QUADS);
//lower left
// glScalef(1.0F - (m_xScaleS1Tex * 2.0F) + 1.0F, 1.0F - (m_yScaleS1Tex * 2.0F) + 1.0F, 0.0F);
// glMultiTexCoord2f(GL_TEXTURE0, m_STXS9 - 0.5f, 0.0f);
glMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
//glVertex2f(-1.0f, -aspect);
glVertex2f(-1.0f, -1.0f);
//upper left
glMultiTexCoord2f(GL_TEXTURE0, 0.0f, maxCoords.t);
//glVertex2f(-1.0f, aspect);
glVertex2f(-1.0f, 1.0f);
//upper right
glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, maxCoords.t);
//glVertex2f(1.0f, aspect);
glVertex2f(1.0f, 1.0f);
//lower right
//glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s * (m_STXS9 - 0.5f), 0);
glMultiTexCoord2f(GL_TEXTURE0, maxCoords.s, 0.0f);
//glVertex2f(1.0f, -aspect);
glVertex2f(1.0f, -1.0f);
glEnd();