Skip to main content

Questions tagged [struct]

0 votes
0 answers
41 views

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 ...
Grinding For Reputation's user avatar
1 vote
1 answer
267 views

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 ...
L Chougrani's user avatar
0 votes
1 answer
100 views

I have the following code : ...
tigrou's user avatar
  • 3,279
1 vote
1 answer
1k views

I have a struct: "FOuterStruct" This is defined in code such that it contains another struct type: ...
Natalo77's user avatar
  • 709
1 vote
0 answers
492 views

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 ...
Beau B.'s user avatar
  • 139
0 votes
1 answer
498 views

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 ...
Sora's user avatar
  • 57
2 votes
3 answers
1k views

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 ...
user1323245's user avatar
0 votes
2 answers
350 views

I'm using the following method to determine the intersection point of two vector2: ...
Superwayne's user avatar
0 votes
1 answer
96 views

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 ...
Lucien's user avatar
  • 1,186
0 votes
1 answer
146 views

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 ...
sean's user avatar
  • 3
0 votes
1 answer
290 views

currently I re-write my codes and change them to make they are better. I have vertex struct like this: ...
DavidJr's user avatar
1 vote
2 answers
353 views

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 ...
Yushatak's user avatar
  • 233
2 votes
2 answers
2k views

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 ...
NPS's user avatar
  • 2,334