Crystal Space
Welcome, Guest. Please login or register.
December 20, 2014, 06:20:12 pm

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9295 Members
Latest Member: Marioibuch
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  OpenGL new-style renderer WITHOUT creating a window
« previous next »
Pages: [1] Print
Author Topic: OpenGL new-style renderer WITHOUT creating a window  (Read 1788 times)
FoboldFKY
Newbie
*
Posts: 3


View Profile
« on: July 16, 2005, 12:53:51 pm »

Hi.  I'm currently trying to get this working, and suddenly it occured to me there might be an easier way then hacking the existing OpenGL renderer plugin Tongue

What I want to do is create an OpenGL renderer plugin (for the new-style renderer) that does everything the existing one does, but DOES NOT create a new window or OpenGL context.  Basically, we're looking to embed CS into an existing application whose interface is done with a seperate toolkit.  This toolkit has a widget to create and embed an OpenGL context (which we will be using).  I want CS to render to that context.

Now, insofar as I understand GL, there's no need to pass a pointer or id to calls for the "current" context—you simply make a GL call that says "all further calls refer to me!", and off you go.

So: two questions:
  • Is there an easy way to do this with stock-standard CS?
  • If not, is there anything I can do apart from taking the OpenGL renderer plugin and stripping out all the window creation/context setting code?

Thanks.
Logged
dingobloo
Idle Extrordinare.
Global Moderator
Full Member
*****
Posts: 125


View Profile WWW
« Reply #1 on: July 16, 2005, 01:01:40 pm »

This sounds similar to that of the wxWidgets  implementation, perhaps looking at that code would give you some clues as to how to proceed.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #2 on: July 16, 2005, 01:05:34 pm »

Hi.  I'm currently trying to get this working, and suddenly it occured to me there might be an easier way then hacking the existing OpenGL renderer plugin Tongue

What I want to do is create an OpenGL renderer plugin (for the new-style renderer) that does everything the existing one does, but DOES NOT create a new window or OpenGL context.  Basically, we're looking to embed CS into an existing application whose interface is done with a seperate toolkit.  This toolkit has a widget to create and embed an OpenGL context (which we will be using).  I want CS to render to that context.

Now, insofar as I understand GL, there's no need to pass a pointer or id to calls for the "current" context—you simply make a GL call that says "all further calls refer to me!", and off you go.

So: two questions:
  • Is there an easy way to do this with stock-standard CS?
  • If not, is there anything I can do apart from taking the OpenGL renderer plugin and stripping out all the window creation/context setting code?

Thanks.

You don't have to look at the OpenGL renderer. What you have to look at is the OpenGL canvas. Basically you need either a new OpenGL canvas that has some extra interface that you can use to set an external OpenGL context or else you extend the existing canvas with a new interface to do that. Stock CS can't do that but it is not THAT hard to provide functionality for this.

Greetings,
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 6.228 seconds with 15 queries.