Search:

Type: Posts; User: JMK

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,083

    Fast removal with lists

    I'm pretty confused about lists. They work as I would expect except for removing elements.

    The erase() method wants an iterator. But if I remove one element, the position of all the others after...
  2. Hiring programmer to write screenshot and video capture program

    I am looking for a programmer to develop a program which can take screenshots and record video from any game on Windows 7, Vista, and XP. MacOS support would be nice, but it's not required. The...
  3. Replies
    7
    Views
    7,346

    It was caused by my misunderstanding of the...

    It was caused by my misunderstanding of the std::map protocols. I did not realize it was written in the worst most inconvenient way possible.
  4. Replies
    7
    Views
    7,346

    The debugger lists the pair "materialcolor" (the...

    The debugger lists the pair "materialcolor" (the name string) and 0x00000, even though the local uniform variable is not NULL. It looks as though I did this:

    uniforms.insert(std::...
  5. Replies
    7
    Views
    7,346

    Map insert not working?

    map.insert fails every time. If I create a temporary map in the function it works fine.

    class OpenGLShaderReference : public ShaderReference
    {
    public:
    map<std::string,OpenGLUniform*>...
  6. Replies
    5
    Views
    1,655

    Oh god. :| Thanks.

    Oh god. :|

    Thanks.
  7. Replies
    5
    Views
    1,655

    No. MSVC also says: CLS_COLOR is a...

    No. MSVC also says:


    CLS_COLOR is a constant.
    #define CLS_COLOR 1;
  8. Replies
    5
    Views
    1,655

    Bitwise and in an if statement?

    Why does this code produce errors?:

    if (CLS_COLOR & clsmode)
    {
    clsflags += GL_COLOR_BUFFER_BIT;
    }
  9. Replies
    3
    Views
    4,373

    Copy float value to memory block

    I want to copy a float value to an allocated block of memory, with an offset from the memory block pointer.


    void Bank::PokeFloat(const int& pos, const float& n)
    {
    if (pos<0) return;
    if...
  10. Thread: Including GDI

    by JMK
    Replies
    7
    Views
    3,697

    I opened BUild Options, and in Link Libraries I...

    I opened BUild Options, and in Link Libraries I just added this line:
    libgdi32.a

    And it worked!
  11. Thread: Including GDI

    by JMK
    Replies
    7
    Views
    3,697

    I don't know what that means. I get this...

    I don't know what that means.

    I get this error:


    On this line:

    wc.hbrBackground = (HBRUSH)GetStockObject( WHITE_BRUSH );

    I am using Code::Blocks with the GCC compiler.
  12. Thread: Including GDI

    by JMK
    Replies
    7
    Views
    3,697

    I did create a window using CreateWindowA. I...

    I did create a window using CreateWindowA. I need to include GDI for it to work. It gets automatically included in a Window program, but not a console program, so I need to know what to include.
  13. Thread: Including GDI

    by JMK
    Replies
    7
    Views
    3,697

    Including GDI

    How do I include GDI into a console program? None of these work:

    #include <gdi.h>
    #include <gdi32.h>
  14. Thread: MakeFile example

    by JMK
    Replies
    1
    Views
    1,343

    When I run make.exe, it says this: ...

    When I run make.exe, it says this:


    C:\Project>make
    cc myprog.o -o myprog
    process_begin: CreateProcess(NULL, cc myprog.o -o myprog, ...) failed.
    make (e=2): The system cannot find the file...
  15. Thread: MakeFile example

    by JMK
    Replies
    1
    Views
    1,343

    MakeFile example

    I am trying to set up a makefile for use with GNU make for the first time:

    My program has the following files:
    myprog.cpp
    myprog.h

    Then I want to make an object file and include it from these...
  16. Replies
    6
    Views
    2,068

    Adding this in the class declaration: ...

    Adding this in the class declaration:

    std::vector<Entity&> kids;

    Causes this error:
  17. Replies
    6
    Views
    2,068

    How do I declare that as a member of a class and...

    How do I declare that as a member of a class and initialize it with 0 length?:

    class Entity {
    public:
    std::vector<Entity&> kids;
    };
  18. Replies
    6
    Views
    2,068

    Resizable array of references?

    Does C++ have some kind of resizeable array that can contain references? I need to store references and be able to iterate through them as fast as possible. It may have any number of objects stored...
  19. Replies
    2
    Views
    779

    Thanks. I am learning a lot really fast!

    Thanks. I am learning a lot really fast!
  20. Replies
    2
    Views
    779

    Looping pointer function question

    The Entity class looks like this:

    class Entity {
    public:
    bool hidestate;
    Entity* parent;
    };


    bool Entity::IsHidden()
  21. Thread: Pointers question

    by JMK
    Replies
    6
    Views
    1,042

    Yep: if (src!=NULL) { srcmat = &src->mat; }...

    Yep:

    if (src!=NULL)
    {
    srcmat = &src->mat;
    }

    I ended up making a few overloaded functions so that both references and pointers can be used. References would be adequate if they could be set...
  22. Thread: Pointers question

    by JMK
    Replies
    6
    Views
    1,042

    Thanks, it seems to be working.

    Thanks, it seems to be working.
  23. Thread: Pointers question

    by JMK
    Replies
    6
    Views
    1,042

    Looks like now it needs to convert the mat...

    Looks like now it needs to convert the mat reference to a pointer?:

    Vec3 TFormPoint(const Vec3& point, Entity* src, Entity* dst)
    {
    Mat4* srcmat;
    Mat4* dstmat;
    if (src!=0) {
    srcmat =...
  24. Thread: Pointers question

    by JMK
    Replies
    6
    Views
    1,042

    Pointers question

    I am trying to write use pointers for some function arguments. The reason I am using pointers and not references is that either the src or dst arguments might be NULL.

    Vec3 TFormPoint(const Vec3&...
Results 1 to 24 of 24