Search found 173 matches

by X Abstract X
Mon Aug 16, 2010 10:52 pm
Forum: Programming Discussion
Topic: mvEngine Development Thread
Replies: 115
Views: 7345

Re: mvEngine Development Thread

What value are you passing as vertices? I've never used glDrawArrays so excuse my ignorrance but, why are you diving vertices by 4? Shouldn't the 3rd argument of glDrawArrays() be 4?
by X Abstract X
Mon Aug 16, 2010 7:59 pm
Forum: Programming Discussion
Topic: mvEngine Development Thread
Replies: 115
Views: 7345

Re: mvEngine Development Thread

I would try to do things a bit differently. I've always used glVertexAttribPointer so I might be off on my glVertexPointer and glTexCoordPointer arguments. struct Vector3f { GLFloat x, y, z; }; struct Vector2f { GLFloat x, y; }; struct Vertex { Vector3f position; Vector2f texCoord; }; unsigned int n...
by X Abstract X
Mon Aug 16, 2010 6:43 pm
Forum: Programming Discussion
Topic: Freeing memory
Replies: 2
Views: 386

Re: Freeing memory

Assuming that the dynamically allocated memory needs to remain allocated for the lifetime of the object, it should be freed in the destructor, that's what destructors are for.
by X Abstract X
Mon Aug 16, 2010 5:50 am
Forum: Programming Discussion
Topic: My AutoClicker
Replies: 6
Views: 639

Re: My AutoClicker

I was expecting something really lame but it turned out to be amazing! Really nice man!
by X Abstract X
Mon Aug 16, 2010 12:14 am
Forum: Game Development
Topic: Allegro vs SDL vs SFML (yea, many outdated topics out here)
Replies: 19
Views: 7958

Re: Allegro vs SDL vs SFML (yea, many outdated topics out here)

Pointers are useful when something is optional or when something has the chance to not exist. You could have an optional function parameter or a class that contains an optional object. You could have a function return a pointer instead of a reference when there's a chance something could go wrong in...
by X Abstract X
Sun Aug 15, 2010 4:38 pm
Forum: Programming Discussion
Topic: Fstream + Enum's
Replies: 2
Views: 363

Re: Fstream + Enum's

I don't think it's possible. You could try using a hashmap, personally I use boost::unordered_map for things like this. It won't be as fast as an enum but it's a lot faster than std::map. The boost libraries offer so much, it's worth adding it as a dependency anyway. If you want to use boost, here's...
by X Abstract X
Sat Aug 14, 2010 12:43 pm
Forum: Game Development
Topic: Allegro vs SDL vs SFML (yea, many outdated topics out here)
Replies: 19
Views: 7958

Re: Allegro vs SDL vs SFML (yea, many outdated topics out here)

Basically it's SDL vs. SFML. I use SDL because that's how I started out but from what I've heard, SFML is better in many aspects. SFML is more OO and it has better hardware acceleration than SDL. I'm not sure about the specifics but I *think* SDL has almost no hardware acceleration while SFML is alm...
by X Abstract X
Fri Aug 13, 2010 12:32 pm
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

http://rapidshare.com/files/412705189/newbuild.zip Ok so here is the new, I realised that my frame rate was fucked and was capping it wrong So try it know and also see if the is any diffrence when you use another openGL dll ( I doubt it'll make a diffrence but its worth a try ) It's still screwed. ...
by X Abstract X
Fri Aug 13, 2010 11:56 am
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

http://rapidshare.com/files/412705189/newbuild.zip Ok so here is the new, I realised that my frame rate was fucked and was capping it wrong So try it know and also see if the is any diffrence when you use another openGL dll ( I doubt it'll make a diffrence but its worth a try ) It's still screwed. ...
by X Abstract X
Thu Aug 12, 2010 4:15 pm
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

N64vSNES wrote:
X Abstract X wrote:What is CurrentTick?
CurrentTick is the time that has alapsed
Time elapsed since the start of program? That would translate to:

Code: Select all

if (0 > 1000) {
    if (CurrentFrame > MaxFPS) {
        SDL_Delay(1000 / MaxFPS);
        CurrentFrame = 0;
    }
}
by X Abstract X
Thu Aug 12, 2010 3:10 pm
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

What is CurrentTick?
by X Abstract X
Thu Aug 12, 2010 2:49 pm
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

My CPU was at 12%. I didn't look at that code yet, I'll edit this in a bit. I keep having to end the task to quit, is there an exit key? lol Lol sorry about that, I wonder why it would slow down if you're CPU was a only at 12%.......Maybe its just my shitty PC and I'm not capping the framerate corr...
by X Abstract X
Thu Aug 12, 2010 2:42 pm
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

My CPU was at 12%, it was sitting at 6% before running your app. I didn't look at that code yet, I'll edit this in a bit.

I keep having to end the task to quit, is there an exit key? lol
by X Abstract X
Thu Aug 12, 2010 2:15 pm
Forum: Programming Discussion
Topic: OpenGL lag problem
Replies: 30
Views: 2238

Re: OpenGL lag problem

Oh yes, he runs at about half the speed when he's in the tiled area. I'm not so sure it's a rendering issue though. How does your main loop look and how are you capping the logic framerate?