padrend / rendering Goto Github PK
View Code? Open in Web Editor NEWLibrary containing 2D and 3D rendering classes and functions
License: Mozilla Public License 2.0
Library containing 2D and 3D rendering classes and functions
License: Mozilla Public License 2.0
Initially reported by @ClaudiusJ as #558:
E.g. to have a simple way of modifying particles using a pixel shader:
Texture t( 1000x1000, correctFormat );
initParticlePositions( t )
Mesh m( correctFormat );
loop{
// update positions using a shader
Texture t2 = renderFullscreenQuadToTexture( t, animationShader )
// attach new coordinates to mesh
swap( m._accessVBOBuffer(), t2._accessBufferObject() )
// render particles to screen
...
m.display()
...
// move vertexData back into the buffer.
swap( m._accessVBOBuffer(), t2._accessBufferObject() )
}
Initially reported by @ClaudiusJ as #531:
As lightweight alternative to the use of Meshes ('I want to draw a single line without creating a Mesh.')
Initially reported by Benjamin as #581:
At the moment, there are many calls to glEnableClientState/glDisableClientState when not using a shader, or to glEnableVertexAttribArray/glDisableVertexAttribArray when using a shader. This is because we do not cache the previous value, enable all states/arrays in MeshVertexData::bind and disable them again in MeshVertexData::unbind.
A low-level caching of every array might be too tedious, but maybe one could only change the enabled states/arrays when changing the VertexDescription.
The trace shows that maybe even the calls to glBindBuffer(..., 0) are superfluous.
Initially reported by @rpetring as #83:
Splitting triangles till max size of Triangle < threshold
Splitting meshes into two parts
Splitting meshes till size of mesh < threshold
Splitting meshes till #polys in mesh < threshold
Splitting GeometryNodes till ...
Initially reported by @ClaudiusJ as #612:
Example file is appended.
Forest-experiment-1-mesh.zip
Initially reported by Benjamin as #534:
If the MeshBuilder::create... functions get a MeshBuilder instance, things like combining or transforming meshes would be much easier.
When using the fixed function pipeline on a Radeon graphics card, textures bound e.g. to unit 6 result in a flickering due to missing texture coordinates (e.g. when the SSAO2 PP-Effect is enabled). On graphics cards from other vendors, those textures are ignored.
This is part of the redesign (see #10).
To have a base for discussion, I created a first draft, how the new classes might look like:
Initially reported by @ClaudiusJ as #514:
Something like this:
rc.pushAndResetLightingContext() // all lights are off
rc.pushLight( someLightParameter ) // one light is on
...
// do something with this one light
...
rc.popLightingContext() // restore the old lighting
Initially reported by @ClaudiusJ as #704:
"setTexture(...)" binds the given Texture to the texture unit.
"markTextureUnitEnabled(...)" sets the given texture-enabled-uniform to true and enables the gl texture state (glEnable(GL_TEXTURE_??) for the fixed function pipeline.
This is needed for setting (=binding) textures that should not be used for normal rendering. (Problem: reflection textures, fixed function pipeline and AMD-graphics card...).
Implement AFTER Diss-related measurements are finished!
Initially reported by Ralf as #600:
if this->bufferId was not 0 before, the memory gets never freed...
BufferObject & BufferObject::operator=(BufferObject && other) {
Handle self-assignment.
if(this == &other) {
return *this;
}
bufferId = other.bufferId;
Make sure the other buffer object does not free the handle.
other.bufferId = 0;
return *this;
}
While looking at some classes in Rendering, I got some ideas for a redesign. I collect them here. When you want to implement parts that are mentioned here, please create a new issue to track the progress and mention it here.
gl*
functions.upload
and download
could convert between the two types (maybe using specialized template instantiations). They can be used in Texture and Mesh (see also #6).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.