Commit Graph

83 Commits

Author SHA1 Message Date
0f55334413 Cleanup: use new format string utility 2018-10-06 00:13:54 -03:00
9682e43bf9 BGL: Wrap glBlitFramebuffer 2018-09-24 13:12:50 -03:00
5b64301834 Merge branch 'master' into blender2.8 2018-06-04 09:06:14 +02:00
7719c11006 Cleanup: strip trailing space in Python module 2018-06-04 08:54:40 +02:00
b107e77e46 BGL: Expose OpenGL API for FrameBuffers and RenderBuffers. 2018-04-14 02:25:18 -03:00
4db67aab06 Fix OpenGL extension report in system info operator. 2017-10-23 22:22:22 +03:00
54f9a6e5da Merge branch 'master' into blender2.8 2017-10-18 16:40:31 +11:00
0a435d49ba Fix T53074: Use the pybuffer->itemsize to get the corresponding GLtype
It seems that `typestr` does not always define the final size of the element. And it varies by operating system.

Then use the `typestr` only to know the itemtype is `float` type or not.
2017-10-17 12:06:52 -02:00
ea606a7847 Merge branch 'master' into blender28 2017-10-06 21:25:33 +11:00
c454d816a9 Cleanup: style 2017-10-06 16:56:41 +11:00
7fdb9e168d Merge branch 'master' into blender2.8 2017-09-28 16:13:09 +05:00
1f18523edf Cleanup: switch fall-through warning 2017-09-28 13:41:54 +10:00
5c6e3ff497 bgl module: extend gl_buffer_type_from_py_format_char function to work with more string formats
Only basic types of character codes were being used
2017-09-27 16:07:06 -03:00
cc8c064f11 Merge branch 'master' into blender2.8 2017-09-28 03:05:46 +10:00
6c98859b77 Cleanup: warning 2017-09-28 02:04:58 +10:00
2de5e14f53 bgl module: Interpret a buffer as a bgl.Buffer
Differential Revision: https://developer.blender.org/D2857
2017-09-27 11:20:00 -03:00
Dalai Felinto
e5bf726f44 BGL: Remove deprecated enums
Note: The enums that are deprecated and supported are still there
2017-04-18 16:02:17 +02:00
b4157dedb0 OpenGL: remove packed imm mode functions from Python API
These are from the ARB_vertex_type_2_10_10_10_rev extension that became part of OpenGL 3.3.

So they are new, but only exist for compatibility with immediate mode, which is old.

Related to T49165 (general OpenGL upgrade)
2017-03-13 14:08:03 -04:00
0e40f1bac4 OpenGL: remove GLU functions from Python API
Part of T49042
2017-03-13 14:08:03 -04:00
c1f43c9dc6 Cleanup: warnings 2017-03-02 00:36:33 +11:00
e9011100f7 Fix compiler warnings on macOS / clang / c++11. 2017-02-26 00:16:21 +01:00
Martijn Berger
5cbc7b6ed2 bgl do not bind parts of OpenGL that are not exposed in core profiles 2016-11-19 15:07:01 +01:00
0d4961cc52 Fix typo in bgl.Buffer report function
A GL_INT buffer was reported as GL_BYTE.
2016-07-02 18:38:05 +02:00
b8417501ab Cleanup: suspicious use of commas 2016-03-04 16:38:41 +11:00
02b9921b75 bgl: fix implicit overflow 2015-09-10 03:59:18 +10:00
d4ca74c227 bgl: disable some defines not found in mesa 7 2015-09-10 03:54:40 +10:00
4e759d6735 Fixes T46060 Regenerated the full list of constants we should expose 2015-09-09 18:35:05 +02:00
a660f27527 Don't use GCC-only pragma for all compilers 2015-09-01 17:40:10 +05:00
Martijn Berger
230d93ad54 Fix bgl so that get-methods that take a string use strings instead of bgl buffer objects again 2015-08-03 12:20:08 +02:00
03f00eb91d Docs: doxy corrections 2015-07-31 23:44:37 +10:00
dc6153453a Cleanup: comments (remove outdated & update) 2015-07-24 16:59:39 +10:00
7f32601159 PyAPI: update bgl to OpenGL 3.3
Adds (currently unused) deprecated option
so we can remove support for older API versions.
2015-07-24 16:48:40 +10:00
ea3dae74d8 Cleanup: remove redundant __doc__ from bgl 2015-07-24 09:45:25 +10:00
3b362950e9 Cleanup: move defines inside bgl C source
- remove number-of-args arg from BGL_Wrap.
- use doxy groups.
2015-07-24 09:35:39 +10:00
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
85945a8b86 Add debug information for maximum opengl limits in system info
generation.
2014-08-28 12:19:59 +02:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
b460674d64 Code cleanup: replace macro with function to reduce binary size 2014-06-03 19:25:07 +10:00
e73d0f57a3 Code cleanup: use 'const' for arrays (python) 2014-04-27 00:25:15 +10:00
b7fa08f88a Code cleanup: style 2014-02-22 11:14:15 +11:00
418011907c remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h 2013-07-02 10:14:59 +00:00
9d0334bc74 add missing bgl and gpu api docstrings (found using docstring completeness checker) 2012-11-22 05:15:52 +00:00
004f8d78ed default to Python3.3 on Linux for SCons and CMake, warn when building with python 3.2x or older.
also remove casts to keep Python3.2 warning quiet.
2012-11-05 13:48:42 +00:00
a9f10b6bc2 style cleanup 2012-09-08 06:40:03 +00:00
Dalai Felinto
b651f61278 bgl new methods (for glsl shaders - #version 120)
** I did not update rst docs. I will post on the quick-hack list. If no one volunteers to do it, I have it done before next release. **

this patch add the barebone functions to do glsl shaders in an addon.
For simplicity sakes it supports old GLSL, but not all the new modern methods (glBindFragDataLocation, ...).

It should be enough to make an addon to help with bge 2d filters.
I'm using this with a 3dview callback and it's working nicely:
self._handle = context.region.callback_add(draw_callback_px, (self, context), 'POST_VIEW')

I was considering not to commit this patch due to it not covering all OpenGL new methods.
But frankly it's not the first time bgl is expanded upon individual needs (guilty of that myself).
If a python developer knows enough to use OpenGL and need new functions, s/he should also be able to patch Blender for that,
so I see no problems here.

Another solution is to move to PyOpenGL or similar any soon. 

glShaderSource implemented differently than opengl standards. It's taking one source at a time (instead of an array of sources).
This is similar with PyOpenGL solution.

glActiveTexture
glAttachShader
glCompileShader
glCreateProgram
glCreateShader
glDeleteProgram
glDeleteShader
glDetachShader
glGetAttachedShaders
glGetProgramInfoLog
glGetProgramiv
glGetShaderInfoLog
glGetShaderiv
glGetShaderSource
glGetUniformLocation
glIsProgram
glIsShader
glLinkProgram
glShaderSource
glUniform1f
glUniform2f
glUniform3f
glUniform4f
glUniform1fv
glUniform2fv
glUniform3fv
glUniform4fv
glUniform1i
glUniform2i
glUniform3i
glUniform4i
glUniform1iv
glUniform2iv
glUniform3iv
glUniform4iv
glUniformMatrix2fv
glUniformMatrix3fv
glUniformMatrix4fv
glUniformMatrix2x3fv
glUniformMatrix3x2fv
glUniformMatrix2x4fv
glUniformMatrix4x2fv
glUniformMatrix3x4fv
glUniformMatrix4x3fv
glUseProgram
glValidateProgram
2012-05-09 02:42:30 +00:00
11d12d945e style cleanup: python api 2012-03-26 06:55:09 +00:00
70d3d1aca6 style cleanup: py/capi 2012-03-16 21:39:56 +00:00
b59d8c6ba3 fix for own mistake [#29031] Importing BGL Can Crash the BGE and Blender
was adding the Buffer type to the module without increffing
2011-12-23 05:42:06 +00:00
9c9099a805 formatting edits in py api, no functional changes 2011-12-18 08:50:06 +00:00
e5647ea196 py operators - don't use the screen as an operators ID anymore, screen's don't store operator instances and operator functions have access to the context if they need the current screen.
also add some more py api file descriptions.
2011-11-05 08:40:07 +00:00