Changeset 11
- Timestamp:
- 04/25/06 22:24:58 (6 years ago)
- Files:
-
- trunk/examples/math/Vector.d (modified) (1 diff)
- trunk/plugins (added)
- trunk/plugins/graphics (added)
- trunk/plugins/graphics/OpenGLGraphicsEngine.d (added)
- trunk/plugins/input (added)
- trunk/plugins/scripting (added)
- trunk/plugins/sound (added)
- trunk/source/velocity/graphics/interfaces/IDevice.d (modified) (1 diff)
- trunk/source/velocity/graphics/interfaces/IGraphicsEngine.d (modified) (1 diff)
- trunk/source/velocity/graphics/interfaces/IHost.d (modified) (1 diff)
- trunk/source/velocity/math/Vector.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/math/Vector.d
r9 r11 4 4 import velocity.tools.Counter; 5 5 6 cfloatmain()6 void main() 7 7 { 8 8 /* Test assignment and opAdd performance vs. a stock while loop */ trunk/source/velocity/graphics/interfaces/IDevice.d
r5 r11 13 13 14 14 /// Graphics device abstraction. 15 /// Provides an interface to a video card16 15 17 16 public interface IDevice 18 17 { 19 18 bit Reset(); ///< Reset the device 19 IntPtr InternalObject { get; } 20 DisplayModes DisplayModes { get; } 21 DisplayMode CurrentDisplayMode { get; } 22 string Name { get; } 23 string Description { get; } 24 Capabilities Capabilities { get; } 25 IPhysicalGraphicsBuffer IndexBuffer { set; } 26 IVertexShader VertexShader { get; set; } 27 IVertexDeclaration VertexDeclaration { get; set; } 28 IPixelShader PixelShader { get; set; } 29 ISurface BackBuffer { get; } 30 ISurface DepthStencilBuffer { get; } 31 ISurface RenderTarget { get; set; } 32 bool Switch(GraphicsSettings settings); 33 void BeginScene(); 34 void EndScene(); 35 bool Present(); 36 bool Reset(); 37 int ClearColor { get; set; } 38 float ClearDepth { get; set; } 39 int ClearStencil { get; set; } 40 void Clear(ClearFlags clearFlags); 41 IPhysicalGraphicsBuffer CreateVertexBuffer(Type vertexFormat, int numVertices); 42 IPhysicalGraphicsBuffer CreateIndexBuffer(Type indexFormat, int size); 43 IVertexDeclaration CreateVertexDeclaration(VertexElement[] elements); 44 void SetVertexBuffer(int stream, IPhysicalGraphicsBuffer buffer, int offset); 45 void SetTexture(int stage, ITexture tex); 46 void Draw(int startVertex, int primitiveCount); 47 void DrawIndexed(int baseIndex, int minVertex, int numVertices, int startIndex, int primitiveCount); 48 void SetViewport(Viewport viewport); 20 49 } trunk/source/velocity/graphics/interfaces/IGraphicsEngine.d
r7 r11 13 13 public interface IGraphicsEngine 14 14 { 15 IHost NewHost(...) 16 { 17 char[] Title(); 18 void Title(char[] t); 19 20 int Width(); 21 void Width(int w); 22 23 int Height(); 24 void Height(int h); 25 26 27 28 IDevice GetAttachedDevice(); 29 void AttachDevice(IDevice d); 30 } 15 IHost NewHost(...); 31 16 } trunk/source/velocity/graphics/interfaces/IHost.d
r5 r11 13 13 public interface IHost 14 14 { 15 char[] Name(); 16 void Name(char[] t); 17 18 int Width(); 19 void Width(int w); 20 21 int Height(); 22 void Height(int h); 23 24 void* CustomData(); 25 void CustomData(void* data); 26 27 IDevice Device(); 28 void Device(IDevice d); 15 29 } trunk/source/velocity/math/Vector.d
r9 r11 16 16 17 17 /************************************************** 18 A fastvector implementation18 A general vector implementation 19 19 20 20 Examples: … … 106 106 for(int i = 0; i < Dim; i++) 107 107 { 108 imaginarypart[i] = ( storage[i].im) * 1i;108 imaginarypart[i] = ((cast(creal)storage[i]).im) * 1i; 109 109 } 110 110 return imaginarypart; … … 124 124 for(int i = 0; i < Dim; i++) 125 125 { 126 realpart[i] = storage[i].re;126 realpart[i] = ((cast(creal)storage[i]).re; 127 127 } 128 128 return realpart;
