cginternals / globjects Goto Github PK
View Code? Open in Web Editor NEWC++ library strictly wrapping OpenGL objects.
Home Page: https://globjects.org
License: MIT License
C++ library strictly wrapping OpenGL objects.
Home Page: https://globjects.org
License: MIT License
e.g.
additionally to
Buffer vertices(GL_ARRAY_BUFFER);
Buffer indices(GL_ELEMENT_ARRAY_BUFFER);
glow api should support
ArrayBuffer vertices;
ElementArrayBuffer indices;
The later is the correct api, since opengl uses different objects for each type, so glow should do so too. The default constructor with the enum
should be only available to allow yet unsupported or unknown features of opengl, that glow has not just updated to ....
In some cases this means we should use type aliases (not typedefs), in other cases this could mean subclassing/specialization...
This probably applies to a lot of glow's/opengl's objects.
Move it to include
Support at least:
E.g.
Currently there are
setFormat
setIFormat
setLFormat
but the needed function can be deduced by the type parameter
Preferably using glGetShaderInfoLog and glGetProgramInfoLog.
There might be occasions where storing the compiled binary shader might speed up the performance; e.g., when reloading a shader, which then is discarded because it didn't compile correctly, then the last working shader is reloaded and usually re-compiled. This could be skipped by storing and re-storing the binary shader.
Further more, glow should provide an interface to query the binary shader (e.g., for storing that to a binary shader file) for reuse on later program executions or product deployment.
see more: http://www.opengl.org/sdk/docs/man/xhtml/glShaderBinary.xml
Update extension versions
Remove link to glow-utils as it is now in glow
-output for mat4 should start with mat4(
-starts with a pointer to the string in hex instead
VertexAttributeBinding still uses _members
. There probably might be other classes too.
In order to maintain a uniform value on program swap/change/relink, we currently track the uniform and set the value just in time. Instead of this we could create a single buffer or at least groups of uniform buffers that are bound to groups (or all) of programs. This should also reduce CPU-GPU chatting.
Before setting a Uniform on a glow::Program, the program needs to be bound. After setting the Uniform, the glow::Program gets unbound.
In some cases, this is undesired behavior.
Should this never happen (also on other classes) or should this behavior be configurable?
Allow arbitrary lambdas as debug handlers
(create a struct with all the parameters to simplify parameter passing)
Is Error class the correct place to handle debug output?
Only in Debug mode and if not disabled.
done:
todo:
all examples should use glowutils and glow functions when ever possible (e.g., use camera, screen aligned quad, etc..)
Separate the source files into logic groups
In windows, fullscreen mode stops rendering (i think this worked before starting on x window/glx port). In unix there is currently no fullscree mode, which should be added.
The keybinding should be [F11] and [Alt]+[Return] for going fullscreen on all platforms.
Further, if fullscreen toggle should use current desktop resolution. Provide another method with width and height arguments that fullscreens to the nearest available resolution. So by default, no screen settings are changed on fullscreen toggle.
When a shader is loaded, it's relative filename could be registered to the OpenGL "virtual file system" and then be included on compile. I don't know if compilation of included shaders is still necassary then, and if this reuses shader objects as with linking multiple shader objects to a program.
See extension: http://www.opengl.org/registry/specs/ARB/shading_language_include.txt
see VertexAttributeBinding
attribute index and binding index are allowed to differ, but it doesn't work
Why is AbstractArray a subclass of Referenced?
The only subclass so far is Array, which is also a subclass of std::vector.
Currently, each use of Array work on stack-allocated memory and not on heap-allocated memory and I don't think somebody ever want an Array to be storable into a ref_ptr.
Proposed solution: Remove the superclass Referenced?
... instead of depending on one being created by another library.
The important functions are
Windows:
Linux:
Mac:
glDrawArrays and glDrawElements is encapsulated on Buffer despite the buffer instance have no effect on the triggered render pipeline.
What will be a more meaningful place?
GL_ARB_sampler_objects
http://www.opengl.org/registry/specs/ARB/sampler_objects.txt allows parameters usually stored in sampler information within the texture object, to be bound to the specific samplers.
Example: bind single texture to two different units. Setting up different, e.g., filtering parameters for each unit, does not result in different sampling, but instead sampling in the last specified manner.
GL_ARB_vertex_attrib_binding
is faster and separates format from binding. It's core since 4.3 (glisdprecated) and supported for some time as extension (http://www.opengl.org/registry/specs/ARB/vertex_attrib_binding.txt)
Provide an abstract interface for logging similar to qt (qDebug, qWarning, qCritical, qFatal). There should be a default derivate that dumps every log to console.
The current non-GL related classes/functions are:
Every class that encapsulates an object that requires GPU memory (textures, fbos, vaos, vbo, ...) should track their memory usage and support an interface for querying that information.
port from vrs (mt)
Compiler error:
/glow/source/glowwindow/X11Window.cpp:14:24: fatal error: GLxContext.h: No such file or directory
It is because X11Window.cpp includes the GLxContext, but the window was moved without the context files.
Cross-module includes aren't an option by now, as GLxContext is defined in the "private" source directory of glow.
I checked the windows window and it doesn't need its designated windows context.
So I don't know what solution is preferred.
two different solutions seem sufficient here:
http://stackoverflow.com/questions/4145605/stdvector-needs-to-have-dll-interface-to-be-used-by-clients-of-class-xt-war
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.