![]() |
|
|
#676 | ||||||||
Senior Member
![]()
|
LOL! they are bouncing off the wall, how the **** do u play that?
__________________
|
||||||||
|
|
|
#677 | |||||||||
Senior Member
![]()
|
It's fuçking hard, you can right click to bounce once, but you have to shoot your gun at your feet to do it multiple times...
__________________
Sex, Drugs, and Unix ☭ Quote:
|
|||||||||
|
|
|
#678 | ||||||||
Senior Member
![]()
|
man i wish xp could use DX10
![]() they added so many dam this, i am not do to upgrade to vista for it but i do wish they would make it for xp ![]() btw i know there is an independent Direct X 10 project for xp....
__________________
|
||||||||
|
|||||||||
| Last edited by IllBashU; 07-06-2008 at 06:32 AM. | |||||||||
|
|
#679 | |||||||||
Senior Member
![]()
|
DirectX 10 isn't that much better than 9. And OpenGL is better anyway.
__________________
Sex, Drugs, and Unix ☭ Quote:
|
|||||||||
|
|
|
#680 | ||||||||
Senior Member
![]()
|
__________________
|
||||||||
|
|
|
#681 | |||||||||
Senior Member
![]()
|
The difference in those doesn't show the capabilities of each, it just shows that they optimized it for DX10. And OpenGL is still much better than either of them.
__________________
Sex, Drugs, and Unix ☭ Quote:
|
|||||||||
|
|
|
#682 | ||||||||
Senior Member
![]()
|
how is open gl better then them?
__________________
|
||||||||
|
|
|
#683 | |||||||||
Senior Member
![]()
|
It's just a much better API, and on top of that, it's portable, rather than being limited to a single platform.
I think that you may be misunderstanding what DX and OpenGL are. They are the APIs that the programmers use for graphical stuffz. Not some thing that makes graphics better. DX9 can do everything DX10 can, the developers just may have to do a bit more work to do some things that DX10 has pre-existing functions for.
__________________
Sex, Drugs, and Unix ☭ Quote:
|
|||||||||
|
|
|
#684 | ||||||||
Senior Member
![]()
|
i know that i was wondering what does it deliver/give that direct x 10 doesn't?, other then the fact that it can be used in Multiple platform...
__________________
|
||||||||
|
|||||||||
| Last edited by IllBashU; 07-06-2008 at 06:19 PM. | |||||||||
|
|
#685 | |||||||||
Senior Member
![]()
|
For one thing, it's proprietary, rather than open source. And, I guess that the best way to show the difference is to show some example code.
Here is how you draw a triangle in OpenGL: Code:
#import "myOpenGLView.h"
#include <OpenGL/gl.h>
@implementation myOpenGLView
static void drawAnObject(){
glBegin(GL_TRIANGLES);{
glVertex3f( 0.0, 0.6, 0.0);
glVertex3f( -0.2, -0.3, 0.0);
glVertex3f( 0.2, -0.3 ,0.0);
}
glEnd();
}
-(void) drawRect: (NSRect) bounds{
glClearColor(0,0,0,0);
glClear(GL_COLOR_BUFFER_BIT);
drawAnObject();
glFlush();
}
@end
Now here is how you draw a triangle in DirectX: Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
namespace DirectXHelloWorld
{
public partial class DirectXHelloWorld : Form
{
//Define device to write to.
Device device = null;
// Define a vertexBuffer to store the 3d objects.
VertexBuffer vertexBuffer = null;
//Main method.
static void Main()
{
// Instantiate form, initialize graphics and show the form.
DirectXHelloWorld form = new DirectXHelloWorld();
form.InitializeGraphics();
form.Show();
// Render loop
while (form.Created)
{
form.render();
Application.DoEvents();
}
}
// Called to draw screen.
public void render()
{
//Clear the backbuffer to a blue color (ARGB = 000000ff)
device.Clear(ClearFlags.Target, System.Drawing.Color.Black, 1.0f, 0);
device.BeginScene();
device.SetStreamSource(0, vertexBuffer, 0);
device.VertexFormat = CustomVertex.TransformedColored.Format;
device.DrawPrimitives(PrimitiveType.TriangleList, 0, 1);
//End the scene
device.EndScene();
device.Present();
}
// Initalize the graphics system.
public void InitializeGraphics()
{
try
{
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
// On my chepo laptop I don't have hardward support so I'm
// using SoftwareVertexProcessing. If you have a real graphics
// card you should change this to HardwareVertexProcessing.
device = new Device(0,
DeviceType.Hardware,
this,
CreateFlags.SoftwareVertexProcessing,
presentParams);
device.DeviceReset+=
new System.EventHandler(this.OnResetDevice);
OnResetDevice(device, null);
}
catch (DirectXException e)
{
MessageBox.Show(null, "Error intializing graphics: " + e.Message, "Error");
Close();
}
}
public void OnResetDevice(object sender, EventArgs e)
{
Device dev = (Device)sender;
vertexBuffer = new VertexBuffer(typeof(CustomVertex.TransformedColored),3, dev,
0,
CustomVertex.TransformedColored.Format,
Pool.Default);
GraphicsStream stm = vertexBuffer.Lock(0, 0, 0);
CustomVertex.TransformedColored[] verts = new CustomVertex.TransformedColored[3];
verts[0].X = 150;
verts[0].Y = 50;
verts[0].Z = 0.5f;
verts[0].Rhw = 1;
verts[0].Color = System.Drawing.Color.Red.ToArgb();
verts[1].X = 250;
verts[1].Y = 250;
verts[1].Z = 0.5f;
verts[1].Rhw = 1;
verts[1].Color = System.Drawing.Color.Green.ToArgb();
verts[2].X = 50;
verts[2].Y = 250;
verts[2].Z = 0.5f;
verts[2].Rhw = 1;
verts[2].Color = System.Drawing.Color.Blue.ToArgb();
stm.Write(verts);
vertexBuffer.Unlock();
}
}
}
Does that explain it a bit better? Edit: WTF is up with these Indian books? Half of the pages are ripped, and I just found a page where a piece of the paper jutted out and was longer than the rest of the page...how the fuçk does that happen!?!?!
__________________
Sex, Drugs, and Unix ☭ Quote:
|
|||||||||
|
||||||||||
| Last edited by paintba||er; 07-06-2008 at 09:31 PM. | ||||||||||
|
|
#686 | ||||||||
Senior Member
![]()
|
hey dont ask me! u get what u pay for...
I was looking for a working battle net starcraft cd key and windows got a virus so now i have to back up all the windows files that i need on my linux partation and reinstall window, and since i am really lazy i wont be doing that for at least a couple of days so until then i guess i will learn some C...@ the open gl thing u have to write that much more code in direct x, why dont more ppl use open gl if it is that much less code?btw is the triangle better in direct x? (i am asking this because it has much more code)
__________________
|
||||||||
|
|||||||||
| Last edited by IllBashU; 07-06-2008 at 11:26 PM. | |||||||||