protected override void CreateNative()
 {
     glDevice           = (OpenGLDevice)device;
     nativeVertexBuffer = glDevice.CreateVertexBuffer(maxNumberOfVertices * vertexSize, OpenGL20BufferMode.Stream);
     if (nativeVertexBuffer == OpenGLDevice.InvalidHandle)
     {
         throw new UnableToCreateOpenGLGeometry();
     }
     if (UsesIndexBuffer)
     {
         nativeIndexBuffer = glDevice.CreateIndexBuffer(maxNumberOfIndices * indexSize, OpenGL20BufferMode.Stream);
     }
 }
Beispiel #2
0
 public OpenGL20ScreenshotCapturer(Device device, Window window)
 {
     this.device = (OpenGLDevice)device;
     this.window = window;
 }
Beispiel #3
0
 private OpenGL20Image(ImageCreationData data, OpenGLDevice device)
     : base(data)
 {
     this.device = device;
     CreateHandleAndSetDefaultSamplerState();
 }
Beispiel #4
0
 protected OpenGL20Image(string contentName, OpenGLDevice device)
     : base(contentName)
 {
     this.device = device;
     CreateHandleAndSetDefaultSamplerState();
 }
 private OpenGL20Geometry(GeometryCreationData creationData, OpenGLDevice device)
     : base(creationData)
 {
     this.device = device;
 }
 protected OpenGL20Geometry(string contentName, OpenGLDevice device)
     : base(contentName)
 {
     this.device = device;
 }
Beispiel #7
0
 public OpenGLShader(ShaderCreationData data, OpenGLDevice device)
     : base(data)
 {
     this.device = device;
     TryCreateShader();
 }
Beispiel #8
0
 public OpenGLShader(ShaderWithFormatCreationData creationData, OpenGLDevice device)
     : this((ShaderCreationData)creationData, device)
 {
 }