Commit Graph

1182 Commits

Author SHA1 Message Date
Alexander Szpakowski 808a09f786 Changed shader source list from a vector of sources to a map of shader types to source codes 2013-01-07 19:13:19 -04:00
Alexander Szpakowski b6088115c9 Changed some variable names to be more descriptive 2013-01-07 18:26:41 -04:00
Alexander Szpakowski 609ef2c4e4 Format luaL_error strings properly in ShaderEffect lua wrapper code 2013-01-07 06:39:33 -04:00
Alexander Szpakowski 88af7239c3 Removed unnecessary tabs from empty lines 2013-01-07 06:21:15 -04:00
Alexander Szpakowski 0968fa6f11 More cleanup and some overdone comments 2013-01-05 15:59:01 -04:00
Alexander Szpakowski 37191a5953 Minor cleanup 2013-01-04 05:05:25 -04:00
Alexander Szpakowski dcf9825226 Uniform value defines now exist in both the vertex and fragment shaders 2013-01-04 01:45:46 -04:00
Alexander Szpakowski c13b1fb03b Changed vertex shader callback function name from 'transform' to 'position', added more vertex shader defines (some to make it easier to eventually have a GLES2 backend), hopefully updated Visual Studio project with changed filenames 2013-01-04 01:20:38 -04:00
Alexander Szpakowski 6560019829 opengl graphics module files now always include OpenGL.h rather than GLee.h 2013-01-01 17:54:14 -04:00
Alexander Szpakowski 9143442448 Add internal support for tesselation control and evaluation shaders (not that they'll ever be used), now that GLee has definitions for them 2013-01-01 04:39:33 -04:00
Alexander Szpakowski a18b353e62 Update GLee to latest available version (supports extensions and versions up to when OpenGL 4.2 was released, old GLee only had GL3.0 support) 2013-01-01 04:29:41 -04:00
Alexander Szpakowski da661e8e2f Bind texture id 0 (no texture) instead of disabling/re-enabling texturing entirely, when drawing graphics primitives. This both allows shaders to potentially use their own textures when drawing textureless primitives, and reduces overhead caused by constant GL state changes when drawing many graphics primitives. 2013-01-01 04:08:30 -04:00
Alexander Szpakowski 8bae828924 Don't override texture binding check when calling bindTexture with a texture id of 0 2013-01-01 04:03:26 -04:00
Alexander Szpakowski 15a1fd3552 Re-added "pixeleffect" graphics isSupported string for compatibility 2012-12-31 06:18:43 -04:00
Alexander Szpakowski d62878fbb8 Use GLSL #line preprocessor directive instead of manually trying to convert error message lines; flag shader objects for lazy-deletion after linking with program object instead of detaching them immediately (debuggers can now view source code of shader programs) 2012-12-28 21:32:13 -04:00
Alexander Szpakowski f54c270042 minor cleanup and fixes 2012-12-24 17:07:29 -05:00
Alexander Szpakowski 3047321e71 Use initializer list copy constructor instead of per-element copying for shader source list in ShaderEffect constructor 2012-12-23 00:29:23 -04:00
Alexander Szpakowski 83204c5dc5 ShaderEffects now take a dynamically sized list of source codes instead of one vertex and one fragment shader string 2012-12-22 22:47:07 -04:00
Alexander Szpakowski b55de47fb9 misc cleanup 2012-12-22 05:37:34 -04:00
Alexander Szpakowski 0c525ebb92 shaders now use a static vector of counters for each texture unit to help keep track of completely free texture units 2012-12-22 01:35:36 -04:00
Alexander Szpakowski 79fa42d207 made ShaderEffects individully handle texture units for sent images/canvases, added GL helper function for quickly binding a texture to a specific texture unit, hopefully made ShaderEffects load and unload volatile better 2012-12-22 00:29:11 -04:00
Alexander Szpakowski 16f925affa improved GL texture binding api to take texture units into consideration 2012-12-21 20:35:32 -04:00
Alexander Szpakowski 5626b74b79 reduced unnecessary usage of glUseProgram, shadereffect is now properly detached in unloadVolatile and reattached if necessary in loadVolatile, made current and max texture units static to prevent different shaders from overwriting the value of different texture units 2012-12-21 17:43:47 -04:00
Alexander Szpakowski 5252ed28cd changed shadereffect texture image unit counter and map to be non-static, get max texture units from max combined TIUs instead of max fragment shader TIUs, added the current MVP matrix as an argument to the vertex shader transform function, reduced code duplication in ShaderEffect::sendImage and sendCanvas 2012-12-21 05:03:50 -04:00
Alexander Szpakowski 0611234067 changed PixelEffect name to ShaderEffect, added lua-side support for vert/frag shader combinations with love.graphics.newShaderEffect, added tentative support for single-file vertex+fragment shaders 2012-12-20 21:51:31 -04:00
Alexander Szpakowski 28e3b105e9 added C++side support for combinations of vertex and fragment shaders in pixeleffects 2012-12-20 03:42:48 -04:00
Alexander Szpakowski a8dc813258 Text drawing performance improvements (issue #532) 2012-12-15 22:18:40 +01:00
Bart van Strien 68a895e7c6 Catch errors in love.font.newRasterizer, add luax_pconvobj which pcalls, allowing love.graphics.newFont to clean up before re-erroring 2012-12-15 14:26:46 +01:00
Bart van Strien 82ea98aa65 Disable Data:getPointer (issue #520) 2012-12-15 14:13:23 +01:00
Bart van Strien b10ff8da42 Apply patch that fixes File:read from reading too much (on EOF) (bug #530) 2012-12-15 13:58:34 +01:00
vrld 62e2c752e5 More verbose VertexIndex::getType() (using numeric_limits) 2012-12-01 14:00:05 +01:00
vrld b0abcbda71 Fix: Returning wrong type in VertexIndex::getType() 2012-11-28 16:14:10 +01:00
vrld 8bbf68c69c Match types in VertexIndex::getType() 2012-11-28 16:01:04 +01:00
vrld dcfc18192d Fix issue #494: Source:getDistance doesn't work 2012-11-23 10:24:15 +01:00
vrld b2f1408b12 Fix issue #495: Large spritebatches doesn't render properly 2012-11-23 10:23:44 +01:00
vrld 7c2889afae Fix issue #514: Redundant if-clause in ImageData::paste 2012-11-23 09:12:07 +01:00
vrld 6882c2c32c Close issue #519: Maximum stack depth reached error message. 2012-11-23 09:08:36 +01:00
vrld c782093374 Intel gets their way 2012-11-22 21:24:43 +01:00
vrld a35b4232e1 Use opengl buffer ARB constistently in VertexBuffer. 2012-11-22 21:07:35 +01:00
vrld 6ffb9d28f0 VertexBuffer/SpriteBatch speed tweaks.
- VertexBuffer holds permanent copy of the vertex data and is only read from
  GPU memory was written outside a sb:bind()/sb:unbind() pair.

- "Orphan" the current GPU buffer on unmap() before uploading the changed data
  to the GPU to avoid implicit synchronisation lags.
2012-11-22 20:59:47 +01:00
Bart van Strien 4de936ed75 Fix love.physics.getDistance 2012-11-19 21:10:28 +01:00
Bart van Strien d24c0344c8 Make second argument to setDefaultImageFilter Image:setFilter and Image:setWrap optional, and default to the first 2012-11-18 19:18:37 +01:00
Bart van Strien 3a47bafd41 Add Source:isPlaying 2012-11-18 19:01:51 +01:00
Bart van Strien 94516e2290 Catch possible exceptions thrown when locking a SpriteBatch twice 2012-11-18 18:48:37 +01:00
rude 54498ce378 Apply slime73's ParticleSystem patch. 2012-11-18 11:02:30 +01:00
rude 2149ecdf44 Use "L" to force wide literal string.
If multi-byte character set is chosen, TEXT() does not produce a wide string,
causing compilation errors.
2012-11-18 10:53:17 +01:00
vrld 31f98ebf52 Fix #234 again. Of course this means the texture coordinates are flipped
again...
2012-10-18 13:29:13 +02:00
vrld f3bf2bbfe5 Fix bug where the compat message crashed love.
If in conf.lua `t.screen' is set to false or nil, the OpenGL context will not
be initialized, leading to a crash in 'Font::print()' when printing the compat
message later on.
2012-10-17 18:36:32 +02:00
vrld 6c850fdc98 Possibly (code in issue does not fail on my machine) fix #486. Please test. 2012-10-15 17:13:08 +02:00
Bart van Strien 9a15ca3998 Update changelog a bit 2012-10-14 17:41:12 +02:00