Level Editor - GL in .NET

Started by
7 comments, last by Cacks 18 years, 5 months ago
Hello there; After searching a lot, i found only examples and wizards to create .NET GL contexts in a single screen...but what i want is to create various screens, like multiple views (front, left...) and create some at runtime (sharing context) to visualize particle FX, shader previews and so on, like in any Engine tool...does anyone know how to do that? Thanks!! Ps.: im using VS 2003, c++
Advertisement
linky (this may or may not work in .net, I haven't tried)

linky 2

Alternatively it's possible to use CsGL in a form control. Or maybe Tao. I can't find a link at the moment - I have vb.net code for this but haven't figured out how to change the pixel format descriptor to add stencil buffers etc yet.
"I must not fear. Fear is the mindkiller. Fear is the little death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past me I will turn to see fear's path. Where the fear has gone there will be nothing. Only I will remain." ~Frank Herbert, DuneMy slice of the web
First link no worky.

And the 2nd link isn't really a .NET app.

-=[ Megahertz ]=-
-=[Megahertz]=-
Quote:Original quote by Megahertz
And the 2nd link isn't really a .NET app.
This makes your request ambigious. Do you want to use C++.NET (Managed C++) or Native C++ using the Visual Studio.NET 2003 C++ Compiler?
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
Sorry, that link was working last night but he seems to have moved servers:

this linky worky yes?

I know none of these are specifically .NET apps, but they demonstrate most of the requirements the OP wanted - 1st one (above) - multiple gl windows, 2nd one - multiple viewports within a single window.
Personally I've never found much in the way of .NET-specific examples for using OpenGL, but VC6 projects usually import into VS.NET ok, albeit not as .NET apps as you say.

[Edited by - DrewGreen on November 4, 2005 12:52:31 PM]
"I must not fear. Fear is the mindkiller. Fear is the little death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past me I will turn to see fear's path. Where the fear has gone there will be nothing. Only I will remain." ~Frank Herbert, DuneMy slice of the web
To Silvermace: I want to use .NET (managed) forms and components (edit boxes, buttons), but my engine code is in native C++ ...the example in the last link seems to be dificult to add buttons (only by hard-coding)...how game editors like FARCRY Sandbox r made? MFC? is there any complete tuturial out there showing how to do that? i have an editor done in VS 6.0 and MFC, but its very bad ...i couldnt put floating components(like a script editor) in it main frame, only by dialog forms (or something like that...)if anybody want to see it i can put ir here...thanks for helping!
Hi,

yeah, there doesn't seem to be much information regarding OpenGL in a .NET form with VC++ 2003. I can get a rendering context to link to a form. If you can do that you can draw different views within the one rendering context. Alternatively you could create several threads and several panels, link the different rendering contexts to the different panels.
Reject the basic asumption of civialisation especially the importance of material possessions
Cacks, can u explain how to link a RC to a form?
Haha, now there is a question!

I don't have my code at this PC but it is something like this:

The process is very similar to using Win32:-

Setup Pixel Format within the form constructor.
Use the form's getHandle() to return the window handle of the form.
You must convert the result of getHandle() to an integer.
Create a device context using this handle.
Create a rendering conext using the device handle.
Setup the rendering & then swapping of buffers using an event e.g. button click.

I've only just got it working after a long time. Its sweet, I can place buttons etc anywhere, which is really useful.
Reject the basic asumption of civialisation especially the importance of material possessions

This topic is closed to new replies.

Advertisement