skunkworx wrote:
I got the impression from these code patches that it wouldn't be easy to write something that could switch on the fly, at least not without rewriting some other part of Gens. I wanted to ask anyway, though.
Not really what's it's difficult is doing it and don't mess the code , the more features you add the harder to mantain clean the code will be.
I post those quickfixes because I prefer to think a bit about what I'm adding to gens rather than include whatever I might think is ok at the moment.
Quickfix:
Code: Select all
glBegin(GL_QUADS);
glTexCoord2f(0.0f + Stretch?(Dep * 0.0625f/64.0):0 , stretch_size ); // Upleft corner of thetexture
glVertex2f(-1.0f, 1.0f); // Upleft vertex of the quad
glTexCoord2f(0.625 - (Stretch?(Dep * 0.0625f/64.0):0), stretch_size );// UpRight corner of the texture 0.625 == 256/320 ,0.625 == 512/640
glVertex2f( 1, 1.0f); // UpRight vertex of the quad
glTexCoord2f(0.625f - (Stretch?(Dep * 0.0625f/64.0):0), 0.9375f - stretch_size );// DownRight corner of the texture 0.9375 == 256/240 . 0.9375 == 512/480
glVertex2f( 1 , -1.0f); // DownRight vertex of the quad
glTexCoord2f(0.0f + Stretch?(Dep * 0.0625f/64.0):0, 0.9375f - stretch_size ); // DownLeft corner of the first texture
glVertex2f(-1.0f, -1.0f); // DownLeft vertex of the quad
glEnd();
With this code if the *Stretch* option is selected in 256*224 mode(hyperstone heist , wonderboy , megaman) it'll do both V and H stretch , in 320*224(most of the megadrive game library) it'll do V stretch and in games in 320*240(pal version of story of thor) it' ll do nothing because it's not needed.
I have a GeForce2 MX 400 based card , I use nvidia-settings to enable/disable the "Sync to Vblank" option.
"uberpenguin" wrote:
In the rc3.2 tarball you forgot to define the function prototype for void vsync() in g_sdldraw.h, so gcc will die when you try to compile it (not that vsync() actually DOES anything right now Smile )
Additionally, do you think there is any way you can eliminate the black line rendering glitch with the old code? I am using gens on a laptop with radeon + DRI + 16 MiB video RAM and I cannot adjust any AGP aperture in the BIOS settings... So obviously I can only use the normal size rendering scheme with the new texture code, but having the different rendering engines is very nice...
About the vsync : I played a bit with it but as I found that there's no way to enable vsync I dropped the idea , forgot to comment the code , my gcc version (3.3.2 20031218 ) just gave me a warning that I failed to see , cflags troubles ,sorry.
About the older ode there's no black line It's just a sligthly darker line between both textures and is noticeable only with filtering on (would you have realized of it existence if I didn't have warned about it? , I thougt about leaving it "as is" but realized that once you know it existance you'll be looking for it and distracting from the game).
Solutions ? : I found 2 , texture compression (if the problem is shortage of video ram , the problem could also be your opengl implementation limitating the max. texture size to 512) it's possible with an opengl extension, and just use non power of two textures via the GL_ARB_TEXTURE_RECTANGLE (the name is wrong a 256 * 16 texture will be rectangle shaped and doesn't need said extension ).
As both solutions need the use of opengl extensions and I don't know much about it'll take some time (I'm checking
http://developer.nvidia.com/object/open ... orial.html).
Be good and if you can't be good, be careful.