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

  • Home
  • SEARCH
  • 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 8629551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:50:26+00:00 2026-06-12T08:50:26+00:00

Setup I’m using System.Windows.Forms.Form as window source. Constructor: FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized;

  • 0

Setup

I’m using System.Windows.Forms.Form as window source. Constructor:

FormBorderStyle = FormBorderStyle.None;
WindowState = FormWindowState.Maximized;

Form-Load:

_Device = new Device(this, DeviceConfiguration.SelectConfiguration(Bits.Eight, Bits.Eight, Bits.Eight, Bits.Eight, Bits.Twentyfour, Bits.Eight, true, true), 1024, 768);
Debug.WriteLine(GL.GetString(GL.GL_EXTENSIONS));

base.OnLoad(e);

In the load method the device configuration is selected, which is actually working. Calls like GL.GetString(GL.GL_EXTENSIONS) are working. All gl-methods are loaded too so all used methods are supported.


Form-Shown:

Application.Initialize(this);
RenderSettings = new RenderSettings(this);

Debug.WriteLine("After setup render settings: " + GL.GetErrorDescription());

_Textures[0] = Resources.LoadTexture("Resources\\Buttons\\btn_big_bg_normal.dds");
_Textures[1] = Resources.LoadTexture("Resources\\Buttons\\btn_big_bg_normal.dds");


base.OnShown(e);

_IsShown = true;

The Application.Initialize(this) initializes the framework used ( written by me ) and is also initializing a default shader, which is working, and model which is not working.
This causes the rendering later to fail because the returning handle is invalid.

Framework

I’ve a own OpenGL-wrapper which has enums for all parameters to enable development without looking in the OpenGL-references many times. As example the method glGenBuffers:

[MethodGL]
public delegate void glGenBuffers(Int32 count, ArrayBufferHandle[] buffers);

The ArrayBufferHandle definition:

/// <summary>
/// Represents a handle to a buffer
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 4)]
[ComVisible(true)]
public struct ArrayBufferHandle
{
    [FieldOffset(0)]
    UInt32 Handle;
    /// <summary>
    /// Determines if the buffer is valid
    /// </summary>
    public Boolean IsValid { get { return Handle > 0; } }
    /// <summary>
    /// Retrieves the default array buffer
    /// <br>which is used to reset bindings</br>
    /// </summary>
    public static ArrayBufferHandle Default { get { return new ArrayBufferHandle(); } }
    /// <summary>
    /// Retrieves the string representation of the current object
    /// </summary>
    /// <returns>The current object represented as string</returns>
    public override String ToString()
    {
        return String.Format("[ArrayBufferHandle Handle:{0} Valid:{1}]", Handle, IsValid);
    }
}

Of course the shader creation is working and uses the types like the shown above.

Conclusion

I don’t think i’ve much more to say to the issues i’ve faced. glGenBuffers and glGenTextures returning zero and i don’t know why. The setup seems like others i’ve already used.

Of course the window is shown with a blue background when not rendering any models and i don’t have any errors when using glGetError.

  • 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-06-12T08:50:27+00:00Added an answer on June 12, 2026 at 8:50 am

    First: Thanks to Mārtiņš Možeiko who led me into the right direction.

    As it turns out the method void glGenBuffer(Int32 count, UInt32[] buffers) is working, but the method void glGenBuffers(Int32 count, ArrayBufferHandle[] buffers) isn’t. Both have a 4-byte / element array which is passed but .NET seems to handle them different. The solution has been simple:

    void glGenBuffers(Int32 count, [Out]ArrayBufferHandle[] buffers)
    

    Add a Out attribute to the array.

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

Sidebar

Related Questions

Setup I am using custom Forms Authentication - all standard stuff. In the Login
setup Using Dreamweaver CS 5.5 / Windows 7 I have turned off 'Preview [in
SETUP: Using Google Apps Script's UI (doGet) with tabPanel option. At the bottom of
Setup I am using Sparx Systems Enterprise Architect Professional edition 7.5 and MS PowerPoint.
Setup I've attached an event to the 'window' object, and I would like to
Setup: Windows Server 2003 / SQL Server 2005. ASP.NET 2.0. IIS 6. The site
Setup: I am using JSPs and jQuery. There is a 'parent' page which holds
Setup: I have a form and a Submit button. Ideally the user should fill
Setup: Multiple web servers with synchronized forms authentication. Multiple asp.net Applications running on these
Setup: I'm looking for insight into using a ABPersonViewContoller without getting data from the

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.