Skip to main content

Questions tagged [opengl]

Questions about OpenGL (Open Graphics Library) OpenGL is an API used to render real-time 2D and 3D graphics. Blender uses OpenGL for drawing the user interface, 3D view, and the game engine.

103 questions with no upvoted or accepted answers
17 votes
0 answers
2k views

Per-Vertex lighting in GLSL?

How can I achieve per-vertex lighting (like in single/multi-texture shading) in GLSL with all of the other GLSL features (like buffer shadows, texture layers, etc.)? Bonus points if it can be done in ...
Nero1024's user avatar
  • 643
5 votes
0 answers
322 views

Custom shader script in compositor (de-linearize depth buffer)

Some months ago I wrote a minimal opengl 2.5d game engine with pre-rendered backgrounds (such old Resident evil, Alone in the dark and Final fantasy games). Depth is managed through a grayscale image ...
NickRay1184's user avatar
5 votes
0 answers
652 views

PyOpenGL and VBO Indexes

Long story short, I'm trying to do a modal handler that draws using OpenGL into the viewport. Immediate mode through BGL works fine, but is dog slow. I tried using VBOs through BGL but there seems to ...
Kiki W.'s user avatar
  • 606
4 votes
0 answers
609 views

How to use bgl?

I want to render simple lines on the 3D viewport through a modal operator but not using glBegin/End because those commands are deprecated in opengl 3.3 and will not be avaliable on 2.8 leaving me ...
StackOverflowToxicityVictim's user avatar
4 votes
0 answers
695 views

Viewport widgets with draw handler

Is it possible to create viewport widgets with draw handler? I have an operator which produces simple mesh geometry, I use operator redo properties panel to edit the result as shown in animation ...
Mikhail Rachinskiy's user avatar
3 votes
0 answers
115 views

blg module not being detected

i just started using bgl with blender scripting and it's giving this error "AttributeError: module 'bgl' has no attribute 'GL_MODELVIEW_MATRIX" i just checked on API documentation and it's supposed to ...
XIWEI ZHOU's user avatar
3 votes
0 answers
345 views

Rendering with OpenGL in Blender does not show the intended rendered image or animation

I am trying to render animations and images fast using the OpenGL feature in Blender but even though I want it to render a fully rendered image or animation, it only renders the solid image, or the ...
Yiuliana's user avatar
3 votes
0 answers
140 views

How do I use Bgl?

So my question is: I understand nothing about openGl api, that's super confuse to me, Where do I start? I did get that I need to append a callback to a draw handler and remove it to enable/disable my ...
StackOverflowToxicityVictim's user avatar
3 votes
1 answer
490 views

How to apply two different materials in Blender Internal on front faces and back faces, *while involving transparency*

Basically, I want to see through the transparent front faces to the opaque back faces. This isn't the same as flipping all normals and executing backface culling because I want the front faces to be ...
Dragoonstorm1's user avatar
3 votes
1 answer
94 views

Is possible to keyframe a mask textures as a factor for two other textures in realtime?

Is possible to keyframe a mask textures as a factor for two other textures in realtime? I have set up a blender internal materials node setup, basically two distinct materials mixed with a Mix RGB ...
Colm O Fathaigh's user avatar
3 votes
0 answers
3k views

How to correctly export from blender to opengl with a texture?

I am learning opengl from here and we are given an obj file for blender of crysis nanosuit. When I load this with opengl, it just loads fine. But then I imported the file to blender and added some ...
Tamim Addari's user avatar
3 votes
1 answer
2k views

Can I use Blender on Intel HD 530 dedicating an Nvidia GPU to Cycles?

I'm trying to specify the build for a new PC, my current one is 5 years old and starting to show its age. It's going to be a multi-use machine for Gaming, Virtualisation, Coding, Blender and possibly ...
Snospar's user avatar
  • 31
3 votes
0 answers
175 views

Could not Render Loaded Texture in 3D View by bgl module

I wrote below scripts to render texture already loaded by blender. However, no images are rendered on 3D View. This code works correctly when I run this script on blender 2.70. But, this script ...
nutti's user avatar
  • 459
3 votes
0 answers
405 views

.blend file size much larger after OpenGL Render

I am working on a detailed dialogue scene that is 600 mb. It is a very complex scene, with each part in single layers. I know that is a very big file size, but what my machine can handle it. What ...
user9626's user avatar
2 votes
0 answers
597 views

Dashed Lines GLSL Even Sizing

I'm working on a dashed line shader in a Blender add-on and my aim is to get all lines, regardless of length, to have the same sized dashes and dash spacing. GPU shaders are relatively new to me so I ...
Dan's user avatar
  • 83
2 votes
0 answers
205 views

Rendering depth buffer to texture using BGL fails on FBO drawing

I am writing a custom render engine for a level editor addon with GPU / bgl modules. I need to render a depth buffer to texture to later use in my shaders. I tried the way it is usually done with ...
D. Skarn's user avatar
  • 695
2 votes
0 answers
363 views

blender 2.8 glRectf() not there

I'm trying to convert a 2.79 add-on to 2.80. I'm running into a problem with openGL function glRectf(). The code that's currently in the add-on draws the menu as follows ...
Eternity Tomorrow's user avatar
2 votes
0 answers
454 views

How to draw custom, complicated ui element

Is it possible to add custom drawn elements to UI? e.g. access OpenGL and draw shapes from code, create some "canvas" in UI and draw on it. e.g. I'd like to create a complicated interface, something ...
Kowalski Paweł's user avatar
2 votes
0 answers
406 views

How do I set output video file name using python script?

I'm using a python script to render my scene using the OpenGL render to get more speed, as the quality I'm getting is enough for my purposes. I'm using this script: ...
valter's user avatar
  • 121
2 votes
0 answers
2k views

Custom Render Engine with bgl

I need to code my own Render Engine to do specific rendering passes. I don't want to build my own Blender app by coding in c/c++, so i try to make it work in Python. But i need OpenGL functions. ...
minitoine's user avatar
2 votes
0 answers
275 views

Limit selection to visible doesn't work properly

I made a realistic aborygen bust portrait and wanted to make an OpenGL viewport render of it. But when I zoom out from the object the wireframe of the eyeball is getting more and more visible. I want ...
Paul Gonet's user avatar
  • 33.4k
2 votes
0 answers
196 views

How to activate smoothing in bgl (opengl)?

All is in the title. I'm not able to make smoothing work, when drawing on a texture. Here is the code before the drawing: ...
lemon's user avatar
  • 60.5k
2 votes
0 answers
687 views

Display Images with bgl

I'm trying to display an image external to blender in the 3d view with python and bgl. Is it possible not to load an image in data.images and display it? The following code display an image from the ...
christopheS's user avatar
2 votes
0 answers
227 views

Modal operator to highlight

Ok. I'm a bit stuck on this. I accept defeat and am asking for advice. Here is a portion of the larger addon. The purpose of this snippet is to show the area user is working on. Basically, user inputs ...
kakts's user avatar
  • 21
2 votes
0 answers
152 views

Combining OpenGL and Blender Render (For Lightsabers)

I'm working on another lightsaber video. For the clashes this time, I've decided to utilize a lens flare pack by cfirwin3 here and it's super awesome. However, it appears that they only render ...
Anson Savage's user avatar
  • 3,412
2 votes
0 answers
272 views

opengl flat shading in blender

i'm trying to render my scene from a script. i've got some objects with materials that are Shadeless, and when rendering with the blender renderer in my script, they show up as expected: no shading. ...
shaheen's user avatar
  • 121
1 vote
0 answers
25 views

Blender and Active Stereo Display (3D Vision or similar)

I am new to Blender. I am drawn to it because of 1) its drawing capability and 2) its supposed support of stereoscopic display. I have an "Nvidia 3D Vision" system that works under either ...
oldnewbie's user avatar
1 vote
0 answers
219 views

Custom render engine - creating material previews with OpenGL?

I'm working on a custom render engine through a Python addon that uses the bgl module for most of its rendering. bl_use_preview ...
hayden0729's user avatar
1 vote
0 answers
617 views

Blender 3.4 won't run citing unsupported graphics card but 3.3 works

I have 3 computers I primarily run Blender on, 2 of which are giving me this error: ...
kodiakcreativity's user avatar
1 vote
0 answers
172 views

How can I make objects created with the GPU Module visible in the final render?

I used the code example for creating a triangle with custom shader from the official docs: ...
Squis's user avatar
  • 111
1 vote
0 answers
4k views

Blender Won't Open because it says I need OpenGL 3.3

I've recently wanted to get back into using blender for some fun art projects, but anytime I try and install the program and run it, I run into issues. The last time I used it was in December of 2020,...
Tyler Berkeley's user avatar
1 vote
0 answers
557 views

Drawing a rectangle using opengl in blender

I'm learning opengl in blender and successfully drew a triangle in 3d viewport. Now I'm trying to draw a rectangle using Element Object. Here is what I've tried. But it draws nothing. ...
Me BMan's user avatar
  • 175
1 vote
0 answers
148 views

Why do rendered images using a GPU have vertical lines in versions after 2.81?

While using GPU rendering I get vertical lines over the rendered object. Until version 2.81 I don't get this anomaly, I thought it would be some bug in version 2.83, but in version 2.90 presents this ...
Vanderlei Alves's user avatar
1 vote
0 answers
497 views

Converting bones transformation matrix from OpenGL to Blender

So, I'm trying to convert some transformation matrices from OpenGL to Blender but bone poses are wrong. I assume it's transformation matrix, I'm no expert in OpenGl but it's used in this function: <...
Kuro's user avatar
  • 11
1 vote
0 answers
118 views

My blander worked normal on my pc today when i went to open it, was asking for opengl 3.3

my blander worked normal on my pc today when i went to open it, was asking for opengl 3.3 try reinstalling but it didn't work, i never needed to put anything for it to open, could this be some kind of ...
Tony Serra's user avatar
1 vote
0 answers
1k views

Blender doesn't start up

Good evening, I've been having an issue where the program itself won't start up after the initial command prompt window has disappeared. The program fully closes, it doesn't show that it's not ...
Julia vo's user avatar
1 vote
0 answers
32 views

quick preview animation with animated material?

I am looking for a poor man's render of an animation in order to evaluate blocking, timing, camera movements etc. without the "cost" of a full render. I found Is there a way to make a quick ...
Hagen von Eitzen's user avatar
1 vote
1 answer
86 views

OpenGL freezes and turns off blender

I've encountered this behavior several times that blender put random black and white points on the blender window then a message box appears and says "Too many errors occurred. Application must close ...
Ahmed Ali's user avatar
1 vote
0 answers
210 views

I need a handler for render_complete but with OpenGL render

Is there a handler to execute a function after an OpenGL render (after the whole animation is rendered). Because this script ...
mugnozzo's user avatar
  • 1,237
1 vote
2 answers
1k views

Preview in viewport using OpenGL shader

I am trying to apply a custom shader (OpenGL, but if that's not possible I can learn OSL) to a STL. I will not use any lights, cameras, I'm not going to render it eventually. I would like to have the ...
alex's user avatar
  • 79
1 vote
0 answers
351 views

Render order of triangles is wrong with custom draw handler

Example code from GPU Shader Module (gpu) "Mesh with Random Vertex Colors" renders faces in wrong/weird order, what might be the cause? ...
KJS's user avatar
  • 237
1 vote
0 answers
302 views

Blender 2.81 OpenGL 3.3 Error

So recently I got a new computer since my old one was pretty bad and I needed an upgrade. This PC is incredibly fast and powerful but for some reason it's having trouble running Blender 2.81. I've ...
Braden Thomas's user avatar
1 vote
0 answers
187 views

How do I find the final pose matrix for every bone to send to the shader?

Hello any advice would really be appreciated. I know there are lots of threads on this already but I have read many of them and I am still having trouble. I want to export a simple skeletal ...
andrew's user avatar
  • 11
1 vote
2 answers
240 views

How do I make objects not renderable in OpenGL Render / overlays disabled on Blender 2.8?

I have some mesh that i do not want to be visible when disabling the overlays button but they still do so, in Blender 2.79 checking the Render only box was enough but here it doesnt work like that. ...
Zophiekat's user avatar
  • 759
1 vote
0 answers
757 views

Where are the settings to increase cycles threads?

I am trying to adapt the cycles render code to allow me to use the full threading power of my GPU (Radeon RX750 8Gb, 2048 OpenGL threads). There seems to be a limit from some time ago of 1024 threads, ...
user75008's user avatar
1 vote
0 answers
228 views

bgl Hello Triangle Blank Screen

This code should draw the "Hello Triangle" (1) that everyone starts off with but it's not showing up. Since it's in Blender, I used (3) as a reference for when to draw. That's why the code itself ...
Guilty Ghost's user avatar
1 vote
0 answers
2k views

Big problem when exporte normal map from Substance Painter to Blender

I need help. I have this problem when I export a normal map from Substance Painter to use in Blender. As you can see in the images it show some dark spots in the object, and it looks worse at ...
Rock Man's user avatar
1 vote
1 answer
4k views

Running Blender under Virtualbox

I setup a VirtualBox machine under Windows for dev related stuff (python, visual studio etc), everything works except that I cant run Blender :( it crashes with ...
yarun can's user avatar
  • 428
1 vote
0 answers
241 views

Is there a way to make Blender 2.8 STOP checking my OpenGL version?

My OpenGL version is just fine, but when Blender checks, it gets a bad result because I'm running via Remote Desktop. This wasn't too bad in previous versions because Blender only checked once on ...
Charles Jenkins's user avatar
1 vote
0 answers
84 views

How to handle drawing with multiple views

I want to draw in the screen space of each ImageEditor. The drawing itself works pretty good, each space has its own draw handle registerd with the correct "view_to_region" functions passed ...
kio's user avatar
  • 41

15 30 50 per page