Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7551865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:36:33+00:00 2026-05-30T10:36:33+00:00

I followed this code project tutorial for using SharpGL with WPF to create a

  • 0

I followed this code project tutorial for using SharpGL with WPF to create a control which allows you to render OpenGL into it. Excellent, everything works fine.

However, I am rendering video behind the SharpGL WPF control and so need the backdrop of the render to be transparent. How can I go about this?

Code:

<Window x:Class="MyProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sharpGL="clr-namespace:SharpGL.WPF;assembly=SharpGL.WPF"
    Title="MainWindow" Height="600" Width="800" Loaded="Window_Loaded">
    <Canvas Height="580" Width="780" Name="CentreCanvas">
        <Image Canvas.Left="0" Canvas.Top="0" Height="565" Name="imageVideoControl" Stretch="Fill" Width="780" />
        <Image Canvas.Left="580" Canvas.Top="0" Height="150" Name="imageDepthControl" Stretch="Fill" Width="200" />
        <sharpGL:OpenGLControl OpenGLDraw="OpenGLControl_OpenGLDraw" Height="565" Width="780"></sharpGL:OpenGLControl>
    . . . 
    </Canvas>
</Window>

private void OpenGLControl_OpenGLDraw(object sender, OpenGLEventArgs args)
{
    // Get the OpenGL instance being pushed to us.
    gl = args.OpenGL;

    // Clear the colour and depth buffers.
    gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT);

    // Reset the modelview matrix.
    gl.LoadIdentity();

    // Move the geometry into a fairly central position.
    gl.Translate(1.5f, 0.0f, -6.0f);

    // Draw a quad.
    gl.Begin(OpenGL.GL_QUADS);

        // Set colour to red.
        gl.Color(1.0f, 0.0f, 0.0f);

        // Draw some quad...
        . . . 
        . . .

    gl.End();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:36:34+00:00Added an answer on May 30, 2026 at 10:36 am

    You don’t.

    OpenGL windows are not WPF windows. They are Win32 HWNDs. And HWNDs run by OpenGL cannot participate in window-to-window transparency.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have followed this tutorial which allowed me to create a Silverlight DataGrid that
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
This is my first project with Core Data, I followed the Event tutorial provided
I've followed instructions http://code.google.com/webtoolkit/doc/latest/tutorial/gettingstarted.html in order to create sample GWT program. Now I would
I recently followed this tutorial on Google Cloud SQL and GWT: http://code.google.com/apis/sql/docs/developers_guide_java.html I deployed
I have got this code and I am trying to understand the convention followed,
I followed this tutorial on configuring the Rails plugin ExceptionNotifier. I know that I
I followed this way. To create a workspace to manage your source-controlled files 1.
I've followed this otherwise excellent tutorial on getting Xen working with Ubuntu but am
I've followed this tutorial for setting up a static library with common classes from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.