• Content count

  • Joined

  • Last visited

Community Reputation

461 Neutral

About sprite_hound

  • Rank
    Advanced Member
  1. [font="Arial"][size="2"][quote][/size][/font] [font="Arial"][size="2"]SOIL is meant to be used as a static library (as it's tiny and in the public domain). You can use the static library file included in the zip (libSOIL.a works for MinGW and Microsoft compilers...feel free to rename it to SOIL.lib if that makes you happy), or compile the library yourself. The code is cross-platform and has been tested on Windows, Linux, and Mac. (The heaviest testing has been on the Windows platform, so feel free to email me if you find any issues with other platforms.) [/size][/font] [font="Arial"][size="2"]Simply include SOIL.h in your C or C++ file, link in the static library, and then use any of SOIL's functions. The file SOIL.h contains simple doxygen style documentation. (If you use the static library, no other header files are needed besides SOIL.h)...[/size][/font] [font="Arial"][size="2"][/quote][/size][/font][font="'Times New Roman"][size=2] [/size][/font] [font="Arial"][size="2"] [/size][/font] [font="Arial"][size="2"]So... either use the static lib in the zip file, or compile your own static lib. Link to it (presumably you need to tell C::B where the lib file is, and add it to the list of libraries you're linking) and #include the header file.[/size][/font]
  2. This page has instructions on how to use SOIL: [url="http://lonesock.net/soil.html"]http://lonesock.net/soil.html[/url]
  3. Preventing thread reviving

    Thread Title: Preventing Thread Revival [quote name='Gaiiden' timestamp='1313772454' post='4851270'] Totally. Even I've gotten tricked into participating in a necro'd thread a time or two [/quote] [quote name='Gaiiden' timestamp='1322254768' post='4887717'] Good news everyone! Invision has just announced their [url="http://community.invisionpower.com/blog/1174/entry-7053-ipboard-33-dev-update-archive-system/"]archive ability for the new 3.3 release[/url]. It's a few months down the road but it's coming! [/quote] ... *Looks forward to further irony in a few months time.*
  4. Spectrum Analysis with SFML

    I think FFTW is also prohibitively expensive for a commercial (non-GPL) license (several thousand dollars - I can't remember the exact figure).
  5. c++ vector and bitset comparison

    std::unique() with (if necessary) a custom predicate?
  6. [quote name='d k h' timestamp='1321440662' post='4884522'] So, PIX tells me that [i]diffuse_light[/i] ends up being 0.0/0.0/0.0 - so it makes sense that the point light doesn't show up. But why is [i]diffuse_light[/i] 0.0/0.0/0.0? [i]normal[/i] is 0.0/0.0/-1.0 which sounds 100% correct considering the camera is looking at a straight wall, that's the view space normal correctly transformed into world space. [i]light_vector[/i] is -0.26/0.01/0.97. This one is very hard to check but it looks right to me, considering it's surface to light and it's mostly 0.0/0.0/1.0, the opposite of the world space normal. [b]Actually, with these values, taking the dot product of two vectors that point in the opposite direction of each other, shouldn't that return 0 when clamped to range 0..1? Do I have to flip one of these vectors?[/b] [/quote] Yup, sounds like this is your problem. If the light were straight in front of the wall, the normal and surface to light vector would be the same. This way round, the light is more or less "behind" the wall. Not sure it's the problem, but how are you transforming your normal into view space in the first place?
  7. GLSL get vec4 component

    [quote name='pcmaster' timestamp='1320853720' post='4882151'] It's worth to mention that this (syntactic and hardware) feature of shading languages is called SWIZZLING - [url="http://en.wikipedia.org/wiki/Swizzling_%28computer_graphics%29"]http://en.wikipedia.org/wiki/Swizzling[/url]. Just in case since it isn't obvious what you're asking, according to my knowledge, you cannot index your built-in vector/matrix types' components by variables (nor literals) in current shading language (such as vec3 v; float x = v[2]). [/quote] Actually, you can indeed use the subscript operator to index vector elements (at least, my GLSL v400 specs tell me so - I don't know what version this was introduced): [quote] Array subscripting syntax can also be applied to vectors to provide numeric indexing. So in vec4 pos; pos[2] refers to the third element of pos and is equivalent to pos.z. This allows variable indexing into a vector, as well as a generic way of accessing components. Any integer expression can be used as the subscript. The first component is at index zero. Reading from or writing to a vector using a constant integral expression with a value that is negative or greater than or equal to the size of the vector is illegal. When indexing with non-constant expressions, behavior is undefined if the index is negative, or greater than or equal to the size of the vector. [/quote]
  8. Unity String:gmatch in lua problem

    I'm really not sure if I understand what you're asking, but you probably want something like this: [code] -- Assuming input file is just a list of file names + extensions, with only one per line. local input = io.open("test.txt", "w") local output = "" for line in input:lines() do local textfile = line:match("(%w+)%.txt") if textfile then output = output .. textfile .. "\n" end end input:close() print(output) [/code] I leave outputting things in the exact way you want for you to do. Note that gmatch is for iterating over a string, but you probably want to use match instead if you just have one text file per line in the input. Note that there are two ways to call the string.gmatch function: string.gmatch(input_str, pattern) and input_str:gmatch(pattern). You seem to be mixing these in ways that do not make sense. I would also be surprised if just putting +1 as a parameter to output does what you want.
  9. stl:list iterator error: list iterators incompatible

    When you erase something you invalidate the iterator. Try this instead: [code] //... if((*i)->checkIfOverDeletionThreshold(xDeletionPoint)) i = lObjects.erase(i); else ++i; // ... [/code] EDIT: was waaaay too slow
  10. In photoshop, paste the image into a layer, create a mask for that layer, and then copy / paste the same image onto the mask (black is transparent in the mask layer, and white is opaque). You will almost certainly have to fiddle with the mask to make the image as similar as possible to the original (stick another layer filled with black under the masked layer to compare).
  11. Text Loading problem prehaps?

    [quote name='PGSCreativeDirector' timestamp='1319225740' post='4875139'] [code] //Shader GLuint Shader; GLuint shadertype =GL_FRAGMENT_SHADER; Shader = glCreateShader(shadertype) ; glShaderSource(Shader, 1, (const GLchar**) &str, NULL); glCompileShader(Shader); //Error Check Shader if(Shader) { fprintf(stderr, "doesnt work!d"); } else { fprintf(stderr, "Does Work!d"); } [/code] [/quote] As a side note, this is not how you check a shader is "working" or not. Look into glGetShaderiv.
  12. What is this?

    Cool. Thanks for the replies.
  13. What is this?

    From a BBC article about the viasat-1 satellite: [attachment=5806:viasat-1.png] I've seen it before in pictures of satellites, but what actually are all those spiky blocks, and what do they do?
  14. Unity Pro License

    According to the EULA: [color=#444444][font=Helvetica, Arial, sans-serif][size=2](d) A company, educational institution, incorporated entity, or individual may not license both Unity Pro and Unity at the same time.[/size][/font][/color] So I think you're ok as long as you're separate individuals, and only one individual actually uses the pro license (say to put everything together). If you become a company, you'll all need to have the pro license.
  15. Unity Compiling

    I imagine it does exactly what your gui code tells it to do. Post it and we might be able to point out why... It might also help to tell us what you actually want it to do.