Questions tagged [struct]
The struct tag has no summary.
13 questions
0
votes
0
answers
41
views
Share custom lighting data struct with GLSL vertex & fragment shaders
I've reached normal maps as I was learning OpenGL, and I decided to calculate the tangents on the CPU.
The issue is that my lighting uses custom structs and it ...
1
vote
1
answer
267
views
Octree as struct not class
I was wondering (as I could not find any implementation online),
if anyone here would have an idea of how to create an octree as a struct and not a class.
The problem is that Octrees are usually ...
0
votes
1
answer
100
views
How do you declare a custom structure to retain field values after a scene reload?
I have the following code :
...
1
vote
1
answer
1k
views
How do I access a struct that resides within a struct in blueprints?
I have a struct: "FOuterStruct"
This is defined in code such that it contains another struct type:
...
1
vote
0
answers
492
views
C++ Class to Void Pointer, Data Lost? [closed]
Reaching out yet again for a point in the right direction. Specifically, I am casting a simple struct to a void pointer so it can be sent out on the network, but it is cutting off my second variable ...
0
votes
1
answer
498
views
InputField text to string variables of a struct
So, here's my issue. I have a class that contains a struct. This struct contains about 7 different string variables. I can set the values of these variables via a constructor that takes the struct ...
2
votes
3
answers
1k
views
Is replacing a struct field in a class generating garbage using C#?
I am somewhat aware of the differences between classes and structs, when each is allocated on the heap vs the stack, what happens when calling methods etc.
As far as I know, the memory for a struct ...
0
votes
2
answers
350
views
How do I handle parallel lines when looking for intersections?
I'm using the following method to determine the intersection point of two vector2:
...
0
votes
1
answer
96
views
Modify Element of Struct Array
I have this struct array in GLSL.
struct Test {
vec2 value1;
vec3 value2;
float value3;
}
uniform Test u_test[5];
How can I modify the elements of ...
0
votes
1
answer
146
views
a shader type class in c
Is it possible to setup something sort of like a class in C++ but in c in the simplest terms? I want to avoid using c++ but I would like to create a simple struct that has glsl shader program.
for ...
0
votes
1
answer
290
views
Geometry Struct and glDrawElements
currently I re-write my codes and change them to make they are better.
I have vertex struct like this:
...
1
vote
2
answers
353
views
Voxel Engine in XNA - Block as Class Renders, Block as Struct Doesn't
Edit: I almost forgot to mention - when I place NEW blocks they render, but nothing triggers the originals to render (I have a button assigned to recalculate/redraw for every block surrounding (and ...
2
votes
2
answers
2k
views
How to fill/initialize D3D11_SAMPLER_DESC properly?
If I want to set explicitly every parameter of the structure I just do so and that's it. But what if I want to set only some of them and leave the rest with default values? I've seen in some tutorial ...