S
S
Stanislav Martynov2017-07-18 08:56:12
C++ / C#
Stanislav Martynov, 2017-07-18 08:56:12

How to get data from video card?

Good time. How can I get information from the video card?
Let's say I have a shader:

#version 120

uniform float x = 0;

void main() 
{
    for (int i = 0; i < 100000; i++)
        x+=i;
}

How can I get the value from X? Of course I can get a reference to it via
GL.GetUniformLocation(pgmID, "x");
But how to get exactly the value of this variable?
I will be glad for any useful information. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-07-18
@Win332

It is in such a program on a video card that it makes no sense at all, usually you need to get a whole array of data. To do this, you can render to a texture.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question