Commit graph

107 commits

Author SHA1 Message Date
salvy
1fbd688b34 [~] Fixed PSP build
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1447 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-27 20:50:58 +00:00
salvy
0f60eae933 [!] Started WIP to get rendering working from GL renderer (some textures show up now, ex texrect!)
[!] Compiled project as console app (needed for glfw) [WIP, ALOT things got broken! and huge clean up is needed, will fix them eventually)
Note: glew and glfw are now needed to build W32.

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1443 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-26 21:58:22 +00:00
salvy
c8ac6af830 [!] Fixes to to get OSX (GL rendering) to work under W32
Note: libpng15 is now needed to compile W32 build

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1442 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-26 16:18:21 +00:00
strmnnrmn
273f31fe19 [~] Fix a bad merge
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1397 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-24 12:53:58 +00:00
strmnnrmn
5d744e459c [+] Implement the tile shift_s/shift_t on OSX. Should be possible to get this working on PSP too, but it doesn't always make things look better without Texel1 too
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1380 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-24 12:51:40 +00:00
strmnnrmn
ccd4f66711 [~] Keep track of prim lod fraction
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1376 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-24 12:51:12 +00:00
salvy
1d61dd19e6 [!] Need to set depth state in Draw2Texture (Fixes logo in Wipeout)
[-] Don't update shademodel ( I don't think this required, and was breaking tiger's honey hunt)
[!] Fixed crash in Wetrix
[!] Removed unused hacks
[~] Banjo K needs tlut hack for fast tmem (Fixes Nintendo logo)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1369 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-23 03:33:13 +00:00
strmnnrmn
a7b569ac71 [!] Fix PrepareTexRectUVs - it was applying GU_CLAMP when uv0.{x,y} was already >0, but uv1.{x,y} was <0 or >size
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1356 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-21 22:16:51 +00:00
Corn
f2d0f4cd0f [!] Force Clamp for textures on texrects (and use a hack to disable it on Lamborghini)
[!] Fix off by one in UV mapping for texrects (california speed)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1354 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-21 19:20:09 +00:00
strmnnrmn
f8d4b4d190 [!] Fix glitchy borders in TexRect. Use GU_CLAMP/GL_CLAMP_TO_EDGE, but only after fixing up UVs so that they're positive.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1348 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:42:24 +00:00
strmnnrmn
65928a7b4f [~] Fix Draw2DTextureBlit on OSX. It's only needed on PSP and Draw2DTexture works fine for OSX. So move the logic for calling (w>=512) to RendererPSP::Draw2DTexture, and remove Draw2DTextureBlit from the BaseRenderer abstract interface.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1346 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:42:08 +00:00
strmnnrmn
b7486694f9 [~] Pass S2DEX/Sprite2D texture loads through the renderer so that it can keep track of what's loaded
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1344 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:51 +00:00
strmnnrmn
e068c9da98 [~] Rename mRecentTexture* to mBoundTexture*
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1325 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:41 +00:00
strmnnrmn
7e9a6f8eb0 [*] Remove mTileScale. No need to cache this, as we can always figure it out from the native texture (less state to keep in sync is better)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1323 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:27 +00:00
strmnnrmn
c72b2ce625 [~] STextureInfoSnapshot can use a CNativeTexture
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1316 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:35 +00:00
strmnnrmn
af29743eab [~] Keep track of NativeTextures, not CachedTextures. I'm going to introduce a new CachedTile type for OSX, and it's simpler for the renderer to only know about the native texture type (common to CachedTexture and CachedTile)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1313 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:09 +00:00
salvy
dcde132975 [~] I don't know why aligning a local variable for mat didn't work well, use a global for now..
[~] Fixed debug build

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1302 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-18 07:42:21 +00:00
Corn
d0fc3b0364 [!] Outer rounding in ConvertN64ToScreen() is needed for proper scaling of textures and screen
[!] More fixes to DKR Dlist commands

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1301 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-17 18:13:30 +00:00
Corn
68b1060f33 [!] Improved matrix handling for DKR (skipping the need for some globals)
[!] Reduced the stack to a single matrix for project matrices 
[!] Made some viewport stuff OSX only

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1300 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-16 21:37:39 +00:00
salvy
942fda9c4a [!] Use a temp mat when multiplying matrices..We could overflow since we were using the next stack slot for storage which mMatStackSize aware, also gcc gives better asm using a local variable :)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1299 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-15 02:29:18 +00:00
strmnnrmn
488d105cc4 [~] Move some RDP state to RDPStateManager. RDP.cpp is pretty defunct now...might make more sense to rename RDPStateManager to RDP and reduce typing :)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1292 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-12 20:54:52 +00:00
salvy
ff44ce2c0e [!] Some clean ups to deprecate poking the projection stack, and some other small clean ups
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1251 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-10 22:50:41 +00:00
strmnnrmn
e9d7d8fd1f [~] Clang caught this - SetProjectionDKR uses mProjectionStack[4], so need at least 5 elements for this array.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1250 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-10 19:01:50 +00:00
strmnnrmn
058c7de6b5 [~] Rename CTexture to CachedTexture
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1249 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-10 19:01:41 +00:00
salvy
8df469af4c [~] Clean ups to previous commit
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1236 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-10 16:30:28 +00:00
strmnnrmn
4958e15f0d [~] Move the WorldProject code to a function
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1220 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-09 14:00:30 +00:00
strmnnrmn
41c91d9549 [~] Rename EnableTexturing (which doesn't do any enabling) to UpdateTileSnapshots
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1219 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-09 14:00:22 +00:00
strmnnrmn
8f4dcdffc7 [~] Fix viewports and scissoring with OpenGL - 'y' is from the bottom of the screen, not the top. Also, tidy SetPSPViewport - it's basically just InitViewport - and avoid a redundant call to UpdateViewport (called from both SetPSPViewport and SetN64Viewport)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1216 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-09 13:59:57 +00:00
salvy
e571e5fca2 [!] Finally fixed SSV cut scenes and glitch when walking by the windshield of the ship \o/
[~] Reverted changes to rom write support, no need to over think it since it works fine as it is

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1210 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-09 07:43:45 +00:00
salvy
c21a6a3f56 [~] Removed outer round from ConvertN64ToScreen (I think we had issues before because we were using the vfpu round)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1206 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-07 17:19:53 +00:00
strmnnrmn
9ee820d32c [~] Add a TODO for the rounding in ConvertN64ToScreen
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1205 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:09:07 +00:00
strmnnrmn
f2cd817ae8 [~] mN64ToNative{Scale,Translate} -> mN64ToScreen{Scale,Translate}
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1204 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:09:00 +00:00
strmnnrmn
e82f23491e [~] N64ToNative{X,Y} -> N64ToScreen{X,Y}
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1203 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:08:52 +00:00
strmnnrmn
b0e75da33c [~] Rename ConvertN64ToPsp to ConvertN64ToScreen (going to add a ToDisplay version next)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1202 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:08:42 +00:00
strmnnrmn
f18fa4001d [~] Replace RenderUsingCurrentBuildMode virtual with RenderTriangles. The triangle_mode/render_mode args don't need to be passed then, which simplifies the interfaces a bit. On OSX we can get rid of ERenderMode and just pass the matrix to use. On PSP we just pass GU_TRANSFORM_3D/2D as we did previously.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1201 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:08:32 +00:00
strmnnrmn
d099a4cb1b [~] Pass an enum to RenderUsingCurrentBlendMode to specify 2d/3d rendering. This lets us remove a bunch more dummy enum values on OSX
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1187 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:06:37 +00:00
strmnnrmn
8fc0f527d4 [~] Rename GetWorldProject to UpdateWorldProject, which is a bit clearer about what it's doing. Also, as it just returns a ref to mWorldProject, just return void and reference this member directly from the calling code. Finally, rename matWorldProject -> mat_world_project
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1182 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 21:05:55 +00:00
strmnnrmn
094d561623 [~] Move TexRect/TexRectFlip/FillRect to the platform renderer implementations - stuff like GU_SPRITES makes the OSX implementation a bit bodgy.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1175 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-05 20:27:43 +00:00
strmnnrmn
4c1ce8b38c [~] Move ConvertN64ToPsp to the BaseRenderer header. I'm about to move texrect etc to the platform implementations, and it won't be visible to inline from there.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1173 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-05 20:27:25 +00:00
strmnnrmn
510885fa9c [~] ViewportInfo is no longer used
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1160 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 23:06:01 +00:00
strmnnrmn
729255a6c9 [~] Split some PSP/OSX functionality, remove sceGuShadeModel dummy function.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1151 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 22:13:35 +00:00
strmnnrmn
07c7b5b974 [~] Make RestoreRenderStates platform specific.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1144 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 22:12:31 +00:00
strmnnrmn
3aaa1cda8e [~] Nicer vertex allocation for OSX - no longer uses sceGuGetMemory dummy function
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1140 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 22:11:56 +00:00
strmnnrmn
7bbc5a7a39 [~] Rename mN64ToPSP* to mN64ToNative* and wrap the duplicated transform in an inline function.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1137 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 22:11:35 +00:00
strmnnrmn
d72b33d127 [~] Move DebugBlendSettings to RendererPSP.h
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1136 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 22:11:26 +00:00
strmnnrmn
2ae5974061 [~] Move mUnhandledCombinerStates to the PSP renderer.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1135 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 22:11:18 +00:00
strmnnrmn
311f69151d [~] mCopyBlendStates/mFillBlendStates are only used by the PSP renderer
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1131 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 12:31:56 +00:00
strmnnrmn
20bc886504 [~] Move some more displaylist debugging code from BaseRenderer to RendererPSP
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1130 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 12:08:08 +00:00
strmnnrmn
53a69a2c1f [*] Move BlendModes.{h,cpp}, CombinerExpression.{h,cpp} CombinerTree.{h,cpp} and CombinerInput.h to SysPSP. These aren't needed to compile the OSX build any more.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1129 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 12:08:00 +00:00
strmnnrmn
5f4df61c5a [~] Move LookupBlendState to the PSP Renderer implementation
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1128 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-03 12:07:43 +00:00