Age | Commit message (Collapse) | Author |
|
|
|
|
|
need it.
|
|
FBOs are a GL 3.0 feature but enjoy nearly universal support via
extensions.
The newer ARB extension brings these features to GL 2.1 without needing
an ARB suffix.
The older EXT extensions *do* use a suffix. Since we don’t know which
is used until runtime, I added the suffix to all functions & enums.
Also updated the check to look for the FBO feature set instead of the
specific EXT extension.
|
|
Maybe this is pedantic but I read it’s best to explicitly set the
desired component size.
Also append “_ARB” to float texture formats since those need an
extension in GL 2.1.
|
|
+ minor cleanup
|
|
Is current context compatible with legacy GL (version 2.1)?
My earlier approach -- checking for GLEW_ARB_compatibility -- was not
enough.
This should always return true if we set our GL context up properly. It
will return false when we switch to core profile.
|
|
|
|
Differential Revision: https://developer.blender.org/D1645
|
|
Differential Revision: https://developer.blender.org/D1645
|
|
|
|
|
|
|
|
|
|
Restore fixed function lighting code for now and control use of GLSL shader
with a variable, make light types more clear, reduce state changes, some other
minor tweaks.
|
|
|
|
scan, thanks...errr.
|
|
|
|
GPU_buffer no longer has a fallback to client vertex arrays, so remove
comments about it.
Changed a few internal structs/function interfaces to use bool where
appropriate.
Use for-loop scope and flexible declaration placement. PBVH does the
same thing but needs ~150 fewer lines to do it!
The change to BLI_ghashIterator_init is admittedly hackish but makes
GHASH_ITER_INDEX nicer to use.
|
|
Was almost certainly being compiled out anyway, but now we don’t have
to read it!
|
|
Differential Revision: https://developer.blender.org/D1638
|
|
In gpu lib:
- GPU_glsl_support() always returns true
- internal cleanup & comments
Outside gpu lib:
- remove check from various code, remove the “else” path
- sprinkled a few C99-isms
We can remove GPU_glsl_support() when BGE stops calling it.
|
|
Input array length is implicitly set at link time, based on the geometry
shader's layout. Specifying the wrong value here is an error; specifying
no value is the same as getting it right. (inspired by a recent codegen
change)
|
|
Mostly glBlendFunc related.
|
|
|
|
|
|
|
|
|
|
My earlier fix for GL >= 3 on Windows broke it. Should work for both
platforms now.
|
|
Formatting of generated GLSL code:
- attribute/varying for version 120
- in/out for version 130+
- minor cosmetic stuff
Tested working on Windows 10, GL 4.3.
|
|
|
|
Fix GLSL version & geometry shader support query to consider core vs
compatibility.
All shaders need to be compatible with each other, and for now that
means GLSL 120. For drivers that support compatibility profiles, choose
the highest available (up to 150). If only core profile is supported,
max out at GLSL 130.
|
|
|
|
Several changes. Tested working on Windows 10 GL 4.3 and MacOS 10.11 GL
2.1.
- document extensions used in this file
- some simple ARB/EXT suffix deletion
- stop checking for pre-2.1 features — they’re available!
- convert old ARB shader API to the one adopted in GL 2.0
- remove checks for old (pre-R600) ATI cards
- choose GLSL version at runtime, between 1.2 and 1.5
- prefer GLSL 1.5 for geometry shaders, fall back to
EXT_geometry_shader4 if needed
Differential Revision: https://developer.blender.org/D1632
|
|
GPUBuffer rendering is now done using vertex buffers.
Vertex arrays are completely removed from GL 3.2 core profile, so we'll
have to do this change at some point anyway.
This commit, though big, is not modifying blender in any way. Use should
be exactly as if the vetex buffer option is constantly on.
|
|
simple stuff!
- remove ARB suffix from core functions & enums
- remove checks for core features (VBOs, generic attribs)
- keep checks for non-core features (draw elements base vertex)
|
|
|
|
|
|
Needed to check if scaled-multisample-blit is supported.
|
|
This expose the capability of handling offscreen drawing. The initial
support lays the barebones for addons to work with framebuffer objects
and implement 3d viewport offscreen drawing. This can be used by script
writers to make fisheye lens preview, head mounted display support, ...
The complete documentation is here: http://www.blender.org/api/blender_python_api_2_76_1/gpu.offscreen.html
Review and many changes by Campbell Barton (thank you :)
https://developer.blender.org/D1533
|
|
Used for reading off-screen buffers,
possible cause of failure for drivers that don't support it.
|
|
Also use gcc style file:line: syntax for errors.
|
|
D1378 by @youle
Non-uniform scaled lamps now cast oval/rectangular shadows, viewport & BGE.
|
|
Replaces much slower manual accumulation buffer which simply did multiple renders.
Needs OpenGL3.2, otherwise multi-sample is disabled.
|
|
|
|
|
|
Report an error instead of crashing if a new window can't be created
(typically caused by bad drivers).
|
|
|
|
The issue was caused by some special tricks needed to compile OpenSubdiv shader
which was using stupid check whether geometry shader is used or not.
Now made it more explicit call whether special OpenSubdiv trickery is needed or
not.
Its not ideal solution, but it's not really easy to do a proper solution for
this, because while we can do half of the work with if-defs in the shader code
but we'll still need to somewhat define layout of the input blocks which isn't
really doable with current shader version we're using.
|
|
noticing
|