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.

89 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
1answer
1k 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 ...
7
votes
0answers
1k views

Does a model exporter embedding materials as GLSL scripts exist?

as described in Blender Shader in OpenGL/GLSL, it is possible to export the (unoptimized) GLSL code generated by Blender for a given material. Since the viewport can use such GLSL for real-time ...
5
votes
0answers
432 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 ...
4
votes
0answers
431 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 ...
3
votes
0answers
250 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 ...
3
votes
0answers
371 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 ...
3
votes
1answer
76 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 ...
3
votes
0answers
145 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 ...
3
votes
0answers
381 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 ...
2
votes
0answers
23 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 ...
2
votes
0answers
78 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 ...
2
votes
0answers
82 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 ...
2
votes
0answers
979 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. ...
2
votes
0answers
250 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 ...
2
votes
0answers
122 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: ...
2
votes
0answers
502 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 ...
2
votes
0answers
185 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 ...
2
votes
0answers
133 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 ...
2
votes
0answers
212 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. ...
1
vote
0answers
49 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 ...
1
vote
0answers
28 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 ...
1
vote
0answers
188 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, ...
1
vote
0answers
88 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 ...
1
vote
1answer
453 views

blender 2.8 beta doesn't find opengl

Blender 2.8 doesn't load on my windows 7 notebook. It only says several times: "Warning! Ignoring untested OpenGL context profile mask bits. Warning! OpenGL core profile not available." I already ...
1
vote
0answers
542 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 ...
1
vote
1answer
569 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 ...
1
vote
0answers
207 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 ...
1
vote
0answers
192 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 ...
1
vote
0answers
205 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 ...
1
vote
0answers
180 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: ...
1
vote
0answers
50 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 along. So ...
1
vote
1answer
330 views

Python Opengl Render doesn't show texture

when I click opengl render button in the GUI of the 3D view, the rendered image contains texture. However, when I use python script to render the same thing, I only get solid image without texture. <...
1
vote
0answers
178 views

Apply 2D filters to camera output in the Game Engine

is it possible to apply custom GLSL shader like the shaders you can set in the logic bricks called "Filter2D" to a camera that is not the main camera? I am rendering the output of a camera in the ...
1
vote
0answers
103 views

Mouse event program freezes my Blender

recently I am trying this code for handling some clicks, mixed by bpy and bgl. However when I "Run script", then select it from ...
1
vote
0answers
114 views

Modal operator and opengl drawing update issue

For this question, I've coded a little script that draws mesh's elements indices with opengl. All is working well, except when in edit mode, some grab, scale, rotate is done. In these cases the ...
1
vote
0answers
221 views

Convert materials from cycles to bge as visible in viewport material shading mode

In 2.78 the material viewport shading mode of cycles is greatly improved. In fact it is even better than BI in some aspects - for example it now correctly displays cube projection textures, something ...
1
vote
0answers
178 views

Python BGL Draw text in the node editor

I have an operator (MyOperatorTest). How can I make it so that when this operator is run, text is printed on the screen to the top left corner of the node editor? (The operator is in the node editor)
1
vote
0answers
2k 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 ...
1
vote
0answers
129 views

Get error when python script in use bgl is running

My script got error when it ran python script in use blender opengl(bgl). Below python script. ...
1
vote
1answer
117 views

How do you create a KX_PolygonMaterial?

I try to attach a PyOpenGL Shader to an object using the setCustomMaterial() command but It raises an error: 'KX_BlenderMaterial' object has no attribute '...
1
vote
0answers
3k views

How to run blender 2.77 on a virtual network render machine with no Opengl support on windows?

I have a server that runs multiple instances of virtual machines and is running windows 10... there is a cinema 4d farm clients running there...and I need to run blender 2.77 slave mode ...but the ...
1
vote
0answers
624 views

Bones and armature render

How can I make a simple animation render of an armature (to show all bones movements)? This is an OpenGL render, but if i try the OpenGL animation render, the bones disappear.
1
vote
0answers
1k 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 ...
0
votes
0answers
24 views

Why is UV mapped texture not visible on workbench in B.2.8?

I made a simple factory building with two materials. One material [factory_floor_material] is assigned to the floor of the factory. One material [factory_wall_material] is assigned to the walls of ...
0
votes
0answers
30 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? ...
0
votes
0answers
13 views

Opengl script not rendering in 3D_View

On running Blender2.79- Bgl/Blf scripting template "Operator_modal_draw",nothing renders in VIEW_3D . context.area.type == 'VIEW_3D' There are no Errors nor any output on the Console.How to ...
0
votes
0answers
16 views

Opengl Gpu module import error's

In Blender2.79 (Windows10/64bit-Exe application) On running the sample Opengl/Gpu script - 3D Lines with Single Color on a Gpu which supports Opengl 3.1,Blender doesn't recognise the builtin Opengl ...
0
votes
0answers
108 views

Opengl 3.3 drivers blender 2.81

I use blender 2.81 at start, I get this error, the drivers are updated through the driver pack solution. Some may say that the graphics card is not suitable and needs to be updated. But if I use ...
0
votes
2answers
89 views

Blender 2.81 with Nvidia Quadro 2000m

I recently installed Blender - the latest update. Never before used this software. I have a relative old PC, HP 8560w with a quadro 2000m graphic card. My first problem was an error with "no open GL" ...
0
votes
0answers
35 views

Why does Blender's front view point in the negative Y direction?

When switching to the Right view in Blender, the X axis points into the screen. When switching to the Top view the Z axis points into the screen. If we switch to the Front view, then the Y axis ...