1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00
Commit Graph

3627 Commits

Author SHA1 Message Date
Sergey Lipskiy
3d9e48230a Fix FrameBuffer_RenderBuffer for GLES2. 2015-05-13 10:11:39 +06:00
Sergey Lipskiy
caf4353295 Guard GLES2 incompatible code in FrameBuffer.cpp and gSP.cpp 2015-05-13 10:11:39 +06:00
Sergey Lipskiy
889b889847 Replace GL_DRAW_FRAMEBUFFER by GL_FRAMEBUFFER in GLES2 compatible code. 2015-05-13 10:11:38 +06:00
Sergey Lipskiy
90f8e4c2f3 Remove glDisable( GL_FOG ). 2015-05-13 10:11:37 +06:00
Sergey Lipskiy
6219ee02bf Rewrite RDRAMtoFrameBuffer::CopyFromRDRAM
Use OGL_DrawTexturedRect to render the texture.
2015-05-13 10:11:37 +06:00
Sergey Lipskiy
680d939588 Correct enable/disable SC_STSCALED VertexAttribArray. 2015-05-13 10:11:36 +06:00
Sergey Lipskiy
2b0d6e8f1d Make FrameBuffer_AttachDepthBuffer() GLES2 compatible. 2015-05-13 10:11:35 +06:00
Sergey Lipskiy
f00ca5f0a1 Replace glFramebufferTexture by GLES2 compatible glFramebufferTexture2D. 2015-05-13 10:11:35 +06:00
Sergey Lipskiy
69012cbe09 Fix compilation with optimization *_OPT options enabled. 2015-05-13 10:11:34 +06:00
Sergey Lipskiy
995d2d5775 Fix Android compilation of 3DMath. 2015-05-13 10:11:33 +06:00
Sergey Lipskiy
8f71825523 Add Log.h to the repository. 2015-05-13 10:11:32 +06:00
Sergey Lipskiy
9dbd4d076f Implement depth buffer copy to correctly emulate LoT in Zelda MM.
OpenGL depth and color buffers have different format, so
direct copy is impossible. Thus, special function for that special case
has been implemented.

Corrected version of commit 656b8531987ac578
2015-05-13 10:11:32 +06:00
Sergey Lipskiy
7ad0c8d05a Guard image texture code since GLES2 does not support it. 2015-05-13 10:11:31 +06:00
Sergey Lipskiy
ee57f6ef47 Move frame buffer emulation options to Config. 2015-05-13 10:11:30 +06:00
Sergey Lipskiy
28133f2387 Create frameBufferEmulation section in Config. 2015-05-13 10:11:30 +06:00
Sergey Lipskiy
338f1f1fb6 Fixed fog coordinate calculation. 2015-05-13 10:11:29 +06:00
Sergey Lipskiy
3453ccfd6e Fix fog-releted uniforms set. 2015-05-13 10:11:28 +06:00
Sergey Lipskiy
8018ba0aea Move user-defined settings to Config structure. 2015-05-13 10:11:27 +06:00
Sergey Lipskiy
48f1d75431 Fix Rects and Sprite vertices coordinates calculation for texture frame buffers. 2015-05-13 10:11:27 +06:00
Sergey Lipskiy
66ee0a959c Set g_bN64DepthCompare to false. 2015-05-13 10:11:26 +06:00
Sergey Lipskiy
7790ddb9f0 Move primLOD uniform variable initialization from UpdateColors to UpdateTextureInfo. 2015-05-13 10:11:25 +06:00
Sergey Lipskiy
7787518fc6 Correct calc_lod shader program. 2015-05-13 10:11:25 +06:00
Sergey Lipskiy
3d97118dd5 Fix texture coordinates calculation for FrameBuffer textures. 2015-05-13 10:11:24 +06:00
Sergey Lipskiy
1cc320b68f Code cleanup in OpenGL.cpp 2015-05-13 10:11:23 +06:00
Sergey Lipskiy
eadde5abbc Correct texture coordinates for frame buffer textures 2015-05-13 10:11:23 +06:00
Sergey Lipskiy
39801cbb7b Minor fixes for STScaled parameter 2015-05-13 10:11:22 +06:00
Sergey Lipskiy
2708b2abeb Remove FrameBufferExt functions usage. 2015-05-13 10:11:21 +06:00
Sergey Lipskiy
a3d740ff23 Rewrite OpenGL functionality using GLES2 compatible functions. 2015-05-13 10:11:20 +06:00
Sergey Lipskiy
6bac605fe2 Make frame buffer GLES2 compatible. 2015-05-13 10:11:20 +06:00
Sergey Lipskiy
ef69f2fe33 gSP functions rewritten to use vertex arrays. 2015-05-13 10:11:19 +06:00
Sergey Lipskiy
4987f55579 Define G_RDPNOOP 2015-05-13 10:11:18 +06:00
Sergey Lipskiy
c5d0066ccd Correct GBI_DetectMicrocode 2015-05-13 10:11:18 +06:00
Sergey Lipskiy
da8844f544 F3DEX2 MoveMem corrections 2015-05-13 10:11:17 +06:00
Sergey Lipskiy
4e15ceb786 Correct Tri1 function in ucodes 2015-05-13 10:11:16 +06:00
Sergey Lipskiy
a41417ef6b Remove asm code from 3dMath 2015-05-13 10:11:16 +06:00
Sergey Lipskiy
3f72a7aefc Add reverse width and height to VIInfo. 2015-05-13 10:11:15 +06:00
Sergey Lipskiy
7c0b58cb25 Rewrite gDPTextureRectangle.
Code is the same for texrect and texrectFlip.
Taken from gles2n64.
2015-05-13 10:11:14 +06:00
Sergey Lipskiy
daf0450241 Add GLES2 define to mark gles2 specific code. 2015-05-13 10:11:14 +06:00
Sergey Lipskiy
936f918f96 Make SpecialMicrocodeInfo::text const to fix warnings. 2015-05-13 10:11:13 +06:00
Sergey Lipskiy
b2a260a055 Set READ_FRAMEBUFFER back to zero after CopyToRDRAM.
Fixed OGL_ReadScreen with CopyToRDRAM enabled.
2015-05-13 10:11:13 +06:00
Sergey Lipskiy
1711da98ae Correct VI.height calculation.
In case of interlaced mode both half-fields are used and thus all half-lines
must be taken into account.
2015-05-13 10:11:12 +06:00
Sergey Lipskiy
467cc44185 Implement depth buffer copy to correctly emulate LoT in Zelda MM.
OpenGL depth and color buffers have different format, so
direct copy is impossible. Thus, special function for that special case
has been implemented.
2015-05-13 10:11:11 +06:00
Sergey Lipskiy
066ebc8b47 Enable DepthBuffer_FindBuffer function. 2015-05-13 10:11:11 +06:00
Sergey Lipskiy
6377b036d0 Add blend modes for Zelda MM LoT. 2015-05-13 10:11:10 +06:00
Sergey Lipskiy
380486ad51 Don't clear gSP.geometryMode on sprite microcodes initialization.
Zeldas use S2DEX2 microcode to render backgrounds and copy buffers.
Setting gSP.geometryMode to 0 may break current render state.
In particular, LoT in Zelda MM does not work because of it.
2015-05-13 10:11:09 +06:00
Sergey Lipskiy
cc3446c4d6 BindImageTexture fixes 2015-05-13 10:11:09 +06:00
Sergey Lipskiy
b0f17ef953 Add g_bN64DepthCompare parameter
If it is true, N64 depth compare algorithm is used instead of OpenGL depth buffer.
2015-05-13 10:11:08 +06:00
Sergey Lipskiy
344df93374 Rewrite depth texture clear. 2015-05-13 10:11:07 +06:00
Sergey Lipskiy
314b9098f4 Implement N64 depth compare.
Removed integer-based variant of depth texture.
2015-05-13 10:11:06 +06:00
Sergey Lipskiy
bf99ef2079 Fix colorImage.height calculation in FillRect 2015-05-13 10:11:06 +06:00