Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

114 Neutral

About pavel989

  • Rank
  1. pavel989

    C# graphics.;psum but even my pc at home which pulls gears of war quite well, was flickering.
  2. pavel989

    C# graphics.

    well to my understanding, id have to install the XNA libraries, and the computers at school are heavily restricted. If i could've used additional graphics libraries, i couldve been done by now. Also, i already had double buffering on, through the form options, but i followed the directions, and it still flickers. im pretty sure my code is inefficient which im looking into. but thanks for the help
  3. hey all, I was learning opengl with C++, when i decided to make a C# pacman for my programming class in school. And im fairly lost because im used to C++/opengl (which so far i like more, but no need for a flame war.... yet?) Anyways, the way im drawing to the screen is that i have 2 graphic objects, one from the actual form and another from a bitmap. and i was saving the bitmap to the bg of the form, and recreating the form graphics. at first it thought that it would make it faster bc it doesnt seem to me as though itd take much processing to set a bg. BUT!! I still get a flicker. And i dont know how to do this correctly. Can anyone explain to me a faster way?
  4. pavel989

    [C++] splitting code into files

    well I've gotten down to where only 2 files need it. which im questioning why, because I think that my font engine, doesn't necessarily need the HDC, which would leave me with just one file. but i dont understand why globals are such a problem. I dont understand why it would cause a problem, for example, why would there be any ambiguity if it's the same thing in memory.
  5. pavel989

    [C++] splitting code into files

    my opengl window has its origin at the bottom left, but windows sends mouse coordinates with the origin at the top left of the window. So, i could probably clear out a lot in the window messages for resizing and things, but anything associated with mouse clicks would need access to it. also, im trying to figure out why my font engine needs access to the window hdc. i took the code from nehegl, and adapted it. hence my lack of knowledge.
  6. pavel989

    [C++] splitting code into files

    the reason i need global access, is because almost every other class somehow needs to know either what the current size of the window is, or where it is. which is where i keep all that info, in window. and ill try to do an extern, which i already did, but i never gave the globals.h file a globals.cpp file. ill work on that when i can
  7. I read the guide in the articles, and it got me started but ive run int a few questions and problems. To me it seems as though I need to have objects available at global scope, which to my understanding is bad to do in C++. well, idk how else to do it. i have a window class and i basically need a whole bunch of other headers that need to be able to access a single instance of that class (if thats even the right wording). currently i have a header file which links to a class header, and it initializes an object of that class. the class is Window and the object is window. so is this the best way to have all my other classess and functions access window? is there a better way? also would namespaces help me out?
  8. pavel989

    c++ static vars in a class

    well i really did not want to make this a global variable for that reason. but i didn't find a way around it. The thing is, it's just a single class, which has data about the current window. like its position and size, and hdc and so forth. an lppoint and all the rest are win32 things. So, i have a bunch of code that needs to access the window data so i tried to make it a global variable, which clearly gave me problems. Well just now i found that the problem i was having is that i was initializing its value in the wrong place. I understood that if i define a static variable i must also declare its value. i thought i was doing so, but i was doing it in the class header file, which for some reason was causing problems. moved em down to the class cpp file and now its all good. thanks to everyone that helped.
  9. pavel989

    c++ static vars in a class

    well the thing is, lppoint is one of many things. so idk if itd make sense to do it for all those things
  10. pavel989

    c++ static vars in a class

    uhm, that was a failed attempt. looked fine in the text enter field. dammit
  11. pavel989

    c++ static vars in a class

    actually i think i did bad linking: class file | object header-----------| ______________________________| | | | file1 file2 file3 so technically its being called like 3 times or w/e. Could that be the problem?
  12. pavel989

    c++ static vars in a class

    tried that, but dint work. ima check maybe i did something wrong. i felt that it worked like an extern where i have to declare it. does it matter that i haven't implemented namespaces
  13. hey guys, I have a class with a buncha static variables. compiling my program i get a buncha linker errors that follow this pattern: 1>window.obj : error LNK2001: unresolved external symbol "private: static struct tagPOINT * Window::lpPoint" (?lpPoint@Window@@0PAUtagPOINT@@A) i think im gettin them bc i have another header file, which is holding a global object of that class. it links to the header of the class header. and thus, all the files that link to my object header, are screwing up the class, in a sense. Is that possible? i really dunno what to do.
  14. pavel989

    push_back changes all values

    oh wow, I figured they would all be char*, but im switching to strings anyway. im really learning a lot about C++ now, this is really interesting.
  15. pavel989

    push_back changes all values

    ive been reading up on the rule of three. and it makes great sense, and im very glad i was introduced to it. So, do you guys recommend for me to just use std::string or simply implement the rules of three so that it copies right into me own class?
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!