Comments (4)
The OpenTK3 generator (which OpenTK4 uses) was written when there was no in parameters in C#. Currently there are no plans to update this generator any further. I believe OpenTK5 generators generate not only span overloads but also in parameters.
from opentk.
understood, just in case anyone steps on this same situation, this workaroud does the trick:
fixed (float* tmp = &value.X)
{
GL.Uniform3(location, 1, ref *tmp);
}
the only draw back is that you have to set your project as "unsafe"
from opentk.
You should also be able to use Unsafe.AsRef<T>(in value)
to get a ref in a simpler way, though it might be worth thinking if its appropriate as you are no longer pinning the object (which may or may not be necessary).
from opentk.
Closing this issue. In the new bindings generator for OpenTK 5 we do generate ref
vs in
parameters where appropriate. So with the workaround and the new bindings generator this should not longer be a problem.
from opentk.
Related Issues (20)
- Unable to load openal library when built with nativeaot targeting android HOT 3
- [PAL2] PAL 2 Todo list
- Add support for OpenGL ES 3.2 HOT 4
- OpenTK.OpenAL 4.8.1 not present on nuget.org HOT 3
- Linux / .NET8 doesn't find libglfw HOT 2
- How to continuously record audio using OpenAL? HOT 7
- PAL 2 MacOS TODO list
- PAL 2 X11/Linux TODO list
- opentk is missing NuGet package README file
- Change of basis matrix functions
- Could you provide a dot dash line interface? eg glLineStipple() HOT 2
- Update to GLFW 3.4
- Possible ANGLE setting for glfw 3.4?
- Fix documentation for OpenAL FilterTypes
- ALSourcei.SourceState missing HOT 1
- Inclusion of sperical interpolation to math lib
- `MathHelper.Lerp` should not clamp `t` argument
- Support new glfw 3.4 mouse capture modes
- OpenTK 4.x app not show anything on Embedded Linux HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentk.