Questions tagged [gpu-module]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

HIP binary kernel not found

I just got a MINISFORUM Venus UM790 Pro Mini PC AMD Ryzen 9 7940HS up to 5.2 GHz 64GB DDR5 1TB SSD with AMD Radeon 780M. I enabled HIP in system settings and selected the 780M GPU. I selected GPU ...
geswho22's user avatar
3 votes
1 answer
166 views

Batches are drawn on top of each other with GPU module

I've been attempting to write a custom RenderEngine for Blender, but have stumbled on a fundamental problem which is preventing me from going any further. To illustrate the issue I will include an ...
Midas's user avatar
  • 125
2 votes
1 answer
60 views

Drawing a circle that faces towards the view with GPU/BGL?

Im trying to draw a circle using the GPU/BGL module that appears on a given certain 3D position (in my example, the cursor's location) and, when drawing, it points towards the current view. I'm using: ...
Ommadawn's user avatar
  • 598
0 votes
0 answers
48 views

Copying the 3D view Framebuffer doesn't give me the current frame. Bug or expected behavior?

I'm writing an addon for which I need to extract information out of a cycles viewport render. In essence, I'm using a callback function in the SpaceView3D that gets called every time the 3D viewport ...
DerOrbiter1's user avatar
4 votes
0 answers
187 views

Migrating geometry shaders to Metal

I'm working on BlenderBIM (architecture addon for Blender) and we have a bunch of shaders to support plan annotations in viewports. Mainly it's simple shapes based of lines - lines, segment based ...
FamousSnake's user avatar
0 votes
1 answer
945 views

Addon stopped working on Mac/Metal in v3.5+ due to shader compile error. Console spam errors about bgl.glEnable calls

My addon that works on blender 3.3 up to blender 3.6 on windows does not compile anymore on Mac/Metal computers, with the error: Exception: Shader Compile Error ...
JulienH's user avatar
  • 161
1 vote
2 answers
268 views

How to implement bgl.glScissor with using gpu module?

As you know, bgl module has been deprecated and will be deleted in the future Blender release. So, I'm tackling to change my old code to use ...
nutti's user avatar
  • 449
1 vote
1 answer
116 views

Draw lines by 3d Cursor location and rotation

I want to draw lines using 3d cursor location and rotation (to draw it axis). How to calculate endpoint location for each axis? Example: ...
APEC's user avatar
  • 570
1 vote
0 answers
101 views

GPU Module equivalent to glDepthRange

I'm working to change my drawing code over from bgl calls to Blender's GPU module (as bgl calls are set to be depreciated) and can't seem to find an equivalent to the bgl.glDepthRange function in the ...
Dan's user avatar
  • 83
0 votes
1 answer
158 views

How to invoke draw_handler_add while running script?

I have a draw_handler_add like this: ...
cak3_lover's user avatar
0 votes
1 answer
159 views

poll() Missing 'window' in context

I'm trying to 'INVOKE_DEFAULT' using thread in the following code: ...
cak3_lover's user avatar
1 vote
1 answer
174 views

cannot set pixels to buffer image, incorrect sequence item type: B

I'm trying to run the script: ...
cak3_lover's user avatar
4 votes
3 answers
1k views

How to draw an outline with bpy gpu module?

is there a simple & efficient way to draw the outline of a mesh with the gpu module ? the script should be able to control the width of the outline line Defining outline: "A line indicating ...
Fox's user avatar
  • 1,892
0 votes
1 answer
65 views

Make geometry from GPUShader visible for F12 rendering

I'm using GPUModule with shaders to render some points in the 3D view: ...
j_re's user avatar
  • 1
1 vote
1 answer
225 views

Draw UI elements with the GPU module in the N-key panel?

In an add-on I'm developing, I'd like to draw elements (using the GPU module) to a N-key panel. I've looked extensively, but I haven't found a correct answer. https://blender.stackexchange.com/a/...
i7_macintosh's user avatar
2 votes
1 answer
452 views

Drawing to multiple render targets using the GPU module

Is there a way to draw to multiple render targets at once using the Blender's GPU module? I am looking for something similar to glDrawBuffers in OpenGL. Say, for example, my fragment shader looks like ...
QuantumCoderQC's user avatar
0 votes
0 answers
450 views

Why can't I import a specific class from the module?

I'm trying to retrieve a class from the module called draw_op. The problem is in the module, some of classes can be imported normally while some don't. Error: <...
sniffingdoggo's user avatar
1 vote
0 answers
537 views

Create box/rectangle shape based on two points/vector using python

I want to create a box/rectangle shape using two points while aligning to a given normal. The image below shows what I want to achieve. The left side shows the two points supplied by the selected ...
Blenderguppy's user avatar
2 votes
0 answers
270 views

Blender 3.0 GPU API and BGR colors

I want to use the new GPU API for Blender 3.0 to copy the content of a texture into a gpu.types.Buffer. Although this works fine with the following small code, I wonder how I can tell the API to copy ...
reg.cs's user avatar
  • 488
4 votes
1 answer
301 views

Plot grid points on normal vector

I like to create virtual set of 3d grid points plotted/aligned on a normal vector. I'm planning to draw these points or lines using the GPU code. I've been experimenting with ...
Blenderguppy's user avatar
3 votes
2 answers
1k views

How to make rounded corners for 2d rectangle with a custom shader?

Does anyone know how to make rounded corners for a 2d rectangle with a custom shader? ...
Karan's user avatar
  • 1,894
0 votes
1 answer
87 views

why bgl meshes flip when nothing is selected?

As described in API the following script will create a mesh from active object using bgl module: ...
MohammadHossein Jamshidi's user avatar
2 votes
0 answers
263 views

How to remove drawing with gpu module in blender?

I have drawn some points with the GPU module of Blender and I need to draw other things in an empty window without closing Blender. But I don't know how to remove all these points with codes. It seems ...
Linda Fu's user avatar
  • 121
1 vote
1 answer
373 views

Display series of 2D squares using GPU Shader Module

My addon makes measurements on objects and assign a color to the objects according to the measured value. Now I would like to display a series of stacked coloured squares in the viewport to serve as a ...
amaizel's user avatar
  • 167
4 votes
1 answer
1k views

How can I make a 2d gpu polygon and text follow the cursor?

The code: ...
Retrax's user avatar
  • 1,480
5 votes
1 answer
2k views

How do you use the GPU offscreen render API in 2.8?

For a while now in blender there has been this GPU Off-screen renderer; however, I think it has changed a bit in 2.8, and plus, I never even knew how to use it before. Basically I want to be able to ...
B''H Bi'ezras -- Boruch Hashem's user avatar
2 votes
1 answer
620 views

How to draw RGBA 2D image in 3d_view with gpu module (or without)?

I just copied and pasted from https://docs.blender.org/api/current/gpu.html#d-image: ...
Cyril Blake's user avatar
5 votes
0 answers
507 views

Removing space draw callbacks after losing the handle?

A small edit of test code from GPU Shader Module (gpu) "Mesh with Random Vertex Colors" to save the handle to the driver namespace ... ...
batFINGER's user avatar
  • 84k
6 votes
1 answer
756 views

Transparency in Blender 2.8 GPU Python Module

I've been messing around with the new GPU python module in Blender 2.8. But I cannot find a way to make my lines and triangles transparent. The alpha channel is completely ignored. I even tried it ...
WalterTheModeler's user avatar
4 votes
2 answers
6k views

How to draw geometry in 3d View window with bgl

Since there isn't demo in API docs, so I tried simple script below: ...
NGE's user avatar
  • 347