Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-11-04BGE Rasterizer Cleanup: Removing the need to reference KX_BlenderMaterial or ↵Mitchell Stokes
KX_PolygonMaterial in RAS_OpenGLRasterizer.
2013-10-11code cleanup: use const's for static arraysCampbell Barton
2013-08-17BGE: Adding partial support for LibLoaded lights with GLSL materials.Mitchell Stokes
Any GLSL materials loaded after lights are LibLoaded will now use the lights in heir shaders. This includes materials loaded from the same scene as the LibLoaded lights. We could later add a new flag to LibLoad to recompile all existing shaders, but this commit should offer a lot more flexibility as is.
2013-07-24BGE Fix [#29575] Object not drawn in game engineDaniel Stokes
Implementing a GetBlenderImage for KX_BlenderMaterial so that modifiers draw correctly in multitexture mode. The preexisting limitation of 1 texture per material on objects with modifiers in multitexture mode still exists.
2013-07-02add missing gpl headersCampbell Barton
2013-04-27BGE: Small fix to allow clip alpha to work with alpha shadows.Mitchell Stokes
2013-04-04Fix for [#34754] "Revision 55527 provokes glitchy GLSL shadow map rendering" ↵Mitchell Stokes
reported by Alain Ducharme. Per material uniforms and per object uniforms are now better separated.
2013-01-13BGE: Adding preliminary alpha shadow support for Simple shadow maps. They do ↵Mitchell Stokes
not work in the viewport nor do they work for Variance shadow maps.
2012-12-19BGE: Some as of yet unmerged work I did in the Swiss branch. These changes ↵Mitchell Stokes
include: * Cleaning up the conversion code to avoid a per-face material conversion. Materials are now stored in buckets and only converted if a new material is found. This replaces some of Campbell's earlier work on the subject. His work wasn't as thorough, but it was much safer for a release. * Shaders are only compiled for LibLoaded materials once. Before they could be compiled twice, which could really slow things down. * Refactoring the rasterizer code to use a strategy design pattern to handle different geometry rendering methods such as immediate mode, vertex arrays and vertex buffer objects. VBOs are added, but they will be disabled in a following commit since they are still slower than vertex arrays with display lists. However, VBOs are still useful for mobile, so it's good to keep them around. * Better multi-uv support. The BGE should now be able to handle more than two UV layers, which should help it better match the viewport.
2012-11-21py api cleanup, replace use...Campbell Barton
- PyLong_FromSsize_t --> PyLong_FromLong - PyLong_AsSsize_t --> PyLong_AsLong In all places except for those where python api expects PySsize_t (index lookups mainly). - use PyBool_FromLong in a few areas of the BGE. - fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
2012-11-11bge mesh conversion speedup, avoid calling ConvertMaterial() on every face.Campbell Barton
now do per material bucket.
2012-11-11game engine material conversion: don't use the material to convert vertex ↵Campbell Barton
colors, then extract back out (pre face).
2012-10-29style cleanupCampbell Barton
2012-10-22style cleanupCampbell Barton
2012-09-16style cleanupCampbell Barton
2012-08-03code cleanup: double promotion warningsCampbell Barton
2012-07-22style cleanupCampbell Barton
2012-07-14BGE: Better fix for the textures not working with custom shaders regression. ↵Mitchell Stokes
Now custom shaders work, and textures aren't uploaded twice for GLSL materials (my earlier fix had some bad logic).
2012-06-17style cleanup:Campbell Barton
also fix for building ghost test and fix double free in one of the tests
2012-06-17Fix for [#31848] "BGE: Commit r47628 breaks custom GLSL material shaders" ↵Mitchell Stokes
reported by Alex Fraser. Custom shaders is a case where the BGE can be using GLSL materials and still need to upload textures without bf_gpu. I tweaked some logic to handle this special case and added more comments.
2012-06-08Fixing a BGE bug where textures could get loaded into VRAM twice.Mitchell Stokes
2012-04-10fix [#30839] Blender crashes while open/close a scene and deletes .blend-fileCampbell Barton
2012-03-24style cleanup: follow style guide for/with/if spacingCampbell Barton
2012-03-14fix [#30493] GE crashes on exit because of using freed mtfaces from tessfacesCampbell Barton
prevent gpu_draw.c holding a pointer to a freed array.
2011-09-19TexFace to Material Settings big patchDalai Felinto
Summary: ======== The idea here is to move the texface options into the material panel. For images with the change please visit: http://code.blender.org/index.php/2011/09/bge-material-texface-changes 1 - Some of the legacy problems 2.49 and 2.5x has with the texface system: ========================================================================== 1.1) Shadow, Bilboard and Halo are mutual exclusive (in the code), yet you can select a face to be more than one mode. 1.2) Sort only works for blend Alpha yet it's an option regardless of the Transparency Blend you pick. 1.3) Shared doesn't affect anything in BGE. 1.4) ObColor only works for Text objects (old bitmap texts) when using Texture Face Materials. (not address yet, I so far ignored obcolor) 2 - Notes: ============ 2.1) Now "Use Face Textures" in material Option panel will work in Multitexture even if there is no texture channel. 2.2) In FaceTexture mode it will use TexFace all the time, even if you don't check the "Use Texture Face" option in the UI. It's a matter of decision, since the code for either way is there. I decided by the solution that makes the creation of a material fast - in this mode the user doesn't need to mess with textures or this "Use Texture Face" option at all. I'm not strong in my opinion here. But I think if we don't have this then what is the point of the Texture Face mode? 2.3) I kept references for tface only when we need the image, UV or the tiling setting. It should help later when/if we split the Image and UV layers from the tface struct (Campbell and Brecht proposal). 3 - Changes in a Nutshell: ========================== 3.1) "Texture Face" panel (in the Mesh/Object Data panel) no longer exists. Those settings are all part of the material properties, visible when Game Render is set. 3.2) "Texture Face" Shading mode (in the Render panel) is now called “Single Texture”, it needs a material for special settings (e.g. Billboard, Alpha Sort, …). 3.3) New options in the Material Panel * Shadeless option in the Material panel is now supported for all three Shading modes. * Physics is now toggleable, this is the old Collision option. * Two Side (on) is now called Back Culling (off). * Alpha Sort is one of the Alpha options, together (and mutually exclusive) to Alpha Blend, Alpha Clip, Add and Opaque (i.e. solid). * Shadow, Billboard and Halo are grouped in the “Face Orientation” property. * "Face Textures" and "Face Textures Alpha" (under Options) can be used for all but GLSL shading mode (to be supported in GLSL eventually). * The backend in the game engine is still the same as before. The only changes are in the interface and in the way you need to think your materials. The bottomline is: It’s no longer possible to share materials between faces that do not share the same game properties. 4 - Acknowledgment: ================== Mike Pan for the design discussions, and testing along the whole development process. Vitor Balbio for the first hands-on code with the interface changes. That helped me a lot to push me into work on that. Benoit Bolsee and Brecht van Lommel for patch review (* no one reviewed the whole patch, or the latest iteractions, so I still hold liability for any problems). Blender artists that gave feedback and helped testing the patch. Patch review and original documentation can be found here: http://wiki.blender.org/index.php/User:Dfelinto/TexFace http://codereview.appspot.com/4289041/
2011-09-01whitespace bge editsCampbell Barton
2011-08-25Committing patch #25675 "Make "Cast Buffer Shadows" option work in viewport ↵Mitchell Stokes
and BGE" by me. Description from the tracker: "It's really handy to be able to prevent an object/material from casting a shadow. So, I made use of the Cast Buffer Shadows option in the material settings, and made it work in the viewport and the BGE."
2011-02-25doxygen: gameengine/Ketsji tagged.Nathan Letwory
2010-10-31rename and negate DISABLE_PYTHON --> WITH_PYTHONCampbell Barton
2010-08-27own rna naming commits r31439 r31472 also renamed BGE vars unintentionallyCampbell Barton
2010-08-20rna data path names which are more likely to break animations.Campbell Barton
Added an operator "Update Animation Data", access from the search menu to update drivers and fcurves.
2010-08-16Py API (GSoC): Second merging commitJoerg Mueller
Rough summary of fixes/changes: - Blender Py API: GameLogic -> bge.logic - Blender Py API: Implemented missing KX_PYATTRIBUTE_TODOs and -DUMMYs. - Fix for [#22924] KX_PolygonMaterial.diffuse does not return expected list[r,g,b] - Py API: Renaming _owner attribute of mathutils classes to owner. - Fix some minor errors in mathutils and blf. - Enabling game engine autoplay again based on a patch by Dalai: * The biggest 3D view in the open scene is used, if there is none, blender opens the file normally and raises an error. * The 3D view are is made fullscreen. * Quad view, header, properties and toolbox panel are all hidden to get the maximum view. * If the game engine full screen setting is set, the game starts in fullscreen. - Fix for ipo conversion on file transition in the game engine.
2010-04-18remove config.h references, was added for automake build system rev around ↵Campbell Barton
124-126 but isnt used by any build systems now.
2009-11-25BGE: replace mesh works for Soft Body (including reinstantiation of physics ↵Benoit Bolsee
soft body mesh). Even a static mesh can be used as replacement: the mesh will be instantiated with the soft body settings of the object. The position and orientation of the soft body is preserved after the replacement. Known limitation: the velocity of the soft body is reset aftet the replacement. This is because soft body don't have a well defined velocity.
2009-09-30option to build the BGE without python, uses existing python check (cmake ↵Campbell Barton
and scons) when python is disabled videotextures are not built.
2009-08-172.5: Update GPU module to deal with removed G_TEXTUREPAINTBrecht Van Lommel
global, passing along enable/disable mipmap setting through various functions instead.
2009-08-10remove python2.x supportCampbell Barton
2009-08-01svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22075:22099Campbell Barton
2009-07-31remove more unneeded args, also allow ipo to animate the ref value for ↵Campbell Barton
KX_BlenderMaterial's
2009-06-29BGE PyAPI support for subclassing any BGE game type from python, scripters ↵Campbell Barton
define extra functions on gameObjects. Adding a UI to set the type on startup can be added easily. # ---- class myPlayer(GameTypes.KX_GameObject): def die(self): # ... do stuff ... self.endObject() # make an instance player = myPlayer(gameOb) # gameOb is made invalid now. player.die() # ---- One limitation (which could also be an advantage), is making the subclass instance will return that subclass everywhere, you cant have 2 different subclasses of the same BGE data at once.
2009-06-29BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.xCampbell Barton
2009-06-28BGE Python APICampbell Barton
Remove the last of the odd C++/python wrapper code from http://www.python.org/doc/PyCPP.html (~1998) * Use python subclasses rather then having fake subclassing through get/set attributes calling parent types. * PyObject getset arrays are created while initializing the types, converted from our own attribute arrays. This way python deals with subclasses and we dont have to define getattro or setattro functions for each type. * GameObjects and Scenes no longer have attribute access to properties. only dictionary style access - ob['prop'] * remove each class's get/set/dir functions. * remove isA() methods, can use PyObject_TypeCheck() in C and issubclass() in python. * remove Parents[] array for each C++ class, was only used for isA() and wasnt correct in quite a few cases. * remove PyTypeObject that was being passed as the last argument to each class (the parent classes too). TODO - * Light and VertexProxy need to be converted to using attributes. * memory for getset arrays is never freed, not that bad since its will only allocates once.
2009-06-092.50:Brecht Van Lommel
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD Notes: * Game and sequencer RNA, and sequencer header are now out of date a bit after changes in trunk. * I didn't know how to port these bugfixes, most likely they are not needed anymore. * Fix "duplicate strip" always increase the user count for ipo. * IPO pinning on sequencer strips was lost during Undo.
2009-05-31BGE: fix refcount bug causing crash with Object texture coordinates.Benoit Bolsee
2009-05-26BGE Py APICampbell Barton
- Deprecation warnings for using attribute access - Added dictionary functions to KX_GameObject and ListValue ob.get(key, default=None) ob.has_key(key) ob.has_key is important since there was no way to do something like hasattr(ob, "attr") which can be replaced by ob.has_key("attr") - (both still work of course). ob.get is just useful in many cases where you want a property if it exists but can fallback to a default. - CListValue::FindValue was adding a reference but the ~3 places it was used were releasing the reference. added a FindValue that accepts a const char* type to avoid converting python strings to STR_String.
2009-05-23BGE: fix memleaks.Benoit Bolsee
SCA_RandomActuator: The random generator was shared between replicas and not deleted. Added ref counting between replicas to allow deletion at the end. KX_Camera: The scenegraph node was not deleted for temporary cameras (ImageMirror and shadow), causing 500 bytes leak per frame and per shadow light. KX_GameActuator: Global dictionary buffer was not deleted after saving. KX_MotionState: The motion state for compound child was not deleted KX_ReplaceMeshActuator: The mesh was unnecessarily converted for each actuator and not deleted, causing large memleak. After these fix, YoFrankie runs without memleak.
2009-05-11BGE performance, 4th round: logicBenoit Bolsee
This commit extends the technique of dynamic linked list to the logic system to eliminate as much as possible temporaries, map lookup or full scan. The logic engine is now free of memory allocation, which is an important stability factor. The overhead of the logic system is reduced by a factor between 3 and 6 depending on the logic setup. This is the speed-up you can expect on a logic setup using simple bricks. Heavy bricks like python controllers and ray sensors will still take about the same time to execute so the speed up will be less important. The core of the logic engine has been much reworked but the functionality is still the same except for one thing: the priority system on the execution of controllers. The exact same remark applies to actuators but I'll explain for controllers only: Previously, it was possible, with the "executePriority" attribute to set a controller to run before any other controllers in the game. Other than that, the sequential execution of controllers, as defined in Blender was guaranteed by default. With the new system, the sequential execution of controllers is still guaranteed but only within the controllers of one object. the user can no longer set a controller to run before any other controllers in the game. The "executePriority" attribute controls the execution of controllers within one object. The priority is a small number starting from 0 for the first controller and incrementing for each controller. If this missing feature is a must, a special method can be implemented to set a controller to run before all other controllers. Other improvements: - Systematic use of reference in parameter passing to avoid unnecessary data copy - Use pre increment in iterator instead of post increment to avoid temporary allocation - Use const char* instead of STR_String whenever possible to avoid temporary allocation - Fix reference counting bugs (memory leak) - Fix a crash in certain cases of state switching and object deletion - Minor speed up in property sensor - Removal of objects during the game is a lot faster
2009-05-09More refcount errors spotted by Benoit, one with python getting a list item ↵Campbell Barton
so scene.objects["OBfoo"] would always mess up refcounts.
2009-05-07BGE performance, 3rd round: culling and rasterizer.Benoit Bolsee
This commit extend the technique of dynamic linked list to the mesh slots so as to eliminate dumb scan or map lookup. It provides massive performance improvement in the culling and in the rasterizer when the majority of objects are static. Other improvements: - Compute the opengl matrix only for objects that are visible. - Simplify hash function for GEN_HasedPtr - Scan light list instead of general object list to render shadows - Remove redundant opengl calls to set specularity, shinyness and diffuse between each mesh slots. - Cache GPU material to avoid frequent call to GPU_material_from_blender - Only set once the fixed elements of mesh slot - Use more inline function The following table shows the performance increase between 2.48, 1st round and this round of improvement. The test was done with a scene containing 40000 objects, of which 1000 are in the view frustrum approximately. The object are simple textured cube to make sure the GPU is not the bottleneck. As some of the rasterizer processing time has moved under culling, I present the sum of scenegraph(includes culling)+rasterizer time Scenegraph+rasterizer(ms) 2.48 1st round 3rd round All objects static, 323.0 86.0 7.2 all visible, 1000 in the view frustrum All objects static, 219.0 49.7 N/A(*) all invisible. All objects moving, 323.0 105.6 34.7 all visible, 1000 in the view frustrum Scene destruction 40min 40min 4s (*) : this time is not representative because the frame rate was at 60fps. In that case, the GPU holds down the GE by frame sync. By design, the overhead of the rasterizer is 0 when the the objects are invisible. This table shows a global speed up between 9x and 45x compared to 2.48a for scenegraph, culling and rasterizer overhead. The speed up goes much higher when objects are invisible. An additional 2-4x speed up is possible in the scenegraph by upgrading the Moto library to use Eigen2 BLAS library instead of C++ classes but the scenegraph is already so fast that it is not a priority right now. Next speed up in logic: many things to do there...
2009-04-29ifdef's for future py3 support, after this adding py3 can mostly be done ↵Campbell Barton
with defines or batch renaming funcs (with the exception of CListValue slicing) . No changes for py2.x.