Questions tagged [sharpgl]

SharpGL is a C# library that allows you to use OpenGL in your .NET Framework based application with ease!

SharpGL is a C# library that allows you to use OpenGL in your .NET Framework based application with ease!

SharpGL comes packaged with many sample applications to demonstrate key features or for you to use as starting points for your own development.

Some features:

  • Full support for all OpenGL functions up to OpenGL 4.2;
  • Full support for all commonly used OpenGL extensions;
  • Support for WinForms applications;
  • Support for WPF applications (without resorting to WinForms hosts);
  • A powerful scene graph including polygons, shaders, NURBs and more;
  • Many sample applications as starting points for your own projects;
  • Visual Studio Extension with SharpGL project templates for WPF and WinForms.

Source:

https://github.com/dwmkerr/sharpgl

http://sharpgl.codeplex.com/

89 questions
1
vote
1 answer

OpenGL draw every n vertex

I am working on writing an application that contains line plots of large datasets. My current strategy is to load up my data for each channel into 1D vertex buffers. I then use a vertex shader when drawing to assemble my buffers into vertices (so I…
Hugoagogo
  • 1,598
  • 16
  • 34
1
vote
0 answers

SharpGL turn of SharpGL.WPF.OpenGLControl.timer_Tick

Currently I'm working with SharpGL and WPF, to test wheter its performence is decent. The test is to load a large STL-file ( https://en.wikipedia.org/wiki/STL_(file_format) ) and to draw it on the SharpGL.WPF.OpenGLControl and rotate, scale,…
mathgenius
  • 165
  • 1
  • 13
1
vote
1 answer

OpenGL/SharpGL: Rendering 2D image is stretched horizontally

I'm playing around with OpenGL in C# (using SharpGL) and I come from a DirectX background... I figured OpenGL would be pretty similar, and it kinda is, except I'm having an issue with my projection matrices which causes my 2D image to be stretched…
SJoshi
  • 1,866
  • 24
  • 47
1
vote
1 answer

How to draw lines using sharpgl (C#)

I am trying to draw line in c# using sharpgl but when i compile the code it gives me the console with full of white color not the line,how to solve this this problem or is there any mistake in my code.Here is the code. private static int width =…
Adeel Khan
  • 13
  • 1
  • 6
1
vote
0 answers

When composting images, what is the best way to ensure that images are rendered at the correct Aspect Ratio

I am writing something that is a bit "photoshoppy" in the sense there are image layers that render on top of each other. Each layer renders to an FBO and fbos can be ran through effects etc. Although the user can distort images I want the images…
chrispepper1989
  • 2,100
  • 2
  • 23
  • 48
1
vote
0 answers

WPF Project has wrong version of OpenGL

I have two separate WPF projects. My goal: Alter project B to have the same OpenGL object instance version as project A. Both instantiate a variable 'gl' at some point with the following line: OpenGL gl = args.OpenGL; After setting a breakpoint and…
Timothy Swan
  • 623
  • 3
  • 9
  • 21
1
vote
1 answer

How to render image properly

My image appears too large when it is rendered using SharpGL. How do I load it properly? The image's dimension is only 313 x 79 pixels but it almost occupy the rest of the screen when it renders. I got this code from codeplex. The example given is…
Romel Cruz
  • 43
  • 1
  • 6
1
vote
2 answers

How alter the camera in opengl so I can see my entire surface plot on screen?

I am using sharpgl in my wpf application and I have a surface plot. The problem is when I try to move the lookat camera away a lot of my plot disappears.... I'm new to opengl, how can I adjust my camera so I can see my plot from multiple…
Bob
  • 1,065
  • 2
  • 16
  • 36
1
vote
1 answer

SharpGL Animation Questions

So I am writing a program that parses files with xyz points and makes a bunch of connected lines. What I am trying to do is animate each line being drawn. I have tried to use VBO's and Display Lists in order to increase performance (as I am dealing…
TheBlindSpring
  • 631
  • 5
  • 22
0
votes
1 answer

SharpGL is slow, hardware acceleration?

I am trying to use SharpGL to display a video. The video is a list of image (OpenCV image that I convert to Bitmap). 2 calls are slow : texture.Create(gl, bitmap) (40ms) gl.flush() (100ms) I think I am not using the hardware acceleration but my…
0
votes
1 answer

SharpGL Low Resolution Textures

I am loading textures in using the following code: var texture = new SharpGL.SceneGraph.Assets.Texture(); texture.Create(gl, filename); But when I render them onto a polygon they are extremely low resolution. It looks like about 100x100 but the…
Mark Mercer
  • 105
  • 7
0
votes
0 answers

OpenGL Texture render

I am rendering 3 squares on which I have stretched the texture, and as I move them in space, I change the coordinates of the vertices of these squares. Everything works, but as soon as I want to render another image, the texture of which is already…
Vera
  • 11
  • 1
0
votes
0 answers

OpenGL / SharpGL WPF

Situation: using the Instantiate Sprite() method I load the texture into memory, then in the DrawTexture() method I unload it to the scene. But why is it that when I load the second texture onto the scene, it replaces the first one? First sprite…
Vera
  • 11
  • 1
0
votes
0 answers

Panning in SharpGL distorts image

I have this code in SharpGL where zoom and pan were implemented. This is de draw method: private void OpenGLDraw(object sender, SharpGL.WPF.OpenGLRoutedEventArgs args) { // Enable finish button if (openFileOk && dispCBOk) {…
Julia
  • 11
  • 3
0
votes
0 answers

WPF Render 2D Point Cloud

I am trying to render point cloud, generated using UAV images, in 2D viewport. I have tested WriteableBitmapEx, SkiaSharp (and with OpenGL backend), SharpGL and none of them gave me less than 20 seconds. Point cloud i am trying to render contains…
user2590769
  • 75
  • 1
  • 10