This topic is now archived and is closed to further replies.


OpenGL opengl -> sql

Recommended Posts

duke    107
Ok, if you don''t like to contemplate absolutely ridiculous ideas, skip this post. Have any of "you", being the knowledgeable readers of this forum, ever contemplated using opengl for something totally non-graphics related? Consider this... what does opengl actually do? Well for starters it reduces 4 dimensional data into 2 dimensions... my thinking is that is might be possible to use opengl as an sql database. By representing the data in the database as opengl vertex data, you could position the camera in certain ways to "select" the data. simply render to a texture, and then read the texture back... Firstly, assuming it would even be possible, why would you want to do this. Reason #1, it would just be cool as hell Reason #2, when running a machine as a dedicated server it may have a good video card in it. You could effectively use this video card as an additional processor. Dual CPU machines are very cost effective, beyond 2 CPU''s you start to pay out the butt. So if you bought a dual cpu, put a $100 dollar GeForce of ATI card in it, you would have like 2.5 CPUs on your SQL server... Well like I said it is an "out there idea", I just wonder if anyone else has A) thought along these lines and B) actually wrote some code to the effect. Now if you wanted to do such a thing, you would obviously need to come pu with creative ways to place your data into opengl vertex buffer obs. And employ even more creative methods as to how to position the camera to select data. anyways just a thought I had while bored as hell

Share this post

Link to post
Share on other sites
JuNC    236
Anything you want, it could be ''the smell of a flower'' or something.

Thing is the only benefit would be the use of graphics hardware, which is pretty tuned to streaming data.

You''d be pretty limited by bit-precision on current hardware, perhaps when 96-bit or greater bit depth is the norm this might be feasible.

It would be interesting to see research in this direction, but then again, why wouldn''t you just stick a second general CPU into the system? (you could for instance buy a cheap PII system for less than a mid-level GPU system)

Share this post

Link to post
Share on other sites
duke    107
The fourth dimension is the ''w'' component. when you submit a vertex in opengl, with a call such as glVertex3f(1,1,1) there is also a 4 value in that vertex. That is the w component. If you do not specify it, I believe it defaults to 1. But it is possible to specify that explicity.

As for just adding a second CPU, my point was that you add both. a second CPU and a good video card. anyways I think it would make an interesting research project, too bad I am not a student with tons of time on my hands anymore

Share this post

Link to post
Share on other sites

  • Similar Content

    • By povilaslt2
      Hello. I'm Programmer who is in search of 2D game project who preferably uses OpenGL and C++. You can see my projects in GitHub. Project genre doesn't matter (except MMO's :D).
    • By ZeldaFan555
      Hello, My name is Matt. I am a programmer. I mostly use Java, but can use C++ and various other languages. I'm looking for someone to partner up with for random projects, preferably using OpenGL, though I'd be open to just about anything. If you're interested you can contact me on Skype or on here, thank you!
      Skype: Mangodoor408
    • By tyhender
      Hello, my name is Mark. I'm hobby programmer. 
      So recently,I thought that it's good idea to find people to create a full 3D engine. I'm looking for people experienced in scripting 3D shaders and implementing physics into engine(game)(we are going to use the React physics engine). 
      And,ye,no money =D I'm just looking for hobbyists that will be proud of their work. If engine(or game) will have financial succes,well,then maybe =D
      Sorry for late replies.
      I mostly give more information when people PM me,but this post is REALLY short,even for me =D
      So here's few more points:
      Engine will use openGL and SDL for graphics. It will use React3D physics library for physics simulation. Engine(most probably,atleast for the first part) won't have graphical fron-end,it will be a framework . I think final engine should be enough to set up an FPS in a couple of minutes. A bit about my self:
      I've been programming for 7 years total. I learned very slowly it as "secondary interesting thing" for like 3 years, but then began to script more seriously.  My primary language is C++,which we are going to use for the engine. Yes,I did 3D graphics with physics simulation before. No, my portfolio isn't very impressive. I'm working on that No,I wasn't employed officially. If anybody need to know more PM me. 
    • By Zaphyk
      I am developing my engine using the OpenGL 3.3 compatibility profile. It runs as expected on my NVIDIA card and on my Intel Card however when I tried it on an AMD setup it ran 3 times worse than on the other setups. Could this be a AMD driver thing or is this probably a problem with my OGL code? Could a different code standard create such bad performance?
    • By Kjell Andersson
      I'm trying to get some legacy OpenGL code to run with a shader pipeline,
      The legacy code uses glVertexPointer(), glColorPointer(), glNormalPointer() and glTexCoordPointer() to supply the vertex information.
      I know that it should be using setVertexAttribPointer() etc to clearly define the layout but that is not an option right now since the legacy code can't be modified to that extent.
      I've got a version 330 vertex shader to somewhat work:
      #version 330 uniform mat4 osg_ModelViewProjectionMatrix; uniform mat4 osg_ModelViewMatrix; layout(location = 0) in vec4 Vertex; layout(location = 2) in vec4 Normal; // Velocity layout(location = 3) in vec3 TexCoord; // TODO: is this the right layout location? out VertexData { vec4 color; vec3 velocity; float size; } VertexOut; void main(void) { vec4 p0 = Vertex; vec4 p1 = Vertex + vec4(Normal.x, Normal.y, Normal.z, 0.0f); vec3 velocity = (osg_ModelViewProjectionMatrix * p1 - osg_ModelViewProjectionMatrix * p0).xyz; VertexOut.velocity = velocity; VertexOut.size = TexCoord.y; gl_Position = osg_ModelViewMatrix * Vertex; } What works is the Vertex and Normal information that the legacy C++ OpenGL code seem to provide in layout location 0 and 2. This is fine.
      What I'm not getting to work is the TexCoord information that is supplied by a glTexCoordPointer() call in C++.
      What layout location is the old standard pipeline using for glTexCoordPointer()? Or is this undefined?
      Side note: I'm trying to get an OpenSceneGraph 3.4.0 particle system to use custom vertex, geometry and fragment shaders for rendering the particles.
  • Popular Now