hi,
The values for Height and Width are 256.
Yes if i dont resize the viewport then i get the world rendered in the lower left cornour. Is their away to get it to render from a different position in the world than i am, cause i have tried to move the camera then create the texture and move it back but this some reason screws everything up :?
I have a texture class that when is created it either loads a texture and records the Index, or it creates a Blank texture and records its Index, I create the blank texture by ::
Code:
procedure glGenTextures(n: GLsizei; var textures: GLuint); stdcall; external opengl32;
procedure BlankTexture;
var
pData: Pointer;
begin
GetMem(pData, 256*256*3);
glGenTextures(1, fIndex);
glBindTexture(GL_TEXTURE_2D, fIndex);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); {Texture blends with object background}
glTexImage2D(GL_TEXTURE_2D, 0, 3, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, pData); // Use when not wanting mipmaps to be built by openGL
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); { only first two can be used }
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); { all of the above can be used }
FreeMem(pData);
end;
Would using ARB_Multitexture effect this in anyway?
When i use glBindTexture i get a blank screen, but if i bind it to a layer i dont get the texture but the world is still rendered?!?
Bookmarks