• Advertisement

jusa

Member
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

199 Neutral

About jusa

  • Rank
    Member
  1. Ok, thanks for the answers!   I just wanted a confirmation that previous calls are replaced if there's no drawing in between. I wasn't sure when I read the description in the OpenGL docs.
  2. I  have a noob question about how glUseProgram works.   Suppose I did something like this: // A and B are shader programs. void render() { glUseProgram(A); glUseProgram(B); glDrawArrays(...); } Is program A ever used for drawing here, or is it pointless to do this?  
  3. Thanks, a lot of helpful and interesting ideas here!   I often seem to get stuck in my projects because of overanalyzing and inability to decide the best way to tackle a problem, for example, what classes, modules or libraries should I break the software into. I might have a couple of options in mind, but none of those feels just right. I may be falling into the trap of trying to find a too perfect solution. Another thing I notice, a bit like the poster above, is that at some point I can't seem to fit all the code or architecture in my head, and at that point the project starts to feel "foggy" and overwhelming.
  4. What do you do if you feel that your coding project is getting overwhelmingly complex? What tactics or techniques do you use to reduce complexity or tolerate it so that you can carry on with the project?
  5. When you are doing programming projects solo, do you use UML or other diagrams? What diagram types do you find most useful, or do you feel diagrams are unnecessary when working alone?
  6. I'm fishing for ideas for an easy, quick and manageable personal "system" (software, non-software or a combination) for storing my ideas or "todos" and tracking their progress. What everybody here is using for something like that? What have you found works best for you?
  7. ^ Great, that tutorial will be handy later on.
  8. Oh. How sad. At least that explains why it didn't work. Thanks!
  9. I have a noob problem with GLSL where I can't seem to figure out why the pixel shader below only renders a black rectangle. I was expecting that it would draw a random-colored one instead. I figured the black color could result from the fact that the noise functions may return a negative value but even using abs() on them doesn't help. #version 150 out vec4 pixel_color; void main() { float r = abs(noise1(1.0)); float g = abs(noise1(2.0)); float b = abs(noise1(3.0)); pixel_color = vec4(r, g, b, 1.0); }
  10. Hello, I'm looking for a 3D math library (or a physics lib which includes math) with the following characteristics: - Free for commercial use, non-GPL licence. - Supports at least matrix and vector math. - Provides a C API (I'm not using C++). - Simple and readable interface with documentation. So far I've found Kazmath, but I'd like to explore other alternatives as well.
  11. Ah, okay. That explains it. Thanks!
  12. Hello, I'm trying to figure out a syntax for typedef'ing a "struct-pointer-pointer" in C (not Cpp) so that instead of: (*fpp)->i = 13; I coude write: fpp->i = 13; Here's the setup: struct _Foo { int i; }; typedef struct _Foo Foo; typedef Foo** ppFoo; // Not what I want. int main() { Foo f; Foo* fp = &f; ppFoo fpp = &fp; fpp->i = 12; // Gives error, see below } ---------------------------------- COMPILER ERROR error: request for member `i' in something not a structure or union I'm using MinGW on Windows. What would be the right syntax for this, or is it even possible in C?
  13. It seems you're not actually calling Render anywhere. I might be wrong since it's a long time since I've done any C++/Windows programming. You could try the following and see if it helps: case WM_PAINT: hdc = BeginPaint( hWnd, &ps ); Render(); // Try calling Render here EndPaint( hWnd, &ps ); break; EDIT: Erik beat me to it ;)
  14. Is it currently rendering the window in white? Try changing: float ClearColor[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; into: float ClearColor[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; The value 0.0f can be thought of as "no color" and 1.0f as "full color", at least in OpenGL. That's why setting all but the alpha to 0.0 should make black color.
  • Advertisement