Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Text is difficult to combine

  1. #1
    Intern Newbie
    Join Date
    Apr 2018
    Posts
    44

    Cool Text is difficult to combine

    Here's the part I dont get, after years.
    Why its difficult to do text and modeling.

    With everything working in the Solar System, I had to call
    projection/modelview up to 4 times in a frame.

    view3ds:
    only initializes projection/modelview once.


    after getting text to work in view3ds, and then models failing to draw after switching text on and off once, it becomes clear I dont know the rules of text and model together. (EVEN THO I GOT IT WORKING) or anything that makes sense about it all.

    I dont see any other programs that draw text and models, for more examples.
    why is it I dont expect and answers here, like the guy that was ignored when he asked for
    a method to get 2d screen points. obviously no one knew how but me.
    did I reveal something no one else groks either? wish it made sense.

  2. #2
    Intern Newbie
    Join Date
    Apr 2018
    Posts
    44
    3 of the 10 warnings in lib3ds - de referencing pointer, breaks strick-aliasing..
    SHOULD IT BE USED? I dont know if I dont know nuthin ... J mib
    others were for signed/unsigned

    lib3ds_io_write_float(Lib3dsIo *io, Lib3dsFloat l)
    {
    Lib3dsByte b[4];
    Lib3dsDword d;
    ASSERT(io);
    d=*((Lib3dsDword*)&l); <<<<<<<<<<<<<<<makes ya laugh,

  3. #3
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    6,065
    Quote Originally Posted by greennights View Post
    Here's the part I dont get, after years.
    Why its difficult to do text and modeling.
    OpenGL is not a rendering engine; it's a low-level rendering system. It doesn't do things for you. You are supposed to take responsibility for doing things like keeping up with models and text and such on your own.

    Quote Originally Posted by greennights View Post
    With everything working in the Solar System, I had to call
    projection/modelview up to 4 times in a frame.

    view3ds:
    only initializes projection/modelview once.
    It's hard to analyze what you're talking about here when what you have said lacks any explanation of what you're trying to do. For example, your first sentence talks about having to "call projection/modelview up to 4 times in a frame". You had to do this in order to do what? You mention the "Solar System"; is that what you're trying to render?

    And what is `view3ds`? Google provides no insights. If that's the tool you mentioned on your previous thread, you should probably says what it is, perhaps with a link, so that other people can know what you're talking about.

    Quote Originally Posted by greennights View Post
    after getting text to work in view3ds, and then models failing to draw after switching text on and off once, it becomes clear I dont know the rules of text and model together. (EVEN THO I GOT IT WORKING) or anything that makes sense about it all.

    I dont see any other programs that draw text and models, for more examples.
    There are plenty of programs that do this. Basically every 3D videogame that exists does this. There are tons of freeware engines out there that do this. There are even online tutorials that handle it. If you're looking for example code to crib from, there's lots of it out there.

    Quote Originally Posted by greennights View Post
    why is it I dont expect and answers here,
    It's impossible to give you answers here because you've provided so little detail as to what is going on that it's basically impossible. Your question of "I can't get models and text to work" is equivalent to calling up a mechanic and saying "my car isn't working", then expecting the mechanic to be able to tell you exactly how to fix it over the phone. You simply haven't given us enough information to work with.

    It isn't even possible for us to write your code for you, because you haven't even given us your codebase for us to build on. And without knowledge of how you're currently rendering stuff, or even just details of what you're trying to render (more specific than "models and text"), it's impossible for us to give general instructions and suggestions for what might be wrong.

    Quote Originally Posted by greennights View Post
    like the guy that was ignored when he asked for
    a method to get 2d screen points. obviously no one knew how but me.
    That's an interesting conclusion to draw. But it's based on the assumption that merely knowing how to solve a problem means that one will solve that problem when it is presented to them, and therefore if one did not solve it, then one must not know how.

    This assumption is of course incorrect. People choose to answer what they choose to answer for their own reasons and nothing else.

    3 of the 10 warnings in lib3ds - de referencing pointer, breaks strick-aliasing..
    SHOULD IT BE USED?
    I would personally never use it, but that's because I believe 3ds is a terrible file format and I wouldn't touch it with a 10-meter pole.

    But strict-aliasing violations? No, that should not be considered a disqualifier, particularly if they're of the form you described. Low-level C and C++ programs occasionally have to do bit-casting like that. While C++20 will canonize that ability in a `std::bitcast` function, until then breaking strict-aliasing is the only way to access the bits of a float.

    The same goes for some forms of signed/unsigned issues. Just look at the code and see if it's a false positive or if there's a genuine programming error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •