Search found 41 matches

by Pornomag
Thu Jan 24, 2013 6:10 am
Forum: Game Development
Topic: My Year Project
Replies: 5
Views: 4114

Re: My Year Project

Ginto8 wrote:If you spend too much time thinking about what you want to do, you won't spend enough time actually doing anything.
+1
by Pornomag
Wed Jan 23, 2013 2:21 am
Forum: Programming Discussion
Topic: C vs C++ style of interface for hardware abstraction layer
Replies: 17
Views: 9300

Re: C vs C++ style of interface for hardware abstraction lay

These are going to introduce a good amount of overhead by nature of temporary variable creation . Why does this happen and is this done by compilers? What is causing the variables to be created? class Vector2 { private: int _x, _y; public: inline Vector2(const int x, const int y): _x(x), _y(y) {} i...
by Pornomag
Mon Jan 14, 2013 11:11 pm
Forum: Programming Discussion
Topic: C vs C++ style of interface for hardware abstraction layer
Replies: 17
Views: 9300

Re: C vs C++ style of interface for hardware abstraction lay

If I were you, I would not worry about performance, just get it working, and then later you can optimize if you need to. You should not premature optimize, optimize when you have working code that you think could be faster. Do note that this doesn't mean write dumb code. Read this: http://prog21.dad...
by Pornomag
Tue Jan 17, 2012 8:08 pm
Forum: Programming Discussion
Topic: Perspective
Replies: 33
Views: 4590

Re: Perspective

OK I honestly just tried to get your code working (which I did), it does work with 0 degrees field of view, it just doesn't shrink the triangle for some reason, use 60 degrees and just move the triangle in and out. The only other problem(s) you should be having are the following, you've set your fie...
by Pornomag
Tue Jan 17, 2012 3:59 am
Forum: Programming Discussion
Topic: Perspective
Replies: 33
Views: 4590

Re: Perspective

Post your current code then!
by Pornomag
Tue Jan 17, 2012 12:11 am
Forum: Programming Discussion
Topic: Perspective
Replies: 33
Views: 4590

Re: Perspective

OK, well I searched for your code and I found it (hopefully it's the right one). I'm not *that* experienced with OpenGL but I do know a fair amount of it. First things first we'll start off how your initializing your scene. void initialize_it(void) //sets up graphic stuff. { glClearColor(0.0, 0.0, 0...
by Pornomag
Mon Jan 16, 2012 11:35 pm
Forum: Programming Discussion
Topic: Perspective
Replies: 33
Views: 4590

Re: Perspective

... gluPerspective(45.0f,2.0f,-0.1f,-100.0f); your problems should disappear, and you should be able to have angles other than 0. last 2 parameters MUST be positive ;) http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml Oh and Ben, post your code (hope you don't mind me calling you Ben S:)
by Pornomag
Sat Jan 14, 2012 7:46 am
Forum: Programming Discussion
Topic: Perspective
Replies: 33
Views: 4590

Re: Perspective

Umm use Depth Testing? glEnable(GL_DEPTH_TEST); and you have to clear that buffer too so: glClear(GL_DEPTH_BUFFER_BIT); // you can use it in one function like so: glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); If it's still the same, see if you're transformations and such are ok? S:? Just reali...
by Pornomag
Thu Dec 15, 2011 7:12 am
Forum: Programming Discussion
Topic: How many interfaces is too many interfaces?
Replies: 6
Views: 1159

How many interfaces is too many interfaces?

I've always wondered, how many interfaces is *too many* interfaces... Is it good to have a lot of interfaces or just a few, or just to have as minimum as possible? Let's say... If I had lets say a Transformable Interface that can transform something (e.g. rotate, position, scale), should it be an in...
by Pornomag
Thu Sep 22, 2011 11:47 pm
Forum: Programming Discussion
Topic: This is killing my brain...
Replies: 5
Views: 1287

This is killing my brain...

Okay basically I've gone into this stage where I have no idea what to do anymore. OK here's my situation and tell me your opinion on what you would do. Okay, so far I've been designing classes with SDL for images, font's, sounds, a window and such. Now so far, I haven't been working with OpenGL at a...
by Pornomag
Tue Sep 20, 2011 7:12 pm
Forum: Programming Discussion
Topic: Virtual Function Problemo
Replies: 15
Views: 3416

Re: Virtual Function Problemo

If your issue is with a base type destructor, you're probably trying to delete a BaseImage* that actually stores a SWRImage2D. Now I couldn't find that situation in any of the posted code, but if that's the issue, just declare ~BaseImage() as virtual ie: virtual ~BaseImage() {} This causes the comp...
by Pornomag
Mon Sep 19, 2011 5:06 am
Forum: Programming Discussion
Topic: Virtual Function Problemo
Replies: 15
Views: 3416

Re: Virtual Function Problemo

OMG I AM A FREAKEN IDIOT!!!!!!! The reason it is not working is because I defined a DESTRUCTOR in the BaseImage class, now for some reason, which I do not know was making that use the BaseImage's virtual functions. If anyone knows why this is, could you please explain?
by Pornomag
Mon Sep 19, 2011 4:59 am
Forum: Programming Discussion
Topic: Virtual Function Problemo
Replies: 15
Views: 3416

Re: Virtual Function Problemo

Might have to start redesigning my classes then.
by Pornomag
Mon Sep 19, 2011 4:28 am
Forum: Programming Discussion
Topic: Virtual Function Problemo
Replies: 15
Views: 3416

Re: Virtual Function Problemo

UGHHHHHHHH >.< I am getting really frustrated with this... D: I have no idea what I did wrongggggggggggggggg. Thanks for your reply though.