Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

307 Neutral

About santa01

  • Rank
  1. When the fragment processing (and sorting with depth test enabled) happens. see glDepthRange().
  2. santa01

    Close file sooner or later?

    I'd recommend sooner, Damian Conway - Perl Best Practices also recommend such approach, I guess its valid for other languages too. The only option for not releasing any resource (after its not required any more) is when the release process itself consumes much resources. For instance any garbage collector delays memory releasing because it could be cpu and time consuming.       for example any unhanded exception will probably halt your program and any buffered data won't be flushed to a file.
  3. santa01

    SDL + OpenGL V-Sync

      It will be a good start As proanim@ mentioned its now 2.0 and should be cloned/compiled from mercurial repo.
  4. santa01

    SDL + OpenGL V-Sync

    glXSwapIntervalEXT is not crossplatform, for win you should call wglSwapIntervalEXT. Also, if I am not mistaken, for glXSwapIntervalEXT you should link against libX11 as -lX11   Also you can look at this post: http://forums.libsdl.org/viewtopic.php?p=24220&sid=a85c51359b9040234fece5114e1d5787#24220
  5. santa01

    GLUT or native window?

      GLUT. Its easier, its cross platform. Believe me, if WinAPI is something you can handle with MSDN opened, X11 is hell.
  6. Probably this is what you are looking for http://www.opengl.org/wiki/Multisampling Still I am not quite sure on what stager does the MSAA performed.
  7.   glBufferSubData() to update the contents of VBO glBufferData() to reallocate and init VBO   If you already have some knowledge open opengl you can look through the opengl wiki: http://www.opengl.org/wiki/Buffer_Object http://www.opengl.org/wiki/VBO#Vertex_Buffer_Object     Its up to you, try both options, pick what fits your needs best.     Then _definitely_ try both options :) Early optimization isn't vital, moreover its usually harmful. Make a working prototype first.
  8.   Until you don't need to update the geometry of one single triangle, you don't need 10.000 VBOs to store them (JFI: you can take advantage of glDrawElementsInstanced()).     not sure what you mean under the `data set' here: in the first (1) variant you can bind texture once for use with both shapes in the second variant I think you want to have two shapes with their own textures? in this case you would bind texture object 1 + render vbo 1, than bind texture object 2 + render vbo 2 in the third variant I am not sure what you want to achieve, but you certainly can do as in (1)
  9. [quote name='Spck' timestamp='1356778009' post='5015391'] If I have 2 objects, both exact copies except for position, is there a simpler way to render them besides passing the data twice? [/quote] You can pass a translation matrix as a uniform variable to a shader and render one object twice with different matrices.
  10. [quote name='Cornstalks' timestamp='1356775436' post='5015383'] kill(getpid(), SIGTERM); [/quote] I'd suggest also to install a handler for this signal to perform any manual cleanups like finishing network sessions properly, dump config files etc.
  11. [quote name='Álvaro' timestamp='1356728174' post='5015178'] I have felt the need for something like this when I have classes Vector3D and Point3D, which are essentially the same thing, but I need to define them separately if I want the type system to help me make sure my operations make sense (e.g., you are not allowed to add points, but adding vectors is fine, and so is adding a point and a vector). [/quote]   Ok, I got the idea. Still thats more like a copy of the type, rather than a typedef, so i suggest something like:   typecopy unsigned int Centimeters; typecopy unsigned int Inches; which should make an exact type copy under the specified name.   Also its not clear what to do with types hierarchy. Lets say: class A {}; class B: public class A {}; typecopy B MyB; // should MyB also be a subclass of A or just copy the public part of an A interface?
  12. [quote name='Álvaro' timestamp='1356725134' post='5015153'] You seriously don't understand why it's desirable to get a compiler error if someone has a quantity in centimeters and tries to use it where a quantity in inches is expected? [/quote] This is not my point. My point is thats not a compiler (c++ grammar) problem. Its worth implementing as a part of an STL.
  13. [quote name='Servant of the Lord' timestamp='1356723633' post='5015148'] I don't want Centimeters and Inches to be convertible [/quote] Well and I don't understand why. As I wrote earlier built-in types with similar (in fact equal) semantics _are_ convertible. In your example you are trying to introduce a new type (not an alias in fact, alias is usually just another typename). Simple constructions such as `fancy_typedef old_type new_type' aren't able to describe the type semantics at all (both Centimeters and Inches are just lexems for compiler, you don't define what can be done to them). If you suggest semantics should be copied from the old_type than new_type would be just a typename, not a new type.
  14. santa01

    how to avoid macro loops

    [quote name='proanim' timestamp='1356721348' post='5015133'] And this approach gives white triangle instead of rainbow color effect that you see in usual tutorials that use color shader. [/quote] How do you render your polygon?
  15. Hm... Can I ask why this feature is vital? Conversion between typedef unsigned int Centimeters; typedef unsigned int Inches; are legal as for me, as the real types are the same.   For incompatible types gcc (at least) drops an error: ??[santa@yukio ~ $] ? ??> g++ test.cpp -o test -pedantic -Wall test.cpp: In function ‘int main()’: test.cpp:9:8: error: cannot convert ‘MyFloat {aka float}’ to ‘MyInt {aka void*}’ for argument ‘1’ to ‘void test(MyInt)’ ??[santa@yukio ~ $] ? ??> cat test.cpp typedef void* MyInt; typedef float MyFloat; void test(MyInt) { } int main() { MyFloat f; test(f); return 0; } For compatible types you won't get an error even without typedefs: ??[santa@yukio ~ $] ? ??> g++ test.cpp -o test -pedantic -Wall test.cpp: In function ‘int main()’: test.cpp:9:8: warning: ‘f’ is used uninitialized in this function [-Wuninitialized] ??[santa@yukio ~ $] ? ??> cat test.cpp void test(int) { } int main() { float f; test(f); return 0; }
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!