Quantcast
Channel: SharpGL
Viewing all articles
Browse latest Browse all 104

New Post: SharpGL FBO and High Res Texture Question

$
0
0
I am attempting to create an OpenGL Spherical Viewer using SharpGL and Visual Studio 2010. I used the SharpGL WinForms template to start my code. I am using equrectangular jpeg images that are 8000x4000 pixels in size. I am using the SharpGL.SceneGraph.Texture object to load my images into a texture. I am binding the texture to a sphere created using the SharpGL.SceneGraph.Quadrics.Sphere object.

My first attempt yielded my sphere however the ScheneGraph.Texture code down-sampled my texture to 1024x1024 pixels. OK, at least I got something. After some browsing of this forum I determined that I should change my RenderContextType from DIBSection to FBO. This yielded a sphere with a texture, but again the ScheneGraph.Texture down-sampled my image/texture to 4096x2048. I figure great, I'm half way home.

The next thing I do to remedy my situation is change the OpenGLVersion from OpenGL2_1 to OpenGL4_4. Only now nothing gets rendered and my form remains black. So, I figure I've done something wrong. In an effort to remove my code from the equation I open the SharpGL Examples Solution and debug the "RenderContextsSample" code. It opens and runs with no complaint and displays four tabs, each with a SharpGL control on it and each control us using a different RenderContextType and all are using an OpenGLVersion of OpenGL2_1.

Then I change the OpenGLVersion of the control on the FBO tab from OpenGL2_1 to OpenGL3_0. I debug the project. Low and behold the FBO tab does not work. I modify all the other tabs and none of them work with an OpenGLVersion any higher than OpenGL2_1.

My Video Card is an NVIDIA Quatro 2000 and it is capable of rendering these images at full resolution as I have tested other viewers. I just need to write my own viewer so I can control it and pass information and/or control back and forth between my viewer and my GIS software.

Does anyone have an example using FBO, SharpGL, OpenGL newer than 2.1 and a textured quadric? I know I am asking a lot and will gladly accept guidance over code as long as I am lead closer to my goal.

I believe it was Pascal who said "We are usually convinced more easily by reasons we have found ourselves, than by those which have occurred to others." But that doesn't mean I won't listen to others.

Respectfully;

Windknot

Viewing all articles
Browse latest Browse all 104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>