Commit graph

222 commits

Author SHA1 Message Date
richard42
123e63e220 Update msvc11 project file to visual studio 2012 (msvc11) 2013-06-01 08:00:39 -07:00
richard42
a35e3dd2d9 removed -lstdc++ flag in makefile, I just need to use CXX=clang++ instead 2013-05-30 07:56:53 -07:00
richard42
060b8fe36e clang needs to link against libstdc++ 2013-05-29 08:49:47 -07:00
Richard Goedeken
f423bd239f 1. Update Core Video Extension API to v3.0.0, pass flag to VidExt_SetVideoMode() that we support resizing
2. New ResizeInitialize method in COGLGraphicsContext to do a partial re-initialization after OpenGL context is recreated following window resize
3. Add function (ResizeStep2) to asynchronously handle resized window
4. Update Video API to v2.2.0: add function ResizeVideoOutput()
2013-05-26 22:21:52 -07:00
Richard Goedeken
bcdb62c9be fix some new gcc warnings 2013-05-13 10:55:49 -07:00
Sven Eckelmann
cbd8a77542 Allow to statically set *_(CFLAGS|LIBS) without pkg-config
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
2013-05-11 15:00:09 +02:00
Sven Eckelmann
e895bfa957 Allow to statically set SDL_(CFLAGS|LIBS) without sdl-config
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
2013-05-11 12:26:28 +02:00
Sven Eckelmann
e20603f55f Enable Link-time optimization by default
The GCC introduced Link-time optimization in GCC 4.5 (2010-04-14). This should
be long enough available that interested users have upgraded to a compiler
supporting it.

The MSVC project already enabled WholeProgramOptimization since a long time.
Enabling it by default in GCC seems to be equally valid.
2013-05-11 11:26:02 +02:00
Sven Eckelmann
722892317b Add CXXFLAGS to the linker step
The GCC manual states for different parameters that the options for compilation
must also be used when linking. The options for compilation are stored in
CXXFLAGS and added to LINK.o to fix the behavior.

Option which need this are for example -fPIC/-fPIE or -flto.
2013-05-11 10:22:31 +02:00
littleguy77
ccd58ab0c9 Small fix to GL ES 2.0 codepath (less aggressive #ifdef exclusion). 2013-04-09 09:15:10 -04:00
Richard Goedeken
52e4e1551b fixed compiler warning and error 2013-04-06 22:11:09 -07:00
Metricity
79a035ff66 Use short-type vertex indices (rather than int-type).
Unsigned short vertex indices are more broadly supported across the
OpenGL variants.  This shouldn't change plugin behavior as long as it
isn't using any vertex arrays with more than 65,535 elements.
2013-04-02 10:33:19 -04:00
Metricity
f3f45a3c08 Implement OpenGL ES 2.0 code path.
Assert(no functional changes to OpenGL code path).

Originally implemented for Paul Lamb's (paulscode) Android port of
Mupen64Plus.

https://github.com/paulscode/mupen64plus-ae
http://www.paulscode.com
2013-04-02 10:32:21 -04:00
littleguy77
bc403c88a8 Surround OpenGL-specific code with SDL_VIDEO_OPENGL.
Assert(no functional changes).

Symbol defined in the platform-specific SDL headers (SDL_config*.h).

This is a lot of ifdefs, but the point here is to facilitate trace-
ability throughout the ES 2.0 integration process. The plan is to
beautify this code later, after we verify that the OpenGL codepath is
intact and the OpenGL ES 2.0 codepath behaves as intended.
2013-04-02 10:31:08 -04:00
littleguy77
6cbdbf57fa Add abstraction layer header for GL/GLES2.
Assert(no functional changes).

osal = Operating System Abstraction Layer

Following the naming convention used through the Mupen64Plus core and
plugins.  Simplifies merging the GL/GLES2 code bases.
2013-04-02 10:30:01 -04:00
littleguy77
4368f1d168 Cosmetic changes to clarify subsequent changesets.
Assert(no functional changes).

Benefit of hindsight here. I'm consolidating a bunch of non-functional
changes now to make subsequent changesets cleaner and easier to follow.

This commit only changes:
 - whitespace
 - header order in a few places
 - re-order a few lines related to glBegin
 - replace gl{En|Dis}able(GL_FOG) with TurnFogOnOff({true|false})
 - replace 1.0 with 1.0f in one place
2013-04-02 10:29:08 -04:00
Lioncash
b75ff4f297 Fix wrongly set return values in OGLCombinerNV.cpp (from what I've read in the in-file docs).
Comments for those specific branches seem to support this too.
2013-04-01 22:14:26 -04:00
Richard Goedeken
ba0350a999 fix apparent vertex index calculation bug found by Lioncash 2013-03-26 22:30:23 -07:00
Lioncash
8a37fbd873 Remove an identical check in the same if-statement.
TLutFmt is already checked in the 8-th conditional.
2013-03-22 19:37:54 -04:00
Lioncash
24ff8cc9f8 Ensure two if statements only get executed if pEntry->pTexture isn't null.
Before it would access pEntry->pTexture regardless.
2013-03-22 19:31:07 -04:00
Richard Goedeken
6dee3203ff merged heads 2013-03-21 21:35:39 -07:00
Richard Goedeken
1dac38de3b add msvc11 project file from mudlord 2013-03-20 22:26:56 -07:00
Metricity
da367692e6 Implement NO_ASM version of CRC calculation in Framebuffer.CalculateRDRAMCRC. 2013-03-19 20:19:52 -04:00
Richard Goedeken
bc144928e9 merged heads 2013-03-14 22:39:24 -07:00
Richard Goedeken
47341e3a20 fix YUV texture loading for Pocket Monsters Stadium (J) crc 665e8259 after bsmiles32 last fix to RSP plugin 2013-03-14 22:31:27 -07:00
Lioncash
16673849f7 Add missing NO_ASM block for texture crc calculation 2013-03-14 08:15:55 +01:00
Sven Eckelmann
8f939b218d Revert "Enable link time garbage collection when link time optimization is enabled"
Some linker on different platforms don't handle the garbage collection
correctly and create extreme bloated binaries. Therefore, leave it to the user
to enable this feature or not.
2013-03-14 08:08:23 +01:00
Richard Goedeken
1a638fb803 fixed compiler warning 2013-03-09 21:38:25 -08:00
Lioncash
bedb82229e Remove yet another redundant if-statement check.
Yet again, this is checked in an outer-scope if-statement
2013-03-06 22:37:58 -05:00
Lioncash
05deb4617f Removed a redundant if statement condition.
This is already checked in the if-statement before this one.
2013-03-06 22:34:42 -05:00
Lioncash
339fe53f06 Fixed a missing semicolon from the last commit. 2013-03-06 22:29:46 -05:00
Lioncash
16e488ca05 Clean up some of the source code formatting. 2013-03-06 22:17:48 -05:00
Sven Eckelmann
9e48093e0f Remove unresolvable symbol with disabled debugger 2013-02-17 17:52:50 +01:00
Richard Goedeken
fc4b00185a merged heads, fixing conflicts in src/TextureFilters.cpp 2013-02-03 09:59:10 -08:00
Richard Goedeken
c0626a9032 merged heads 2013-02-03 09:42:14 -08:00
richard42
e3116b7d2f OSX build fix 2013-02-02 22:24:04 -08:00
Sven Eckelmann
7019a53cc1 Use the found hires filename instead of regenerating it on load time
Hires textures in Glide64 can have fmt and size set to a wrong value and still
get loaded. Rice has to store the name of the filename when it got found to
allow it to load such wrong named textures. Otherwise it is part of the index
and on load it will fail to find the file again.
2013-01-30 20:35:48 +01:00
Sven Eckelmann
970f207a8d Enable link time garbage collection when link time optimization is enabled 2013-01-30 20:35:48 +01:00
Sven Eckelmann
f6a255bf25 Speed up initial png info loading by not loading the entire content
The loading of PNG files is usually CPU bound. This is caused by the filters
and compression used to reduce the size of the file. This operations aren't
necessary when the content is dropped directly after reading the image.

Only loading the PNG headers makes the loading of a complete hires texture
set nearly instant when the I/O is not limited.
2013-01-30 20:35:48 +01:00
Sven Eckelmann
93ef3da9a8 Ignore size and fmt in CRC to be able to load textures for Glide64
Glide64 ignores the fmt and size information stored in the name of the hires
texture when searching in its index of textures. Rice instead replaces the two
lower nibbles of the crc32 with the size and fmt information. This causes
problems when Rice tries to load texture from texture packs made especially for
Glide64.

The behavior of Rice is changed to find texture like Glide64. The option
LoadHiResCRCOnly can be set to False to restore the old behavior
2013-01-30 20:35:48 +01:00
Sven Eckelmann
25aae0f1c6 Use libpng to do load images as full (A)RGB images
The pngrw functionality for loading PNG files failed to load many texture
images because it didn't expect the bit depth and similar parameters. Rice only
needs 24/32 bit png files and therefore it is good enough to use the libpng
functionality to load all files as (A)RGB images.
2013-01-30 20:35:48 +01:00
Sven Eckelmann
64e3dfc016 Crop overlarge hires texture like Glide64
Texture packs developed with the focus on Glide64 seem to use too large texture
from time to time. Glide64 crops these textures correctly before they get
replaced.

Rice tend to just drop these textures. Cropping them in this context seems to
be more appropriate.
2013-01-30 20:35:48 +01:00
Sven Eckelmann
4447a578b8 Don't crash when invalid hires image was tried to load 2013-01-30 20:35:48 +01:00
lioncash
e308978f74 Fix a possible resource leak in TextureFilters.cpp for the Rice plugin. 2013-01-12 10:59:44 +01:00
lioncash
166b57c479 Clean up combiner.cpp and combiner.h for the RICE plugin. 2013-01-12 10:59:40 +01:00
lioncash
1cebbf48d9 Add more documentation to TextureFilters.cpp for gles2rice 2013-01-12 10:59:35 +01:00
lioncash
41b5db98d6 Replace tabs with spaces 2013-01-12 10:59:31 +01:00
Sven Eckelmann
78f004d2e0 Introduce WARNFLAGS for default (removable) compiler warning flags 2013-01-02 16:13:46 +01:00
Sven Eckelmann
08d0b7469d Use long long for pointers instead of long to avoid truncation on 64-bit Windows 2013-01-01 01:10:43 +01:00
Sven Eckelmann
436a1c4098 Disable PIC on MinGW to reduce warnings 2013-01-01 00:30:34 +01:00