.X Files In Opengl

Started by
16 comments, last by FlyingIsFun1217 16 years, 2 months ago
Don't Read Source Code.

Don't Write Tutorials
Mike Popoloski | Journal | SlimDX
Advertisement
Yeah, I was just pointing out that you need to know what to do before you do it.

That was my biggest problem (and still is, to a small degree), thinking that I could copy, mix, and match code, and understand it too.

Later on, when I started game development, I realized I was only fooling myself. And because of that, I am still learning when I could be farther ahead than I am.

Hopefully you'll learn something out of it, whether or not you struggle.

FlyingIsFun1217
I actually started out using directx more than
a few years ago, I didn't like it and also when
I ran an app, there was always 100% cpu usage.

So I have dealt with x files before.

I understand the meshes,templates,materials and all
that stuff.

I had a 3d modeler application that was exporting xfiles
with extra commas that wouldn't work in my application, I wrote
a line by line app to knock off the commas. I worked that out on my
own.

I've used other engines Irrlict I used that and it was buggy and
100% cpu.

I bought Torgue years ago and that was a total waste.

So now I'm using opengl and it's going good,low cpu usage which
is good,all kinds of good things.

I don't need someone to give me vb.net code.

I'll make the loader and I'll have it working shortly.

Steve

How are you using openGL and not getting 100% cpu, you must be using some kind of threading library. The reason you get 100% cpu is because you don't have some kind of sleep call in your code.
You shouldn't call another engine buggy just because you didn't know how to use it. It always bothers me when programmers say something is buggy because they refuse to give the time to learning it. How was torque a waste of time? Did you just not understand how to use it?
Knocking out a couple comma's is not parsing a file. You really really need to take a step back and go back to learning how the language actually works.
I would recommend you take a step back, try making something much simpler, maybe text based black jack, or a text based adventure game.
If you really don't want to learn programming, maybe take a look at the game maker's which are available out there.
Steve5050:

1) Please stop hitting enter after every couple of words you type. This makes your posts very painful to read.

2) 100% CPU usage has absolutely nothing to do with the rendering API you use. It has to do with the way you interact with the Windows process scheduler. If you correctly process the Windows message queue with blocking wait calls or appropriately placed sleeps, you will not get constant 100% usage on either D3D or OpenGL.

3) 100% CPU usage is actually a good thing for CPU intensive applications that aren't user input event driven, such as games.

As others have suggested, you're trying to do something way over your head. Try to go a step backwards, and learn about the basics first. Writing a parser for an X file is a good learning step, and not very difficult to do.

Oh, and the article is not written in "Dev C Plus Plus", but in C++. DevC++ is an integrated development environment. C++ is the language.
Thanks for clearing all that up for me.You have all been so helpful.
Thanks
Steve
Quote:Original post by Steve5050
I've used other engines Irrlict I used that and it was buggy and
100% cpu.


It is not because of Irrlict that CPU usage goes to 100%. It is because you are running an infinite loop, very much like the rest of the world does when they are doing a game.
The other option is to make your program input driver, like 3d Studio max, Blender, Maya, ...
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by Steve5050
I'll make the loader and I'll have it working shortly.


More power to ya bro. I'm not the one who needs the loader.

FlyingIsFun1217

This topic is closed to new replies.

Advertisement