Commit Graph

24 Commits

Author SHA1 Message Date
2b0613b948 Fix: GPU_shader_export fails /w some lamp attrs
first/last vars missed some values.

D1309 by @NHA
2015-05-21 08:48:21 +10:00
c73693d4a5 BGE: Fix T43592: World GLSL
This patch will fix the world GLSL (mist, background, ambient) update for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Subscribers: panzergame

Differential Revision: https://developer.blender.org/D151
2015-03-23 22:32:49 +01:00
915235c87a Cleanup: unused headers 2014-11-28 22:16:14 +01:00
7d040d2a08 Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r 2014-11-16 13:57:58 +01:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
abf551b1a5 style cleanup: py api 2012-03-26 20:41:54 +00:00
70d3d1aca6 style cleanup: py/capi 2012-03-16 21:39:56 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
c4e7cc3287 fix for leak in gpu.export_shader(), wasnt freeing the function.
also change the bmesh iterator so its possible to initialize without stepping.
2012-02-20 22:04:29 +00:00
96bd647c4f split some >120 lines, no functional changes 2011-12-21 22:56:06 +00:00
9c9099a805 formatting edits in py api, no functional changes 2011-12-18 08:50:06 +00:00
965c287630 fixes scale on derivative maps 2011-12-09 23:26:06 +00:00
2b939904ab documentation - brief descriptions for bpy api files. 2011-11-05 08:21:12 +00:00
565fcd8907 fix for error in gpu.export_shader() was missing *4 (only writing 1/4 of the colorband) 2011-10-28 08:53:00 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
276e5f7095 formatting edits & remove debug print. 2011-10-13 01:29:08 +00:00
2222f536f8 use replace 0 with NULL for pointers, set some functions static
also fixed own errors in recent static check commit.
2011-09-16 08:20:21 +00:00
0128218254 recast and detour patch now builds again with GCC
- rearrange structs to work for 64bit
- define all vars before goto's
- ifdefs for qsort_r/qsort_s
- dont cast pointers to int only for NULL checks
- dont printf STR_String directly, get the char pointer from it

also minor change to gpu py module, no need to pass empty tuple to PyObject_CallObject, can just be NULL
2011-09-10 03:07:26 +00:00
5fc9baa962 warning fixes 2011-09-09 13:46:47 +00:00
01744abd81 GPU: add gpu python module with export_shader() function to export GLSL shader.
shader = gpu.export_shader(scene,material) 

Returns the GLSL shader that blender generates to produce the visual effect
of material in scene for the purpose of reusing the shader in an external engine.
This function is meant to be used in a material exporter so that the GLSL
shader can be exported entirely. The return value is a dictionary containing the
shader source code and all associated data. 

The full documentation is under sphinx.

Warning: there has been an API between the patch and this commit:
uniform['lamp'] and uniform['image'] now return python reference to 
ID block instead of ID name as before. The X3D exporter that uses this
function must be adapted.
2011-09-09 11:55:38 +00:00