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
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-25Cleanup: Nuke most of G.main from GPU code.Bastien Montagne
2018-06-17Cleanup: trailing space in source/gameengine/Campbell Barton
2017-05-11BGE: Use BLI's stringify instead of implementing it againSergey Sharybin
Will solve compilation error in 2.8.
2017-05-11Unifying access to GLEW from the Blender Game EngineDalai Felinto
Note: This is not about functionality, but about using the same stub file we are using in Blender for the game engine in blender2.8.
2017-05-02BGE: Fix silly typo that invalidates negative scaling camera feature.Benoit Bolsee
Negative scale on camera is a nice trick to invert render image on one axis at no extra CPU cost. It was implemented in the Decklink branch but I introduced a typo when porting it to master. It is now fixed.
2016-10-01Fix T49520: broken vertex colors in the game engine.Brecht Van Lommel
2016-07-02Cleanup: comment blocksCampbell Barton
2016-07-01BGE: Display Hardware infos only in standalone.Ulysse Martin
This patch moves the PrintHardwareInfo() function in standalone only, not in embedded. Why? Because you can need this infos for debugging purpose in "compiled" blender files but it was boring to have it displayed each time you launched embedded. So you can have this infos when you click standalone or when you run your executable app from a console. Reviewers: moguri, kupoman, panzergame.
2016-06-18Cleanup: style, whitespace, doxy filepathsCampbell Barton
2016-06-11BGE: Various render improvements.Benoit Bolsee
bge.logic.setRender(flag) to enable/disable render. The render pass is enabled by default but it can be disabled with bge.logic.setRender(False). Once disabled, the render pass is skipped and a new logic frame starts immediately. Note that VSync no longer limits the fps when render is off but the 'Use Frame Rate' option in the Render Properties still does. To run as many frames as possible, untick the option This function is useful when you don't need the default render, e.g. when doing offscreen render to an alternate device than the monitor. Note that without VSync, you must limit the frame rate by other means. fbo = bge.render.offScreenCreate(width,height,[,samples=0][,target=bge.render.RAS_OFS_RENDER_BUFFER]) Use this method to create an offscreen buffer of given size, with given MSAA samples and targetting either a render buffer (bge.render.RAS_OFS_RENDER_BUFFER) or a texture (bge.render.RAS_OFS_RENDER_TEXTURE). Use the former if you want to retrieve the frame buffer on the host and the latter if you want to pass the render to another context (texture are proper OGL object, render buffers aren't) The object created by this function can only be used as a parameter of the bge.texture.ImageRender() constructor to send the the render to the FBO rather than to the frame buffer. This is best suited when you want to create a render of specific size, or if you need an image with an alpha channel. bge.texture.<imagetype>.refresh(buffer=None, format="RGBA", ts=-1.0) Without arg, the refresh method of the image objects is pretty much a no-op, it simply invalidates the image so that on next texture refresh, the image will be recalculated. It is now possible to pass an optional buffer object to transfer the image (and recalculate it if it was invalid) to an external object. The object must implement the 'buffer protocol'. The image will be transfered as "RGBA" or "BGRA" pixels depending on format argument (only those 2 formats are supported) and ts is an optional timestamp in the image depends on it (e.g. VideoFFmpeg playing a video file). With this function you don't need anymore to link the image object to a Texture object to use: the image object is self-sufficient. bge.texture.ImageRender(scene, camera, fbo=None) Render to buffer is possible by passing a FBO object (see offScreenCreate). bge.texture.ImageRender.render() Allows asynchronous render: call this method to render the scene but without extracting the pixels yet. The function returns as soon as the render commands have been send to the GPU. The render will proceed asynchronously in the GPU while the host can perform other tasks. To complete the render, you can either call refresh() directly of refresh the texture to which this object is the source. Asynchronous render is useful to achieve optimal performance: call render() on frame N and refresh() on frame N+1 to give as much as time as possible to the GPU to render the frame while the game engine can perform other tasks. Support negative scale on camera. Camera scale was previously ignored in the BGE. It is now injected in the modelview matrix as a vertical or horizontal flip of the scene (respectively if scaleY<0 and scaleX<0). Note that the actual value of the scale is not used, only the sign. This allows to flip the image produced by ImageRender() without any performance degradation: the flip is integrated in the render itself. Optimized image transfer from ImageRender to buffer. Previously, images that were transferred to the host were always going through buffers in VideoTexture. It is now possible to transfer ImageRender images to external buffer without intermediate copy (i.e. directly from OGL to buffer) if the attributes of the ImageRender objects are set as follow: flip=False, alpha=True, scale=False, depth=False, zbuff=False. (if you need to flip the image, use camera negative scale)
2016-03-13Full Inverse-Quadratic-Equation Lamp FalloffJack Andersen
This patch adds a new `falloff_type` ('Inverse Coefficients') for Lamps in Blender-Internal and GLSL. The current falloff modes use a formula like this inverse-square one: `I = E × (D^2 / (D^2 + Q × r^2))` While such a formula is simple for 3D-artists to use, it's algebraically cumbersome to work with. Game-designers authoring their own shaders could benefit much more by having direct control of falloff-coefficients: `I = E × (1.0 / (coefC + coefL × r + coefQ × r^2))` In this mode, the `distance` parameter is unused (except for 'Sphere' mode); instead relying on the designer to mathematically-model the falloff-behavior. The UI has been patched like so: {F153843} Reviewers: brecht, psy-fi Reviewed By: psy-fi Subscribers: brita_, antidote, campbellbarton, psy-fi Differential Revision: https://developer.blender.org/D1194
2016-03-11BGE: Fix memory leak in VBO codeMitchell Stokes
2016-03-01UPBGE: Fix light visibilityUlysse Martin
2016-01-28cleanup: spelling, comments, alignmentMike Erwin
fixed pet peeve “frustrum” and other non-functional changes.
2016-01-17BGE: Allow access to light shadow settings with pythonUlysse Martin
This patch adds a new API which allow us to access light shadow settings from python. The new API can be used to write custom GLSL materials with shadows. Reviewers: brecht, kupoman, agoose77, panzergame, campbellbarton, moguri, hg1 Reviewed By: agoose77, panzergame, campbellbarton, moguri, hg1 Projects: #game_engine Differential Revision: https://developer.blender.org/D1690
2016-01-04Remove SCons building systemSergey Sharybin
While SCons building system was serving us really good for ages it's no longer having much attention by the developers and started to become quite a difficult task to maintain. What's even worse -- there started to be quite serious divergence between SCons and CMake which was only accumulating over the releases now. The fact that none of the active developers are really using SCons and that our main studio is also using CMake spotting bugs in the SCons builds became quite a difficult task and we aren't always spotting them in time. Meanwhile CMake became really mature building system which is available on every platform we support and arguably it's also easier and more robust to use. This commit includes: - Removal of actual SCons building system - Removal of SCons git submodule - Removal of documentation which is stored in the sources and covers SCons - Tweaks to the buildbot master to stop using SCons submodule (this change requires deploying to the server) - Tweaks to the install dependencies script to skip installing or mentioning SCons building system - Tweaks to various helper scripts to avoid mention of SCons folders/files as well Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit Reviewed By: campbellbarton, juicyfruit Differential Revision: https://developer.blender.org/D1680
2016-01-03Get rid of three needless instances of DM_DRAW_OPTION_NO_MCOL.Antony Riakiotakis
It would be good to get rid of this entirely, ideally decision about mcols can be taken at material level and not done per face. More work needs to be done for that to work though.
2015-12-27OpenGL: stipple support added to basic GLSL shaderAlexander Romanov
The is intended to replace the deprecated glPolygonStipple() calls with a shader based alternative, once we switch over to GLSL shaders. Reviewers: brecht Differential Revision: https://developer.blender.org/D1688
2015-12-16BGE clean up: use float version of trigonometric functionsJorge Bernal
2015-12-15use float (not double) for font matrixMike Erwin
Following up on recent double --> float commits in the game engine.
2015-12-13BGE Rasterizer clean up: double-promotion warningsJorge Bernal
2015-12-13BGE: Use float as default instead of double in Moto library.Porteries Tristan
Use float in moto instead of double for MT_Scalar. This switch allow future optimization like SSE. Additionally, it changes the OpenGL calls to float versions as they are very bad with doubles. Reviewers: campbellbarton, moguri, lordloki Reviewed By: lordloki Subscribers: brecht, lordloki Differential Revision: https://developer.blender.org/D1610
2015-12-08OpenGL: split off framebuffer, shader and texture code into separate files.Brecht Van Lommel
2015-12-08OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not ↵Brecht Van Lommel
need it.
2015-12-08BGE code cleanup: Removing RAS_GLExtensionManager.Mitchell Stokes
This class did nothing but print out extensions if they were found. Instead, the code from bge.logic.PrintGLInfo() is now printed as the Rasterizer is initialized. This gives better information, and it removes some GL code from KX_PythonInit.cpp (the PrintGLInfo method now calls the Rasterizer to print the information). Differential Revision: https://developer.blender.org/D438
2015-12-08OpenGL/BGE: Remove RAS_StorageIM (glBegin/glEnd rendering of mesh data)Mitchell Stokes
The only use we had for RAS_StorageIM was to render derived meshes using Blender's mesh drawing. This is now handled as a special case in RAS_OpenGLRasterizer instead of in RAS_StorageIM. We are now left with RAS_StorageVA and RAS_StorageVBO. At the moment vertex arrays are still the default since our vertex array with display lists implementation is still much faster than our VBO code in a lot of cases. As we improve our VBO code, we can drop vertex arrays since Blender's minimum OpenGL version is being bumped up to 2.1, which supports VBOs.
2015-12-08BGE: Remove RAS_IRasterizer::IndexPrimitivesMulti()Mitchell Stokes
The work that was being done in IndexPrimitiveMulti() is now done by IndexPrimitive() and we always assume multitexture support.
2015-11-24BGE: Save screenshots in a different threadSybren A. Stüvel
This patch allows the game engine to keep running while performing things like PNG compression and disk I/O. As an example, my crowd simulation rasterizer saves a screenshot for every frame. This now takes up 13 msec per frame, which was 31 msec before this patch. Effectively, it allows the simulation to save every frame and still run at 60 FPS. Reviewers: lordloki, moguri, panzergame Reviewed By: moguri, panzergame Projects: #game_engine Differential Revision: https://developer.blender.org/D1507
2015-10-27BGE: Fix T43218: Text of framerate and profile glitch in Multitexture shadingUlysse Martin
Fix T43218: Text of framerate and profile glitch in Multitexture shading Reviewers: lordloki, panzergame Reviewed By: panzergame Subscribers: medved Projects: #game_engine Maniphest Tasks: T43218 Differential Revision: https://developer.blender.org/D1536
2015-10-07BGE : Collision mask support in raycast + and raycast cleanup.Porteries Tristan
I have removed the m_pHitObject, m_xray and m_testPropName and replace them by a temporary struct "RayCastData" which contains these datas and a collision mask. Finally i add a collision mask argument in the python function "rayCast" : ``` rayCast(to, from, dist, prop, face, xray, poly, mask) ``` It can be useful to hit only object which are on the right colision layer. for example if you have hitbox for a charater or vehicle you don't want to hit it with raycast. test file : {F237337} left mouse click on two planes and see console messages. Somewhat more elaborate test file by @sybren: {F237779} Look around and click on the cubes. One cube lamp responds, the other doesn't, based on their collision groups. Reviewers: moguri, hg1, agoose77, campbellbarton, sybren Reviewed By: agoose77, campbellbarton, sybren Subscribers: campbellbarton, sergey, blueprintrandom, sybren Projects: #game_engine, #game_physics Differential Revision: https://developer.blender.org/D1239
2015-09-20Fix compiling with GEJulian Eisel
Enabled Freestyle instead of GE :| Sry
2015-09-20Cleanup: Use new vector transform functionsJulian Eisel
2015-09-08Fix T45981: BGE, 2D filters leak memoryCampbell Barton
2015-08-22Cleanup: spellingCampbell Barton
2015-08-06Cleanup: whitespaceCampbell Barton
2015-08-04SCons: Fix for really nasty bug with polluting configuration environmentSergey Sharybin
The issue was caused by the following construction: def = env['SOMETHING'] defs.append('SOMETHING_MORE') Since first assignment was actually referencing environment option it was totally polluted hawing weird and wonderful side effects on all other areas of Blender.
2015-07-27BGE: Fix T19241: draw debug shape with overlay/background scene.Porteries Tristan
It's for the function render.drawLine and physics debug.
2015-07-20OpenSubdiv: Commit of OpenSubdiv integration into BlenderSergey Sharybin
This commit contains all the remained parts needed for initial integration of OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU backends which works in the following way: - When SubSurf modifier is the last in the modifiers stack then GPU pipeline of OpenSubdiv is used, making viewport performance as fast as possible. This also requires graphscard with GLSL 1.5 support. If this requirement is not met, then no GPU pipeline is used at all. - If SubSurf is not a last modifier or if DerivesMesh is being evaluated for rendering then CPU limit evaluation API from OpenSubdiv is used. This only replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG structures exactly the same as they used to be for ages now. This integration is fully covered with ifdef and not enabled by default because there are several TODOs to be solved first: - Face varying data interpolation is not really cleanly implemented for GPU in OpenSubdiv 3.0. It is also not implemented for limit evaluation API. This basically means we'll have really hard time supporting UVs. - Limit evaluation only works with adaptivly subdivided meshes so far, which basically means all the points of CCG are pushed to the limit. This gives different result from old code. - There are some serious optimizations possible on the topology refiner creation, which would speed up initial OpenSubdiv mesh creation. - There are some hardcoded asumptions in the GPU and DerivedMesh areas which could be generalized. That's something where Antony and Campbell can help, making it so the code is structured in a way which is reusable by all planned viewport projects. - There are also some workarounds in the dependency graph to make sure OpenGL buffers are only freed from the main thread. Those who'll be wanting to make experiments with this code should grab dev branch (NOT master) from https://github.com/Nazg-Gul/OpenSubdiv/tree/dev There are some patches applied in there which we're working on on getting into upstream.
2015-07-14Move from MTFace to MTexPoly w/ texture checksCampbell Barton
Part of moving away from MFace.
2015-07-12BGE Clean-up: New EXP prefix for the BGE Expression moduleJorge Bernal
The expression module now uses an EXP prefix and it follows a distribution similar to blender. Additionally the hash function in EXP_HashedPtr.h was simplified and the files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused. Reviewers: campbellbarton, moguri, sybren, hg1 Projects: #game_engine Differential Revision: https://developer.blender.org/D1221
2015-07-03BGE: Add integer uniforms for 2D FilterThomas Szepe
Actually it is only possible to pass float properties to a 2D filter (GLSL fragment shader). This patch allows also to use integer properties for the 2D filter. Reviewers: sybren, agoose77, kupoman, moguri, lordloki, panzergame Reviewed By: lordloki, panzergame Projects: #game_engine Differential Revision: https://developer.blender.org/D1370
2015-06-29Fix 73841 : Game Engine - Camera Lens ShiftDalai Felinto
This is essential for video projection, and the alternative until now was to manually change the projection matrix via Python. ( http://www.blender.org/manual/game_engine/camera/introduction.html#camera-lens-shift - this page will be removed as soon as I commit this) Also this is working for perspective and orto cameras BUT if the sensor is not AUTO it will only look correct in blenderplayer (this is an unrelated bug, but just in case someone runs into it while testing this, now you know why you got the issue). Kudos for the BlenderVR project for supporting this feature development. Differential Revision: https://developer.blender.org/D1379
2015-06-20BGE: Fix T38030: wrong vertex index returned by KX_PolyProxyPorteries Tristan
Fix T38030. In c++ source we use one list for triangles and an other for quads, but KX_PolyProxy doesn't care about that and return the vertex offset in its list. So we just have to compute the offset of each RAS_DisplayArray to its previous to have an absolute vertex index. Reviewers: moguri, campbellbarton, kupoman, agoose77, brita_, hg1 Reviewed By: agoose77, hg1 Projects: #game_engine Maniphest Tasks: T38030 Differential Revision: https://developer.blender.org/D1324
2015-05-17BGE: Fix T43761 No re-creation of display list after a mesh modification.Porteries Tristan
I also removed unused flags in RAS_ListRasterizer.cpp.
2015-04-27Fix T44464: Viewport mipmaps no longer toggle offCampbell Barton
2015-04-07BGE: New API method getDisplayDimensionsThomas Szepe
This patch adds a new API function to get the actual display dimensions in pixels. Reviewers: dfelinto, sybren, lordloki, moguri Reviewed By: lordloki, moguri Differential Revision: https://developer.blender.org/D648
2015-03-24BGE: Code clean up for world (mist, background, ambient)Thomas Szepe
Code clean up for BGE world mist, background and global ambient color. Move mist render update to BlenderWolrdInfo Reviewers: moguri, brecht Reviewed By: moguri, brecht Differential Revision: https://developer.blender.org/D152
2015-03-23BGE: Add setMistType and setMistIntensity API.Thomas Szepe
This patch adds the missing setMistType() and setMistIntensity() to the API Reviewers: campbellbarton, brecht, moguri Reviewed By: campbellbarton, brecht, moguri Subscribers: campbellbarton, dingto Differential Revision: https://developer.blender.org/D149
2015-03-23BGE: Multitexture world (mist, ambient) fixThomas Szepe
This patch fix the existing word API for mist and global ambient lighting. Add deprecated message to disableMist() Add setUseMist(enable). Reviewers: dfelinto, campbellbarton, moguri Reviewed By: moguri Subscribers: solarlune, jta, brecht Projects: #bf_blender:_next Differential Revision: https://developer.blender.org/D148