dwmkerr / dwmkerr/sharpgl

Render Contexts: Cannot Demand OpenGL Version

Open
#75 0 comments 0 reactions 1 assignee Claimed by @dwmkerr View on GitHub
bug critical
Dominant language
C#
Stars
804
Forks
294
Avg merge
3d 23h
Merged PRs (30d)
1

Description

It is currently not possible to demand an OpenGL version and handle failure to get that version.

An example of this problem is in the tests. For a test of cel shading that uses 3.0 to run, we need to demand 3.0. If we fail to get 3.0 we need to fail the test as inconclusive. However, what happens is we try and create a FBO OpenGL context, ask for 3.0, fail (silently) to get 3.0, then the FBO fails during creation with an exception.

There are two ways to go. The first is with a dedicated exception (such as `OpenGLVersionException` or something like that). The second is for `Create` to return an error code.

Either way, the solution to this problem consider:
1. A way to demand an OpenGL version and know when that demand cannot be satisfied (allowing the caller to warn the user, abort the test etc etc).
2. The fact that when a user adds a usercontrol to an application, they probably want the highest version of OpenGL if possible, but do not care if they get a lower one (except for advanced users).

Point 2 is actually very complicated. For beginners, they don't want to have to care about it. For most users though, they have to know what version of OpenGL they need to support.

This bug relates to #73.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.