Now, this is one I may or may not have the answer to but can't get it right. I have a large gl texture which loads an image. From this, I calculate the the positions of sprites/tiles on it. That all seems to work no problem. The problem is when I need to draw a part of that image in opengl.
I remember SDL has a Sdl_Rect you can use with sdl_blitsurface but I am avoiding that for major performance issues. I think it has something to do with the:
(ignore variables, directly from source) and I have to adjust the first decimal as a percentage (ie. 0.4758532875328947238947238947 yada yada) but how accurate is this? Since my code tries to support 'tilesets' of up to 90,000 tiles... (In case someone runs out although I doubt it).Code:glTexCoord2i( VxR[1], VyR[2] );
Or if the above is all wrong how would you go about doing this Really lost again
Edit: and everything I try says it has to be a longing - that cannot support the decimal point.
Edit2: ah baka-mistake - use gltexcoord2f!!!!! that solves the integer issue but how does it all work waaaa.
Bookmarks