0
101 Feb 01, 2003 at 15:49

what do you mean “OpenGL styles libraries”? do you mean C style as apposed to C++?

0
101 Feb 01, 2003 at 15:33

I only use cross platform code, but I also go one step further, and generaly ONLY use OpenGL style libraries. For instance, GLUT, OpenAL, devIL, etc. Reason? Because I dont have to RELEARN anything, i simply can apply what i already know, and spend the other time, actualy working on code.

and THAT is why *OpenGL is better than DirectX. ;)
*

In response to Game Theory
0
101 Feb 01, 2003 at 14:38

The functions below will take a vector argument, and the number of degrees to rotate that vector (could use the vector as the movement, or looking, whatever) they return the new vector after being rotated. 2 things to note, first the vector MUST be normalized. Second, you must know which way you want to rotate, IE, left or right around the axis you want to rotate around, or you could simply always rotate left, but instead of rotating 30 right, you simply rotate 330 left. Get it? Oh, by the way, the vector rotated will not have an up. Meaning, if you rotate the vector 0,0,-1 around the z axis, it wont change, thus if your using a viewing angle with this, you should probly also create an UP vector and rotate that as well, to determin which way is up.

Hope this is what you were looking for.

struct VectorStruct
{
float X, Y, Z;
}

VectorStruct RotateLeftXAxis(VectorStruct V1, float Degrees)
{
VectorStruct TempV1;

if(Degrees < 0)
{
Degrees = 360 + Degrees;
}

TempV1 = V1;

V1.Z = TempV1.Z * (cos(Degrees*PI/180)) + TempV1.Y * (sin(Degrees*PI/180));
V1.Y = TempV1.Y * (cos(Degrees*PI/180)) - TempV1.Z * (sin(Degrees*PI/180));

return V1;
}

VectorStruct RotateLeftYAxis(VectorStruct V1, float Degrees)
{
VectorStruct TempV1;

if(Degrees < 0)
{
Degrees = 360 + Degrees;
}

TempV1 = V1;

V1.X = TempV1.X * (cos(Degrees*PI/180)) + TempV1.Z * (sin(Degrees*PI/180));
V1.Z = TempV1.Z * (cos(Degrees*PI/180)) - TempV1.X * (sin(Degrees*PI/180));

return V1;
}

VectorStruct RotateLeftZAxis(VectorStruct V1, float Degrees)
{
VectorStruct TempV1;

if(Degrees < 0)
{
Degrees = 360 + Degrees;
}

TempV1 = V1;

V1.Y = TempV1.Y * (cos(Degrees*PI/180)) + TempV1.X * (sin(Degrees*PI/180));
V1.X = TempV1.X * (cos(Degrees*PI/180)) - TempV1.Y * (sin(Degrees*PI/180));

return V1;
}

VectorStruct RotateLeftAllAxis(VectorStruct V1, float Degrees[])
{
V1 = RotateLeftXAxis(V1, Degrees[x]);
V1 = RotateLeftYAxis(V1, Degrees[y]);
V1 = RotateLeftZAxis(V1, Degrees[z]);

return V1;
}

VectorStruct RotateRightXAxis(VectorStruct V1, float Degrees)
{
VectorStruct TempV1;

if(Degrees < 0)
{
Degrees = 360 + Degrees;
}

TempV1 = V1;

V1.Z = TempV1.Z * (cos(Degrees*PI/180)) - TempV1.Y * (sin(Degrees*PI/180));
V1.Y = TempV1.Y * (cos(Degrees*PI/180)) + TempV1.Z * (sin(Degrees*PI/180));

return V1;
}

VectorStruct RotateRightYAxis(VectorStruct V1, float Degrees)
{
VectorStruct TempV1;

if(Degrees < 0)
{
Degrees = 360 + Degrees;
}

TempV1 = V1;

V1.X = TempV1.X * (cos(Degrees*PI/180)) - TempV1.Z * (sin(Degrees*PI/180));
V1.Z = TempV1.Z * (cos(Degrees*PI/180)) + TempV1.X * (sin(Degrees*PI/180));

return V1;
}

VectorStruct RotateRightZAxis(VectorStruct V1, float Degrees)
{
VectorStruct TempV1;

if(Degrees < 0)
{
Degrees = 360 + Degrees;
}

TempV1 = V1;

V1.Y = TempV1.Y * (cos(Degrees*PI/180)) - TempV1.X * (sin(Degrees*PI/180));
V1.X = TempV1.X * (cos(Degrees*PI/180)) + TempV1.Y * (sin(Degrees*PI/180));

return V1;
}

VectorStruct RotateRightAllAxis(VectorStruct V1, float Degrees[])
{
V1 = RotateRightXAxis(V1, Degrees[x]);
V1 = RotateRightYAxis(V1, Degrees[y]);
V1 = RotateRightZAxis(V1, Degrees[z]);

return V1;
}

0
101 Feb 01, 2003 at 14:30

I only use cross platform code, but I also go one step further, and generaly ONLY use OpenGL style libraries. For instance, GLUT, OpenAL, devIL, etc. Reason? Because I dont have to RELEARN anything, i simply can apply what i already know, and spend the other time, actualy working on code. I believe there is a growing number of people out there that are going to start usign other OSs, and me being a game developer “In Training” I want my product to be able to get to as MANY people as possible. Besides, open platform is MUCH easier to write than platform specific, i think, no need to learn new stuff for each one.

In response to OpenGL Performance...
0
101 Feb 01, 2003 at 10:21

congratulations :)

0
101 Feb 01, 2003 at 10:01

that’s the advantage of cross-platform libraries. You open up your market with no major concessions. Often there is no overhead as when it is compiled for the OS, all other OS specific code is removed. At least, that’s the impression I get.

In response to OpenGL Performance...
0
101 Feb 01, 2003 at 10:01

I got some breaking news :)
I solved my problem by installing again Win2k…Althought I lost Office and some other softwares , I think its a small price for not formatting the comp , I wanna thanks all of those who dedicated a few secounds from their life to help me :D :D :D :D

In response to hehe
0
101 Feb 01, 2003 at 09:41

I personally wanted to learn both, but I started with OpenGL. I tried several times to learn DX, but each time I failed. Either not understanding or not liking the design. I’m now on linux, so I guess I never will.

btw, My avatar doesn’t show my personal taste, I just thought it was funny. I’ll probably look for a better, pro-linux one

0
101 Feb 01, 2003 at 00:06

ditto.

although i use SDL cuz of it’s cross-platform api. I tested it on my friend’s windows box. there is _NOTHING_ to change.

0
101 Jan 31, 2003 at 23:10

I use ogl and SDL for most of my stuff.

So, in a way it’s cross-platform. I didn’t pick ogl and SDL for that though. OGL coz it’s so cOoL and SDL coz it’s so simple and makes a prefect match for OGL.

I work solely on Linux :]

In response to hehe
0
101 Jan 31, 2003 at 22:12

i like and use both, i just prefer gl because i started with gl..

i learn to have the best of both worlds.. that is for example the coding design structure of dx, namely based on com. com is a great way to encapsulate your stuff, make it reuseable. of course, i don’t use full com, but the basics of it.

and dx9 is really great to work. easy simple and quick as hell..

but i guess your red devil likes to stick his **ck into dx’s big yellow cross as well..

0
101 Jan 31, 2003 at 22:02

i dont use anything but windows (i know linux and co, and worked with it, but they don’t please me currently..).

but i only use crossplatform libraries if they exist, and else i try to wrap it in a way easy to change for other platforms.

0
101 Jan 31, 2003 at 21:32

Well, first of all, OpenGL 2.0 only exists as a growing specification. It is not publically available in the way that DX 9.0 is.
DirectX 9.0 has a HLSL whereas OpenGL 2.0 only has a plan for one.
Other than that the advantages/disadvantages of the two are the same as they have always been.
OpenGL is cross-platform
DirectX has better hardware support (I think)

edit: btw, this could easily turn nasty ;). Just a warning

In response to Model Editing
0
101 Jan 31, 2003 at 18:24

if you want a true open source 3d modeller, try Blender.

In response to OpenGL Performance...
0
101 Jan 31, 2003 at 18:13

GLUT runs in hardware just as well as OpenGL.

In response to Model Editing
0
157 Jan 31, 2003 at 17:50

Are you looking in to making an FPS (First Person Shooter) game? If yes, then you could try for level editors.

1. WorldCraft (used by half-life and many other games)
2. Quark (Used by Quake 3)

For model editors, you could try GMAX.

File specifications are available on the web if you just do a simple search.

In response to I'm glad
0
101 Jan 31, 2003 at 16:21

If you depth-test your objects, you’ll see that far objects are occluded by near ones.

Here is a compiled, and source code version of a OpenGL ortho mode project I was doing to see how fast I could get OpenGL on low end graphics cards, as well as learn OpenGL vertex arrays.

The demo also shows the far objects occluded by the card that zooms to and away from the screen as well you can see the mipmap (level of detail) effects on the cards as the zooming card goes back to its farthest point.

ftp://sf-games.com/MBTest.zip (source)
ftp://sf-games.com/MBTest2.zip (executable)

In response to OpenGL Performance...
0
101 Jan 31, 2003 at 15:12

Just a stupid question but are you using GLUT? That runs in software mode I think.

0
101 Jan 31, 2003 at 11:17

Some true arithmetic for controlling buffers…perhaps?
Take a look at shadow volume techniques (Doom3 anyone?) and i think you’ll aggree that the stencil buffer is WAY TOO inflexible!

In response to I'm glad
0
101 Jan 31, 2003 at 11:08

glOrtho is just a projection mode. z axis is specified (otherwise why specify near and far cliping planes with glOrtho?) but of course z translations are not visible for one single object. If you depth-test your objects, you’ll see that far objects are occluded by near ones.

Besides using textured quads with glOrtho for sprites, and IFF it’s only 2d images you want, there is also glDrawPixels, but it’s too rigid to do anything fancy with it. Just puts a rectangular pixel area on screen…

In response to C++ vs. C#
0
101 Jan 31, 2003 at 03:33

Keep in mind that the MSIL (Microsoft intermediate language) is jit’ed when executed. While one has the option of disabling the jit compiler, it is active by default. This results in an MSIL to machine code transformation, speeding up C# code performance to nearly that of compiled C++. For trivial programs the difference in performance is negligible, however, as the program grows and deals with more complex data structures, garbage collection is usually required, the performance hit of this can be considerable.

Though I have not seen these C#/directX demos, the first question that comes to my mind is “dose this demo compare the performance of C# to native C++, or that of manged C++”. As pionted out earlier, C++ can be complied into MSIL (this is referd to as “Managed C++”, this would certainly affect the performance of the C++ application.

A Note on Java (and why its so slow). Java also uses a jit compiler, and the speed of trivial Java code is also close to that of C++. However, Java also employs garbage collection (which of course slows things down. One of the greatest performance drains in Java is not the virtual machine, however. It is the interface to the operating system, Java’s IO/memory addressing is quite slow, as well as its interface with system services from the native OS. This is probably due to the evolving nature of the Java platform. Many of its libraries appear to be added as an afterthought, and are not as efficient as they could have bean. This is evidenced by the shear number of APIs this platform entails, many attempting to correct the flaws of there predecessors. .Net, on the other hand, has had the opportunity of learning from some of Java’s mistakes, as there seams to be a bit less overhead in making system calls, and the API’s are cleaner.

In response to C++ vs. C#
0
101 Jan 30, 2003 at 22:00

I was in no way putting cyrax down, and didnt mean for my previous post (or future ones) to sound so flame-esque. If i have offended cyrax, or anyone else, I appologize. I misunderstood what he meant by CLI, and he didn’t clarify. Regardless, I am still of the opinion that his assertion is wrong.

As for Common Language infrastructure, I am not overly familiar with the topic. As for it being part of any sized feature, I have serious doubts that microsoft is legitimately interested in portability. Although the article even goes as far as to say,

“The main reason [for the submission] had to do with overcoming the customer perception that Microsoft is somehow entirely built on proprietary standards”

I think this is an attempt to soft-soap people. Microsoft is, in fact, and empire. Whether it is evil or not, is personal opinion. They cornered several markets with their “proprietary standards.” So obvious is this fact, that it caught the DoJ’s attention, so you’ll have to pardon me when I take their claim with a grain of salt.

As far as effeciency goes, I’m not sure how adding another abstraction layer for code would help. Its most likely my mistaken understanding again, but I’m not sure how CLI could be for both low-level effeciency and portability.

“It isn’t [for] commercial products. It isn’t something you would normally use to develop applications on. It’s more of an educational and research-oriented thing,”

“It” being “Rotor” which is their codename for Shared Source Common Language Infrastructure (CLI) implementation.

Perhaps someone can clue me in?

In response to interview
0
101 Jan 30, 2003 at 20:52

you’re _SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO_ near to it:D

okay, i tell you. you’re _RIGHT_:D

In response to interview
0
101 Jan 30, 2003 at 20:50

What davepermen? My guess is :rolleyes: … gimbal lock… Is that true? :blush:

0
101 Jan 30, 2003 at 20:27

who cares about microsoft in there..

what i want is a programable blending unit with floatingpoint precicion.. and branches in the pixel unit..

then i can finally raytrace..:D

Welcome to DevMaster, a community-driven game development website of posts and resources!

opengl × 2
animation × 2
android × 2
indie × 2
music × 1
licensing × 1
film × 1
royalty × 1
glsl × 1
audio × 1
linux × 1
ios × 1
gui × 1
contest × 1
native × 1
web × 1
hardware × 1
testing × 1
webgl × 1
water × 1
c# × 1